@etainabl/nodejs-sdk 1.3.111 → 1.3.113

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 (49) hide show
  1. package/dist/esm/chunk-3YGWW265.js +64 -0
  2. package/dist/esm/chunk-3YGWW265.js.map +1 -0
  3. package/dist/esm/chunk-BIVFO5LG.js +2476 -0
  4. package/dist/esm/chunk-BIVFO5LG.js.map +1 -0
  5. package/dist/esm/chunk-CIKXN3GS.js +64 -0
  6. package/dist/esm/chunk-CIKXN3GS.js.map +1 -0
  7. package/dist/esm/chunk-E6O4HVLA.js +121 -0
  8. package/dist/esm/chunk-E6O4HVLA.js.map +1 -0
  9. package/dist/esm/chunk-HAEAETXR.js +210 -0
  10. package/dist/esm/chunk-HAEAETXR.js.map +1 -0
  11. package/dist/esm/chunk-ITSE4X2J.js +1733 -0
  12. package/dist/esm/chunk-ITSE4X2J.js.map +1 -0
  13. package/dist/esm/chunk-OWL7NKW5.js +47 -0
  14. package/dist/esm/chunk-OWL7NKW5.js.map +1 -0
  15. package/dist/esm/chunk-R63LRFTI.js +153 -0
  16. package/dist/esm/chunk-R63LRFTI.js.map +1 -0
  17. package/dist/esm/chunk-UFTVLHTW.js +114 -0
  18. package/dist/esm/chunk-UFTVLHTW.js.map +1 -0
  19. package/dist/esm/chunk-UZGMBQZB.js +13 -0
  20. package/dist/esm/chunk-UZGMBQZB.js.map +1 -0
  21. package/dist/esm/chunk-XXAWQ5GA.js +3359 -0
  22. package/dist/esm/chunk-XXAWQ5GA.js.map +1 -0
  23. package/dist/esm/dist-es-4ZHJVMJ4.js +21 -0
  24. package/dist/esm/dist-es-4ZHJVMJ4.js.map +1 -0
  25. package/dist/esm/dist-es-FD7XXZCE.js +305 -0
  26. package/dist/esm/dist-es-FD7XXZCE.js.map +1 -0
  27. package/dist/esm/dist-es-MXGFLXV2.js +379 -0
  28. package/dist/esm/dist-es-MXGFLXV2.js.map +1 -0
  29. package/dist/esm/dist-es-QPNGCVTW.js +67 -0
  30. package/dist/esm/dist-es-QPNGCVTW.js.map +1 -0
  31. package/dist/esm/dist-es-RHLCSE2G.js +200 -0
  32. package/dist/esm/dist-es-RHLCSE2G.js.map +1 -0
  33. package/dist/esm/dist-es-X5IH3XCT.js +88 -0
  34. package/dist/esm/dist-es-X5IH3XCT.js.map +1 -0
  35. package/dist/esm/dist-es-XEM2CDDP.js +163 -0
  36. package/dist/esm/dist-es-XEM2CDDP.js.map +1 -0
  37. package/dist/esm/index.js +4295 -82
  38. package/dist/esm/index.js.map +1 -1
  39. package/dist/esm/loadSso-3QBKTJF3.js +655 -0
  40. package/dist/esm/loadSso-3QBKTJF3.js.map +1 -0
  41. package/dist/esm/sso-oidc-GZ3LZ3MF.js +827 -0
  42. package/dist/esm/sso-oidc-GZ3LZ3MF.js.map +1 -0
  43. package/dist/esm/sts-CIQKG7FB.js +1162 -0
  44. package/dist/esm/sts-CIQKG7FB.js.map +1 -0
  45. package/dist/index.d.cts +177 -82
  46. package/dist/index.d.ts +177 -82
  47. package/dist/index.js +21936 -1165
  48. package/dist/index.js.map +1 -1
  49. package/package.json +4 -2
