@aws-sdk/nested-clients 3.996.0 → 3.996.2

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,107 @@
1
+ const _AI = "AccountId";
2
+ const _AKI = "AccessKeyId";
3
+ const _C = "Credentials";
4
+ const _CRA = "CustomRoleArn";
5
+ const _E = "Expiration";
6
+ const _ESE = "ExternalServiceException";
7
+ const _GCFI = "GetCredentialsForIdentity";
8
+ const _GCFII = "GetCredentialsForIdentityInput";
9
+ const _GCFIR = "GetCredentialsForIdentityResponse";
10
+ const _GI = "GetId";
11
+ const _GII = "GetIdInput";
12
+ const _GIR = "GetIdResponse";
13
+ const _IEE = "InternalErrorException";
14
+ const _II = "IdentityId";
15
+ const _IIPCE = "InvalidIdentityPoolConfigurationException";
16
+ const _IPE = "InvalidParameterException";
17
+ const _IPI = "IdentityPoolId";
18
+ const _IPT = "IdentityProviderToken";
19
+ const _L = "Logins";
20
+ const _LEE = "LimitExceededException";
21
+ const _LM = "LoginsMap";
22
+ const _NAE = "NotAuthorizedException";
23
+ const _RCE = "ResourceConflictException";
24
+ const _RNFE = "ResourceNotFoundException";
25
+ const _SK = "SecretKey";
26
+ const _SKS = "SecretKeyString";
27
+ const _ST = "SessionToken";
28
+ const _TMRE = "TooManyRequestsException";
29
+ const _c = "client";
30
+ const _e = "error";
31
+ const _hE = "httpError";
32
+ const _m = "message";
33
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity";
34
+ const _se = "server";
35
+ const n0 = "com.amazonaws.cognitoidentity";
36
+ import { TypeRegistry } from "@smithy/core/schema";
37
+ import { CognitoIdentityServiceException } from "../models/CognitoIdentityServiceException";
38
+ import { ExternalServiceException, InternalErrorException, InvalidIdentityPoolConfigurationException, InvalidParameterException, LimitExceededException, NotAuthorizedException, ResourceConflictException, ResourceNotFoundException, TooManyRequestsException, } from "../models/errors";
39
+ const _s_registry = TypeRegistry.for(_s);
40
+ export var CognitoIdentityServiceException$ = [-3, _s, "CognitoIdentityServiceException", 0, [], []];
41
+ _s_registry.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);
42
+ const n0_registry = TypeRegistry.for(n0);
43
+ export var ExternalServiceException$ = [-3, n0, _ESE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];
44
+ n0_registry.registerError(ExternalServiceException$, ExternalServiceException);
45
+ export var InternalErrorException$ = [-3, n0, _IEE, { [_e]: _se }, [_m], [0]];
46
+ n0_registry.registerError(InternalErrorException$, InternalErrorException);
47
+ export var InvalidIdentityPoolConfigurationException$ = [
48
+ -3,
49
+ n0,
50
+ _IIPCE,
51
+ { [_e]: _c, [_hE]: 400 },
52
+ [_m],
53
+ [0],
54
+ ];
55
+ n0_registry.registerError(InvalidIdentityPoolConfigurationException$, InvalidIdentityPoolConfigurationException);
56
+ export var InvalidParameterException$ = [-3, n0, _IPE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];
57
+ n0_registry.registerError(InvalidParameterException$, InvalidParameterException);
58
+ export var LimitExceededException$ = [-3, n0, _LEE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];
59
+ n0_registry.registerError(LimitExceededException$, LimitExceededException);
60
+ export var NotAuthorizedException$ = [-3, n0, _NAE, { [_e]: _c, [_hE]: 403 }, [_m], [0]];
61
+ n0_registry.registerError(NotAuthorizedException$, NotAuthorizedException);
62
+ export var ResourceConflictException$ = [-3, n0, _RCE, { [_e]: _c, [_hE]: 409 }, [_m], [0]];
63
+ n0_registry.registerError(ResourceConflictException$, ResourceConflictException);
64
+ export var ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];
65
+ n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
66
+ export var TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];
67
+ n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
68
+ export const errorTypeRegistries = [_s_registry, n0_registry];
69
+ var IdentityProviderToken = [0, n0, _IPT, 8, 0];
70
+ var SecretKeyString = [0, n0, _SKS, 8, 0];
71
+ export var Credentials$ = [
72
+ 3,
73
+ n0,
74
+ _C,
75
+ 0,
76
+ [_AKI, _SK, _ST, _E],
77
+ [0, [() => SecretKeyString, 0], 0, 4],
78
+ ];
79
+ export var GetCredentialsForIdentityInput$ = [
80
+ 3,
81
+ n0,
82
+ _GCFII,
83
+ 0,
84
+ [_II, _L, _CRA],
85
+ [0, [() => LoginsMap, 0], 0],
86
+ 1,
87
+ ];
88
+ export var GetCredentialsForIdentityResponse$ = [
89
+ 3,
90
+ n0,
91
+ _GCFIR,
92
+ 0,
93
+ [_II, _C],
94
+ [0, [() => Credentials$, 0]],
95
+ ];
96
+ export var GetIdInput$ = [3, n0, _GII, 0, [_IPI, _AI, _L], [0, 0, [() => LoginsMap, 0]], 1];
97
+ export var GetIdResponse$ = [3, n0, _GIR, 0, [_II], [0]];
98
+ var LoginsMap = [2, n0, _LM, 0, [0, 0], [() => IdentityProviderToken, 0]];
99
+ export var GetCredentialsForIdentity$ = [
100
+ 9,
101
+ n0,
102
+ _GCFI,
103
+ 0,
104
+ () => GetCredentialsForIdentityInput$,
105
+ () => GetCredentialsForIdentityResponse$,
106
+ ];
107
+ export var GetId$ = [9, n0, _GI, 0, () => GetIdInput$, () => GetIdResponse$];
@@ -1,5 +1,5 @@
1
1
  import { createAggregatedClient } from "@smithy/smithy-client";
2
- import { CreateOAuth2TokenCommand, } from "./commands/CreateOAuth2TokenCommand";
2
+ import { CreateOAuth2TokenCommand } from "./commands/CreateOAuth2TokenCommand";
3
3
  import { SigninClient } from "./SigninClient";
4
4
  const commands = {
5
5
  CreateOAuth2TokenCommand,
@@ -1,4 +1,130 @@
1
1
  const u = "required", v = "fn", w = "argv", x = "ref";
2
- const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = { [u]: true, "default": false, "type": "boolean" }, j = { [u]: false, "type": "string" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: "getAttr", [w]: [{ [x]: g }, "name"] }, p = { [v]: c, [w]: [{ [x]: "UseFIPS" }, false] }, q = { [v]: c, [w]: [{ [x]: "UseDualStack" }, false] }, r = { [v]: "getAttr", [w]: [{ [x]: g }, "supportsFIPS"] }, s = { [v]: c, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: g }, "supportsDualStack"] }] }, t = [{ [x]: "Region" }];
3
- const _data = { version: "1.0", parameters: { UseDualStack: i, UseFIPS: i, Endpoint: j, Region: j }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: [l], error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: [m], error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [{ [v]: h, [w]: [o, "aws"] }, p, q], endpoint: { url: "https://{Region}.signin.aws.amazon.com", properties: n, headers: n }, type: e }, { conditions: [{ [v]: h, [w]: [o, "aws-cn"] }, p, q], endpoint: { url: "https://{Region}.signin.amazonaws.cn", properties: n, headers: n }, type: e }, { conditions: [{ [v]: h, [w]: [o, "aws-us-gov"] }, p, q], endpoint: { url: "https://{Region}.signin.amazonaws-us-gov.com", properties: n, headers: n }, type: e }, { conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, r] }, s], rules: [{ endpoint: { url: "https://signin-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: [l, q], rules: [{ conditions: [{ [v]: c, [w]: [r, a] }], rules: [{ endpoint: { url: "https://signin-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: [p, m], rules: [{ conditions: [s], rules: [{ endpoint: { url: "https://signin.{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://signin.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
2
+ const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = { [u]: true, default: false, type: "boolean" }, j = { [u]: false, type: "string" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: "getAttr", [w]: [{ [x]: g }, "name"] }, p = { [v]: c, [w]: [{ [x]: "UseFIPS" }, false] }, q = { [v]: c, [w]: [{ [x]: "UseDualStack" }, false] }, r = { [v]: "getAttr", [w]: [{ [x]: g }, "supportsFIPS"] }, s = { [v]: c, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: g }, "supportsDualStack"] }] }, t = [{ [x]: "Region" }];
3
+ const _data = {
4
+ version: "1.0",
5
+ parameters: { UseDualStack: i, UseFIPS: i, Endpoint: j, Region: j },
6
+ rules: [
7
+ {
8
+ conditions: [{ [v]: b, [w]: [k] }],
9
+ rules: [
10
+ { conditions: [l], error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d },
11
+ {
12
+ rules: [
13
+ {
14
+ conditions: [m],
15
+ error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
16
+ type: d,
17
+ },
18
+ { endpoint: { url: k, properties: n, headers: n }, type: e },
19
+ ],
20
+ type: f,
21
+ },
22
+ ],
23
+ type: f,
24
+ },
25
+ {
26
+ rules: [
27
+ {
28
+ conditions: [{ [v]: b, [w]: t }],
29
+ rules: [
30
+ {
31
+ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }],
32
+ rules: [
33
+ {
34
+ conditions: [{ [v]: h, [w]: [o, "aws"] }, p, q],
35
+ endpoint: { url: "https://{Region}.signin.aws.amazon.com", properties: n, headers: n },
36
+ type: e,
37
+ },
38
+ {
39
+ conditions: [{ [v]: h, [w]: [o, "aws-cn"] }, p, q],
40
+ endpoint: { url: "https://{Region}.signin.amazonaws.cn", properties: n, headers: n },
41
+ type: e,
42
+ },
43
+ {
44
+ conditions: [{ [v]: h, [w]: [o, "aws-us-gov"] }, p, q],
45
+ endpoint: { url: "https://{Region}.signin.amazonaws-us-gov.com", properties: n, headers: n },
46
+ type: e,
47
+ },
48
+ {
49
+ conditions: [l, m],
50
+ rules: [
51
+ {
52
+ conditions: [{ [v]: c, [w]: [a, r] }, s],
53
+ rules: [
54
+ {
55
+ endpoint: {
56
+ url: "https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
57
+ properties: n,
58
+ headers: n,
59
+ },
60
+ type: e,
61
+ },
62
+ ],
63
+ type: f,
64
+ },
65
+ {
66
+ error: "FIPS and DualStack are enabled, but this partition does not support one or both",
67
+ type: d,
68
+ },
69
+ ],
70
+ type: f,
71
+ },
72
+ {
73
+ conditions: [l, q],
74
+ rules: [
75
+ {
76
+ conditions: [{ [v]: c, [w]: [r, a] }],
77
+ rules: [
78
+ {
79
+ endpoint: {
80
+ url: "https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",
81
+ properties: n,
82
+ headers: n,
83
+ },
84
+ type: e,
85
+ },
86
+ ],
87
+ type: f,
88
+ },
89
+ { error: "FIPS is enabled but this partition does not support FIPS", type: d },
90
+ ],
91
+ type: f,
92
+ },
93
+ {
94
+ conditions: [p, m],
95
+ rules: [
96
+ {
97
+ conditions: [s],
98
+ rules: [
99
+ {
100
+ endpoint: {
101
+ url: "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",
102
+ properties: n,
103
+ headers: n,
104
+ },
105
+ type: e,
106
+ },
107
+ ],
108
+ type: f,
109
+ },
110
+ { error: "DualStack is enabled but this partition does not support DualStack", type: d },
111
+ ],
112
+ type: f,
113
+ },
114
+ {
115
+ endpoint: { url: "https://signin.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n },
116
+ type: e,
117
+ },
118
+ ],
119
+ type: f,
120
+ },
121
+ ],
122
+ type: f,
123
+ },
124
+ { error: "Invalid Configuration: Missing Region", type: d },
125
+ ],
126
+ type: f,
127
+ },
128
+ ],
129
+ };
4
130
  export const ruleSet = _data;