@@ -0,0 +1,655 @@
1
+ import {
2
+ loadRestJsonErrorCode,
3
+ parseJsonBody,
4
+ parseJsonErrorBody
5
+ } from "./chunk-CIKXN3GS.js";
6
+ import {
7
+ AwsSdkSigV4Signer,
8
+ DEFAULT_RETRY_MODE,
9
+ DefaultIdentityProviderConfig,
10
+ EndpointCache,
11
+ Hash,
12
+ NODE_APP_ID_CONFIG_OPTIONS,
13
+ NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
14
+ NODE_MAX_ATTEMPT_CONFIG_OPTIONS,
15
+ NODE_REGION_CONFIG_FILE_OPTIONS,
16
+ NODE_REGION_CONFIG_OPTIONS,
17
+ NODE_RETRY_MODE_CONFIG_OPTIONS,
18
+ NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
19
+ NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
20
+ NoAuthSigner,
21
+ awsEndpointFunctions,
22
+ calculateBodyLength,
23
+ createDefaultUserAgentProvider,
24
+ customEndpointFunctions,
25
+ emitWarningIfUnsupportedVersion,
26
+ getAwsRegionExtensionConfiguration,
27
+ getContentLengthPlugin,
28
+ getEndpointPlugin,
29
+ getHostHeaderPlugin,
30
+ getHttpAuthSchemeEndpointRuleSetPlugin,
31
+ getHttpSigningPlugin,
32
+ getLoggerPlugin,
33
+ getRecursionDetectionPlugin,
34
+ getRetryPlugin,
35
+ getSerdePlugin,
36
+ getUserAgentPlugin,
37
+ resolveAwsRegionExtensionConfiguration,
38
+ resolveAwsSdkSigV4Config,
39
+ resolveDefaultsModeConfig,
40
+ resolveEndpoint,
41
+ resolveEndpointConfig,
42
+ resolveHostHeaderConfig,
43
+ resolveRegionConfig,
44
+ resolveRetryConfig,
45
+ resolveUserAgentConfig
46
+ } from "./chunk-XXAWQ5GA.js";
47
+ import {
48
+ loadConfig,
49
+ parseUrl
50
+ } from "./chunk-UFTVLHTW.js";
51
+ import {
52
+ Client,
53
+ Command,
54
+ NoOpLogger,
55
+ NodeHttpHandler,
56
+ SENSITIVE_STRING,
57
+ ServiceException,
58
+ _json,
59
+ decorateServiceException,
60
+ emitWarningIfUnsupportedVersion as emitWarningIfUnsupportedVersion2,
61
+ expectNonNull,
62
+ expectObject,
63
+ expectString,
64
+ fromBase64,
65
+ fromUtf8,
66
+ getDefaultExtensionConfiguration,
67
+ getHttpHandlerExtensionConfiguration,
68
+ getSmithyContext,
69
+ isSerializableHeaderValue,
70
+ loadConfigsForDefaultMode,
71
+ map,
72
+ normalizeProvider,
73
+ requestBuilder,
74
+ resolveDefaultRuntimeConfig,
75
+ resolveHttpHandlerRuntimeConfig,
76
+ streamCollector,
77
+ take,
78
+ toBase64,
79
+ toUtf8,
80
+ withBaseException
81
+ } from "./chunk-BIVFO5LG.js";
82
+ import "./chunk-HAEAETXR.js";
83
+ import "./chunk-UZGMBQZB.js";
84
+ import "./chunk-3YGWW265.js";
85
+ import "./chunk-R63LRFTI.js";
86
+
87
+ // node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthSchemeProvider.js
88
+ var defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
89
+ return {
90
+ operation: getSmithyContext(context).operation,
91
+ region: await normalizeProvider(config.region)() || (() => {
92
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
93
+ })()
94
+ };
95
+ };
96
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
97
+ return {
98
+ schemeId: "aws.auth#sigv4",
99
+ signingProperties: {
100
+ name: "awsssoportal",
101
+ region: authParameters.region
102
+ },
103
+ propertiesExtractor: (config, context) => ({
104
+ signingProperties: {
105
+ config,
106
+ context
107
+ }
108
+ })
109
+ };
110
+ }
111
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
112
+ return {
113
+ schemeId: "smithy.api#noAuth"
114
+ };
115
+ }
116
+ var defaultSSOHttpAuthSchemeProvider = (authParameters) => {
117
+ const options = [];
118
+ switch (authParameters.operation) {
119
+ case "GetRoleCredentials": {
120
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
121
+ break;
122
+ }
123
+ case "ListAccountRoles": {
124
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
125
+ break;
126
+ }
127
+ case "ListAccounts": {
128
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
129
+ break;
130
+ }
131
+ case "Logout": {
132
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
133
+ break;
134
+ }
135
+ default: {
136
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
137
+ }
138
+ }
139
+ return options;
140
+ };
141
+ var resolveHttpAuthSchemeConfig = (config) => {
142
+ const config_0 = resolveAwsSdkSigV4Config(config);
143
+ return Object.assign(config_0, {
144
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
145
+ });
146
+ };
147
+
148
+ // node_modules/@aws-sdk/client-sso/dist-es/endpoint/EndpointParameters.js
149
+ var resolveClientEndpointParameters = (options) => {
150
+ return Object.assign(options, {
151
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
152
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
153
+ defaultSigningName: "awsssoportal"
154
+ });
155
+ };
156
+ var commonParams = {
157
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
158
+ Endpoint: { type: "builtInParams", name: "endpoint" },
159
+ Region: { type: "builtInParams", name: "region" },
160
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
161
+ };
162
+
163
+ // node_modules/@aws-sdk/client-sso/package.json
164
+ var package_default = {
165
+ name: "@aws-sdk/client-sso",
166
+ description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
167
+ version: "3.835.0",
168
+ scripts: {
169
+ build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
170
+ "build:cjs": "node ../../scripts/compilation/inline client-sso",
171
+ "build:es": "tsc -p tsconfig.es.json",
172
+ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
173
+ "build:types": "tsc -p tsconfig.types.json",
174
+ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
175
+ clean: "rimraf ./dist-* && rimraf *.tsbuildinfo",
176
+ "extract:docs": "api-extractor run --local",
177
+ "generate:client": "node ../../scripts/generate-clients/single-service --solo sso"
178
+ },
179
+ main: "./dist-cjs/index.js",
180
+ types: "./dist-types/index.d.ts",
181
+ module: "./dist-es/index.js",
182
+ sideEffects: false,
183
+ dependencies: {
184
+ "@aws-crypto/sha256-browser": "5.2.0",
185
+ "@aws-crypto/sha256-js": "5.2.0",
186
+ "@aws-sdk/core": "3.835.0",
187
+ "@aws-sdk/middleware-host-header": "3.821.0",
188
+ "@aws-sdk/middleware-logger": "3.821.0",
189
+ "@aws-sdk/middleware-recursion-detection": "3.821.0",
190
+ "@aws-sdk/middleware-user-agent": "3.835.0",
191
+ "@aws-sdk/region-config-resolver": "3.821.0",
192
+ "@aws-sdk/types": "3.821.0",
193
+ "@aws-sdk/util-endpoints": "3.828.0",
194
+ "@aws-sdk/util-user-agent-browser": "3.821.0",
195
+ "@aws-sdk/util-user-agent-node": "3.835.0",
196
+ "@smithy/config-resolver": "^4.1.4",
197
+ "@smithy/core": "^3.5.3",
198
+ "@smithy/fetch-http-handler": "^5.0.4",
199
+ "@smithy/hash-node": "^4.0.4",
200
+ "@smithy/invalid-dependency": "^4.0.4",
201
+ "@smithy/middleware-content-length": "^4.0.4",
202
+ "@smithy/middleware-endpoint": "^4.1.12",
203
+ "@smithy/middleware-retry": "^4.1.13",
204
+ "@smithy/middleware-serde": "^4.0.8",
205
+ "@smithy/middleware-stack": "^4.0.4",
206
+ "@smithy/node-config-provider": "^4.1.3",
207
+ "@smithy/node-http-handler": "^4.0.6",
208
+ "@smithy/protocol-http": "^5.1.2",
209
+ "@smithy/smithy-client": "^4.4.4",
210
+ "@smithy/types": "^4.3.1",
211
+ "@smithy/url-parser": "^4.0.4",
212
+ "@smithy/util-base64": "^4.0.0",
213
+ "@smithy/util-body-length-browser": "^4.0.0",
214
+ "@smithy/util-body-length-node": "^4.0.0",
215
+ "@smithy/util-defaults-mode-browser": "^4.0.20",
216
+ "@smithy/util-defaults-mode-node": "^4.0.20",
217
+ "@smithy/util-endpoints": "^3.0.6",
218
+ "@smithy/util-middleware": "^4.0.4",
219
+ "@smithy/util-retry": "^4.0.6",
220
+ "@smithy/util-utf8": "^4.0.0",
221
+ tslib: "^2.6.2"
222
+ },
223
+ devDependencies: {
224
+ "@tsconfig/node18": "18.2.4",
225
+ "@types/node": "^18.19.69",
226
+ concurrently: "7.0.0",
227
+ "downlevel-dts": "0.10.1",
228
+ rimraf: "3.0.2",
229
+ typescript: "~5.8.3"
230
+ },
231
+ engines: {
232
+ node: ">=18.0.0"
233
+ },
234
+ typesVersions: {
235
+ "<4.0": {
236
+ "dist-types/*": [
237
+ "dist-types/ts3.4/*"
238
+ ]
239
+ }
240
+ },
241
+ files: [
242
+ "dist-*/**"
243
+ ],
244
+ author: {
245
+ name: "AWS SDK for JavaScript Team",
246
+ url: "https://aws.amazon.com/javascript/"
247
+ },
248
+ license: "Apache-2.0",
249
+ browser: {
250
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
251
+ },
252
+ "react-native": {
253
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
254
+ },
255
+ homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",
256
+ repository: {
257
+ type: "git",
258
+ url: "https://github.com/aws/aws-sdk-js-v3.git",
259
+ directory: "clients/client-sso"
260
+ }
261
+ };
262
+
263
+ // node_modules/@aws-sdk/client-sso/dist-es/endpoint/ruleset.js
264
+ var u = "required";
265
+ var v = "fn";
266
+ var w = "argv";
267
+ var x = "ref";
268
+ var a = true;
269
+ var b = "isSet";
270
+ var c = "booleanEquals";
271
+ var d = "error";
272
+ var e = "endpoint";
273
+ var f = "tree";
274
+ var g = "PartitionResult";
275
+ var h = "getAttr";
276
+ var i = { [u]: false, "type": "String" };
277
+ var j = { [u]: true, "default": false, "type": "Boolean" };
278
+ var k = { [x]: "Endpoint" };
279
+ var l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] };
280
+ var m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] };
281
+ var n = {};
282
+ var o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] };
283
+ var p = { [x]: g };
284
+ var q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] };
285
+ var r = [l];
286
+ var s = [m];
287
+ var t = [{ [x]: "Region" }];
288
+ var _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://portal.sso-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://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-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://portal.sso.{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://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
289
+ var ruleSet = _data;
290
+
291
+ // node_modules/@aws-sdk/client-sso/dist-es/endpoint/endpointResolver.js
292
+ var cache = new EndpointCache({
293
+ size: 50,
294
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
295
+ });
296
+ var defaultEndpointResolver = (endpointParams, context = {}) => {
297
+ return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
298
+ endpointParams,
299
+ logger: context.logger
300
+ }));
301
+ };
302
+ customEndpointFunctions.aws = awsEndpointFunctions;
303
+
304
+ // node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.shared.js
305
+ var getRuntimeConfig = (config) => {
306
+ return {
307
+ apiVersion: "2019-06-10",
308
+ base64Decoder: config?.base64Decoder ?? fromBase64,
309
+ base64Encoder: config?.base64Encoder ?? toBase64,
310
+ disableHostPrefix: config?.disableHostPrefix ?? false,
311
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
312
+ extensions: config?.extensions ?? [],
313
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,
314
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
315
+ {
316
+ schemeId: "aws.auth#sigv4",
317
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
318
+ signer: new AwsSdkSigV4Signer()
319
+ },
320
+ {
321
+ schemeId: "smithy.api#noAuth",
322
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
323
+ signer: new NoAuthSigner()
324
+ }
325
+ ],
326
+ logger: config?.logger ?? new NoOpLogger(),
327
+ serviceId: config?.serviceId ?? "SSO",
328
+ urlParser: config?.urlParser ?? parseUrl,
329
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
330
+ utf8Encoder: config?.utf8Encoder ?? toUtf8
331
+ };
332
+ };
333
+
334
+ // node_modules/@aws-sdk/client-sso/dist-es/runtimeConfig.js
335
+ var getRuntimeConfig2 = (config) => {
336
+ emitWarningIfUnsupportedVersion2(process.version);
337
+ const defaultsMode = resolveDefaultsModeConfig(config);
338
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
339
+ const clientSharedValues = getRuntimeConfig(config);
340
+ emitWarningIfUnsupportedVersion(process.version);
341
+ const loaderConfig = {
342
+ profile: config?.profile,
343
+ logger: clientSharedValues.logger
344
+ };
345
+ return {
346
+ ...clientSharedValues,
347
+ ...config,
348
+ runtime: "node",
349
+ defaultsMode,
350
+ authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
351
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
352
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
353
+ maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
354
+ region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
355
+ requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
356
+ retryMode: config?.retryMode ?? loadConfig({
357
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
358
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
359
+ }, config),
360
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
361
+ streamCollector: config?.streamCollector ?? streamCollector,
362
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
363
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
364
+ userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
365
+ };
366
+ };
367
+
368
+ // node_modules/@aws-sdk/client-sso/dist-es/auth/httpAuthExtensionConfiguration.js
369
+ var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
370
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
371
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
372
+ let _credentials = runtimeConfig.credentials;
373
+ return {
374
+ setHttpAuthScheme(httpAuthScheme) {
375
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
376
+ if (index === -1) {
377
+ _httpAuthSchemes.push(httpAuthScheme);
378
+ } else {
379
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
380
+ }
381
+ },
382
+ httpAuthSchemes() {
383
+ return _httpAuthSchemes;
384
+ },
385
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
386
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
387
+ },
388
+ httpAuthSchemeProvider() {
389
+ return _httpAuthSchemeProvider;
390
+ },
391
+ setCredentials(credentials) {
392
+ _credentials = credentials;
393
+ },
394
+ credentials() {
395
+ return _credentials;
396
+ }
397
+ };
398
+ };
399
+ var resolveHttpAuthRuntimeConfig = (config) => {
400
+ return {
401
+ httpAuthSchemes: config.httpAuthSchemes(),
402
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
403
+ credentials: config.credentials()
404
+ };
405
+ };
406
+
407
+ // node_modules/@aws-sdk/client-sso/dist-es/runtimeExtensions.js
408
+ var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
409
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
410
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
411
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
412
+ };
413
+
414
+ // node_modules/@aws-sdk/client-sso/dist-es/SSOClient.js
415
+ var SSOClient = class extends Client {
416
+ config;
417
+ constructor(...[configuration]) {
418
+ const _config_0 = getRuntimeConfig2(configuration || {});
419
+ super(_config_0);
420
+ this.initConfig = _config_0;
421
+ const _config_1 = resolveClientEndpointParameters(_config_0);
422
+ const _config_2 = resolveUserAgentConfig(_config_1);
423
+ const _config_3 = resolveRetryConfig(_config_2);
424
+ const _config_4 = resolveRegionConfig(_config_3);
425
+ const _config_5 = resolveHostHeaderConfig(_config_4);
426
+ const _config_6 = resolveEndpointConfig(_config_5);
427
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
428
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
429
+ this.config = _config_8;
430
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
431
+ this.middlewareStack.use(getRetryPlugin(this.config));
432
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
433
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
434
+ this.middlewareStack.use(getLoggerPlugin(this.config));
435
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
436
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
437
+ httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
438
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
439
+ "aws.auth#sigv4": config.credentials
440
+ })
441
+ }));
442
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
443
+ }
444
+ destroy() {
445
+ super.destroy();
446
+ }
447
+ };
448
+
449
+ // node_modules/@aws-sdk/client-sso/dist-es/models/SSOServiceException.js
450
+ var SSOServiceException = class _SSOServiceException extends ServiceException {
451
+ constructor(options) {
452
+ super(options);
453
+ Object.setPrototypeOf(this, _SSOServiceException.prototype);
454
+ }
455
+ };
456
+
457
+ // node_modules/@aws-sdk/client-sso/dist-es/models/models_0.js
458
+ var InvalidRequestException = class _InvalidRequestException extends SSOServiceException {
459
+ name = "InvalidRequestException";
460
+ $fault = "client";
461
+ constructor(opts) {
462
+ super({
463
+ name: "InvalidRequestException",
464
+ $fault: "client",
465
+ ...opts
466
+ });
467
+ Object.setPrototypeOf(this, _InvalidRequestException.prototype);
468
+ }
469
+ };
470
+ var ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException {
471
+ name = "ResourceNotFoundException";
472
+ $fault = "client";
473
+ constructor(opts) {
474
+ super({
475
+ name: "ResourceNotFoundException",
476
+ $fault: "client",
477
+ ...opts
478
+ });
479
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
480
+ }
481
+ };
482
+ var TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException {
483
+ name = "TooManyRequestsException";
484
+ $fault = "client";
485
+ constructor(opts) {
486
+ super({
487
+ name: "TooManyRequestsException",
488
+ $fault: "client",
489
+ ...opts
490
+ });
491
+ Object.setPrototypeOf(this, _TooManyRequestsException.prototype);
492
+ }
493
+ };
494
+ var UnauthorizedException = class _UnauthorizedException extends SSOServiceException {
495
+ name = "UnauthorizedException";
496
+ $fault = "client";
497
+ constructor(opts) {
498
+ super({
499
+ name: "UnauthorizedException",
500
+ $fault: "client",
501
+ ...opts
502
+ });
503
+ Object.setPrototypeOf(this, _UnauthorizedException.prototype);
504
+ }
505
+ };
506
+ var GetRoleCredentialsRequestFilterSensitiveLog = (obj) => ({
507
+ ...obj,
508
+ ...obj.accessToken && { accessToken: SENSITIVE_STRING }
509
+ });
510
+ var RoleCredentialsFilterSensitiveLog = (obj) => ({
511
+ ...obj,
512
+ ...obj.secretAccessKey && { secretAccessKey: SENSITIVE_STRING },
513
+ ...obj.sessionToken && { sessionToken: SENSITIVE_STRING }
514
+ });
515
+ var GetRoleCredentialsResponseFilterSensitiveLog = (obj) => ({
516
+ ...obj,
517
+ ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }
518
+ });
519
+
520
+ // node_modules/@aws-sdk/client-sso/dist-es/protocols/Aws_restJson1.js
521
+ var se_GetRoleCredentialsCommand = async (input, context) => {
522
+ const b2 = requestBuilder(input, context);
523
+ const headers = map({}, isSerializableHeaderValue, {
524
+ [_xasbt]: input[_aT]
525
+ });
526
+ b2.bp("/federation/credentials");
527
+ const query = map({
528
+ [_rn]: [, expectNonNull(input[_rN], `roleName`)],
529
+ [_ai]: [, expectNonNull(input[_aI], `accountId`)]
530
+ });
531
+ let body;
532
+ b2.m("GET").h(headers).q(query).b(body);
533
+ return b2.build();
534
+ };
535
+ var de_GetRoleCredentialsCommand = async (output, context) => {
536
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
537
+ return de_CommandError(output, context);
538
+ }
539
+ const contents = map({
540
+ $metadata: deserializeMetadata(output)
541
+ });
542
+ const data = expectNonNull(expectObject(await parseJsonBody(output.body, context)), "body");
543
+ const doc = take(data, {
544
+ roleCredentials: _json
545
+ });
546
+ Object.assign(contents, doc);
547
+ return contents;
548
+ };
549
+ var de_CommandError = async (output, context) => {
550
+ const parsedOutput = {
551
+ ...output,
552
+ body: await parseJsonErrorBody(output.body, context)
553
+ };
554
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
555
+ switch (errorCode) {
556
+ case "InvalidRequestException":
557
+ case "com.amazonaws.sso#InvalidRequestException":
558
+ throw await de_InvalidRequestExceptionRes(parsedOutput, context);
559
+ case "ResourceNotFoundException":
560
+ case "com.amazonaws.sso#ResourceNotFoundException":
561
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
562
+ case "TooManyRequestsException":
563
+ case "com.amazonaws.sso#TooManyRequestsException":
564
+ throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
565
+ case "UnauthorizedException":
566
+ case "com.amazonaws.sso#UnauthorizedException":
567
+ throw await de_UnauthorizedExceptionRes(parsedOutput, context);
568
+ default:
569
+ const parsedBody = parsedOutput.body;
570
+ return throwDefaultError({
571
+ output,
572
+ parsedBody,
573
+ errorCode
574
+ });
575
+ }
576
+ };
577
+ var throwDefaultError = withBaseException(SSOServiceException);
578
+ var de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
579
+ const contents = map({});
580
+ const data = parsedOutput.body;
581
+ const doc = take(data, {
582
+ message: expectString
583
+ });
584
+ Object.assign(contents, doc);
585
+ const exception = new InvalidRequestException({
586
+ $metadata: deserializeMetadata(parsedOutput),
587
+ ...contents
588
+ });
589
+ return decorateServiceException(exception, parsedOutput.body);
590
+ };
591
+ var de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
592
+ const contents = map({});
593
+ const data = parsedOutput.body;
594
+ const doc = take(data, {
595
+ message: expectString
596
+ });
597
+ Object.assign(contents, doc);
598
+ const exception = new ResourceNotFoundException({
599
+ $metadata: deserializeMetadata(parsedOutput),
600
+ ...contents
601
+ });
602
+ return decorateServiceException(exception, parsedOutput.body);
603
+ };
604
+ var de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
605
+ const contents = map({});
606
+ const data = parsedOutput.body;
607
+ const doc = take(data, {
608
+ message: expectString
609
+ });
610
+ Object.assign(contents, doc);
611
+ const exception = new TooManyRequestsException({
612
+ $metadata: deserializeMetadata(parsedOutput),
613
+ ...contents
614
+ });
615
+ return decorateServiceException(exception, parsedOutput.body);
616
+ };
617
+ var de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
618
+ const contents = map({});
619
+ const data = parsedOutput.body;
620
+ const doc = take(data, {
621
+ message: expectString
622
+ });
623
+ Object.assign(contents, doc);
624
+ const exception = new UnauthorizedException({
625
+ $metadata: deserializeMetadata(parsedOutput),
626
+ ...contents
627
+ });
628
+ return decorateServiceException(exception, parsedOutput.body);
629
+ };
630
+ var deserializeMetadata = (output) => ({
631
+ httpStatusCode: output.statusCode,
632
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
633
+ extendedRequestId: output.headers["x-amz-id-2"],
634
+ cfId: output.headers["x-amz-cf-id"]
635
+ });
636
+ var _aI = "accountId";
637
+ var _aT = "accessToken";
638
+ var _ai = "account_id";
639
+ var _rN = "roleName";
640
+ var _rn = "role_name";
641
+ var _xasbt = "x-amz-sso_bearer_token";
642
+
643
+ // node_modules/@aws-sdk/client-sso/dist-es/commands/GetRoleCredentialsCommand.js
644
+ var GetRoleCredentialsCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
645
+ return [
646
+ getSerdePlugin(config, this.serialize, this.deserialize),
647
+ getEndpointPlugin(config, Command2.getEndpointParameterInstructions())
648
+ ];
649
+ }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() {
650
+ };
651
+ export {
652
+ GetRoleCredentialsCommand,
653
+ SSOClient
654
+ };
655
+ //# sourceMappingURL=loadSso-3QBKTJF3.js.map