@@ -0,0 +1,9 @@
1
+ import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { GetRoleCredentialsCommand } from "./commands/GetRoleCredentialsCommand";
3
+ import { SSOClient } from "./SSOClient";
4
+ const commands = {
5
+ GetRoleCredentialsCommand,
6
+ };
7
+ export class SSO extends SSOClient {
8
+ }
9
+ createAggregatedClient(commands, SSO);
@@ -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 { defaultSSOHttpAuthSchemeParametersProvider, 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 SSOClient 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: defaultSSOHttpAuthSchemeParametersProvider,
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
+ }
@@ -0,0 +1,38 @@
1
+ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
2
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
3
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
4
+ let _credentials = runtimeConfig.credentials;
5
+ return {
6
+ setHttpAuthScheme(httpAuthScheme) {
7
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
8
+ if (index === -1) {
9
+ _httpAuthSchemes.push(httpAuthScheme);
10
+ }
11
+ else {
12
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
13
+ }
14
+ },
15
+ httpAuthSchemes() {
16
+ return _httpAuthSchemes;
17
+ },
18
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
19
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
20
+ },
21
+ httpAuthSchemeProvider() {
22
+ return _httpAuthSchemeProvider;
23
+ },
24
+ setCredentials(credentials) {
25
+ _credentials = credentials;
26
+ },
27
+ credentials() {
28
+ return _credentials;
29
+ },
30
+ };
31
+ };
32
+ export const resolveHttpAuthRuntimeConfig = (config) => {
33
+ return {
34
+ httpAuthSchemes: config.httpAuthSchemes(),
35
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
36
+ credentials: config.credentials(),
37
+ };
38
+ };
@@ -0,0 +1,50 @@
1
+ import { resolveAwsSdkSigV4Config } from "@aws-sdk/core";
2
+ import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
3
+ export const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
+ return {
5
+ operation: getSmithyContext(context).operation,
6
+ region: (await normalizeProvider(config.region)()) ||
7
+ (() => {
8
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
9
+ })(),
10
+ };
11
+ };
12
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
13
+ return {
14
+ schemeId: "aws.auth#sigv4",
15
+ signingProperties: {
16
+ name: "awsssoportal",
17
+ region: authParameters.region,
18
+ },
19
+ propertiesExtractor: (config, context) => ({
20
+ signingProperties: {
21
+ config,
22
+ context,
23
+ },
24
+ }),
25
+ };
26
+ }
27
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
28
+ return {
29
+ schemeId: "smithy.api#noAuth",
30
+ };
31
+ }
32
+ export const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
33
+ const options = [];
34
+ switch (authParameters.operation) {
35
+ case "GetRoleCredentials": {
36
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
37
+ break;
38
+ }
39
+ default: {
40
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
41
+ }
42
+ }
43
+ return options;
44
+ };
45
+ export const resolveHttpAuthSchemeConfig = (config) => {
46
+ const config_0 = resolveAwsSdkSigV4Config(config);
47
+ return Object.assign(config_0, {
48
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
49
+ });
50
+ };
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { GetRoleCredentials$ } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class GetRoleCredentialsCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("SWBPortalService", "GetRoleCredentials", {})
13
+ .n("SSOClient", "GetRoleCredentialsCommand")
14
+ .sc(GetRoleCredentials$)
15
+ .build() {
16
+ }
@@ -0,0 +1 @@
1
+ export * from "./GetRoleCredentialsCommand";
@@ -0,0 +1,13 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return Object.assign(options, {
3
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
4
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
5
+ defaultSigningName: "awsssoportal",
6
+ });
7
+ };
8
+ export const commonParams = {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
@@ -0,0 +1,14 @@
1
+ import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
2
+ import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
3
+ import { ruleSet } from "./ruleset";
4
+ const cache = new EndpointCache({
5
+ size: 50,
6
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
7
+ });
8
+ export const defaultEndpointResolver = (endpointParams, context = {}) => {
9
+ return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
10
+ endpointParams: endpointParams,
11
+ logger: context.logger,
12
+ }));
13
+ };
14
+ customEndpointFunctions.aws = awsEndpointFunctions;
@@ -0,0 +1,103 @@
1
+ const u = "required", v = "fn", w = "argv", x = "ref";
2
+ 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" }];
3
+ const _data = {
4
+ version: "1.0",
5
+ parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i },
6
+ rules: [
7
+ {
8
+ conditions: [{ [v]: b, [w]: [k] }],
9
+ rules: [
10
+ { conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d },
11
+ { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d },
12
+ { endpoint: { url: k, properties: n, headers: n }, type: e },
13
+ ],
14
+ type: f,
15
+ },
16
+ {
17
+ conditions: [{ [v]: b, [w]: t }],
18
+ rules: [
19
+ {
20
+ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }],
21
+ rules: [
22
+ {
23
+ conditions: [l, m],
24
+ rules: [
25
+ {
26
+ conditions: [{ [v]: c, [w]: [a, o] }, q],
27
+ rules: [
28
+ {
29
+ endpoint: {
30
+ url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
31
+ properties: n,
32
+ headers: n,
33
+ },
34
+ type: e,
35
+ },
36
+ ],
37
+ type: f,
38
+ },
39
+ { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d },
40
+ ],
41
+ type: f,
42
+ },
43
+ {
44
+ conditions: r,
45
+ rules: [
46
+ {
47
+ conditions: [{ [v]: c, [w]: [o, a] }],
48
+ rules: [
49
+ {
50
+ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }],
51
+ endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n },
52
+ type: e,
53
+ },
54
+ {
55
+ endpoint: {
56
+ url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",
57
+ properties: n,
58
+ headers: n,
59
+ },
60
+ type: e,
61
+ },
62
+ ],
63
+ type: f,
64
+ },
65
+ { error: "FIPS is enabled but this partition does not support FIPS", type: d },
66
+ ],
67
+ type: f,
68
+ },
69
+ {
70
+ conditions: s,
71
+ rules: [
72
+ {
73
+ conditions: [q],
74
+ rules: [
75
+ {
76
+ endpoint: {
77
+ url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",
78
+ properties: n,
79
+ headers: n,
80
+ },
81
+ type: e,
82
+ },
83
+ ],
84
+ type: f,
85
+ },
86
+ { error: "DualStack is enabled but this partition does not support DualStack", type: d },
87
+ ],
88
+ type: f,
89
+ },
90
+ {
91
+ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n },
92
+ type: e,
93
+ },
94
+ ],
95
+ type: f,
96
+ },
97
+ ],
98
+ type: f,
99
+ },
100
+ { error: "Invalid Configuration: Missing Region", type: d },
101
+ ],
102
+ };
103
+ export const ruleSet = _data;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export * from "./SSOClient";
2
+ export * from "./SSO";
3
+ export * from "./commands";
4
+ export * from "./schemas/schemas_0";
5
+ export * from "./models/errors";
6
+ export * from "./models/models_0";
7
+ export { SSOServiceException } from "./models/SSOServiceException";
@@ -0,0 +1,8 @@
1
+ import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
2
+ export { __ServiceException };
3
+ export class SSOServiceException extends __ServiceException {
4
+ constructor(options) {
5
+ super(options);
6
+ Object.setPrototypeOf(this, SSOServiceException.prototype);
7
+ }
8
+ }
@@ -0,0 +1,49 @@
1
+ import { SSOServiceException as __BaseException } from "./SSOServiceException";
2
+ export class InvalidRequestException extends __BaseException {
3
+ name = "InvalidRequestException";
4
+ $fault = "client";
5
+ constructor(opts) {
6
+ super({
7
+ name: "InvalidRequestException",
8
+ $fault: "client",
9
+ ...opts,
10
+ });
11
+ Object.setPrototypeOf(this, InvalidRequestException.prototype);
12
+ }
13
+ }
14
+ export class ResourceNotFoundException extends __BaseException {
15
+ name = "ResourceNotFoundException";
16
+ $fault = "client";
17
+ constructor(opts) {
18
+ super({
19
+ name: "ResourceNotFoundException",
20
+ $fault: "client",
21
+ ...opts,
22
+ });
23
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
24
+ }
25
+ }
26
+ export class TooManyRequestsException extends __BaseException {
27
+ name = "TooManyRequestsException";
28
+ $fault = "client";
29
+ constructor(opts) {
30
+ super({
31
+ name: "TooManyRequestsException",
32
+ $fault: "client",
33
+ ...opts,
34
+ });
35
+ Object.setPrototypeOf(this, TooManyRequestsException.prototype);
36
+ }
37
+ }
38
+ export class UnauthorizedException extends __BaseException {
39
+ name = "UnauthorizedException";
40
+ $fault = "client";
41
+ constructor(opts) {
42
+ super({
43
+ name: "UnauthorizedException",
44
+ $fault: "client",
45
+ ...opts,
46
+ });
47
+ Object.setPrototypeOf(this, UnauthorizedException.prototype);
48
+ }
49
+ }
@@ -0,0 +1 @@
1
+ export {};