@digipair/skill-s3 0.136.0 → 0.136.3

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.
@@ -1,35 +1,18 @@
1
- import { v as extendedEncodeURIComponent, H as HttpRequest, w as decorateServiceException, x as resolveAwsSdkSigV4Config, y as normalizeProvider, z as getSmithyContext, A as EndpointCache, B as resolveEndpoint, D as awsEndpointFunctions, F as customEndpointFunctions, t as toUtf8, h as fromUtf8, p as parseUrl, N as NoOpLogger, G as AwsSdkSigV4Signer, J as toBase64, K as fromBase64, L as emitWarningIfUnsupportedVersion, M as resolveDefaultsModeConfig, O as emitWarningIfUnsupportedVersion$1, n as loadConfig, Q as NODE_APP_ID_CONFIG_OPTIONS, R as NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, S as NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, T as streamCollector, U as Hash, V as NodeHttpHandler, W as NODE_REGION_CONFIG_OPTIONS, X as NODE_MAX_ATTEMPT_CONFIG_OPTIONS, Y as createDefaultUserAgentProvider, Z as calculateBodyLength, _ as NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, $ as loadConfigsForDefaultMode, a0 as NODE_RETRY_MODE_CONFIG_OPTIONS, a1 as NODE_REGION_CONFIG_FILE_OPTIONS, a2 as DEFAULT_RETRY_MODE, a3 as getAwsRegionExtensionConfiguration, a4 as getDefaultExtensionConfiguration, a5 as getHttpHandlerExtensionConfiguration, a6 as resolveAwsRegionExtensionConfiguration, a7 as resolveDefaultRuntimeConfig, a8 as resolveHttpHandlerRuntimeConfig, a9 as resolveUserAgentConfig, aa as resolveRetryConfig, ab as resolveRegionConfig, ac as resolveEndpointConfig, ad as resolveHostHeaderConfig, ae as getUserAgentPlugin, af as getRetryPlugin, ag as getContentLengthPlugin, ah as getHostHeaderPlugin, ai as getLoggerPlugin, aj as getRecursionDetectionPlugin, ak as getHttpAuthSchemeEndpointRuleSetPlugin, al as getHttpSigningPlugin, am as Client, an as DefaultIdentityProviderConfig, ao as ServiceException, ap as expectNonNull, aq as expectObject, ar as expectString, as as Command, at as getSerdePlugin, au as getEndpointPlugin } from './index.esm3.js';
2
- import { p as parseJsonBody, l as loadRestJsonErrorCode, a as parseJsonErrorBody } from './parseJsonBody.esm.js';
3
- import { N as NoAuthSigner } from './noAuth.esm.js';
4
- import 'buffer';
5
- import 'path';
6
- import 'os';
1
+ import { a6 as resolveAwsSdkSigV4Config, a7 as normalizeProvider, a8 as getSmithyContext, a9 as EndpointCache, aa as awsEndpointFunctions, ab as customEndpointFunctions, ac as ServiceException, ad as TypeRegistry, t as toUtf8, i as fromUtf8, ae as parseUrl, af as NoOpLogger, ag as AwsSdkSigV4Signer, Z as toBase64, Q as fromBase64, ah as emitWarningIfUnsupportedVersion, ai as resolveDefaultsModeConfig, aj as emitWarningIfUnsupportedVersion$1, ak as loadConfig, al as NODE_APP_ID_CONFIG_OPTIONS, am as NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, an as NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, ao as streamCollector, ap as Hash, N as NodeHttpHandler, aq as NODE_REGION_CONFIG_OPTIONS, ar as NODE_MAX_ATTEMPT_CONFIG_OPTIONS, as as createDefaultUserAgentProvider, at as calculateBodyLength, au as NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, av as loadConfigsForDefaultMode, aw as NODE_RETRY_MODE_CONFIG_OPTIONS, ax as NODE_REGION_CONFIG_FILE_OPTIONS, ay as DEFAULT_RETRY_MODE, az as getAwsRegionExtensionConfiguration, aA as getDefaultExtensionConfiguration, aB as getHttpHandlerExtensionConfiguration, aC as resolveAwsRegionExtensionConfiguration, aD as resolveDefaultRuntimeConfig, aE as resolveHttpHandlerRuntimeConfig, aF as resolveUserAgentConfig, aG as resolveRetryConfig, aH as resolveRegionConfig, aI as resolveEndpointConfig, aJ as getSchemaSerdePlugin, aK as getUserAgentPlugin, aL as getRetryPlugin, aM as getContentLengthPlugin, aN as getHostHeaderPlugin, aO as getLoggerPlugin, aP as getRecursionDetectionPlugin, aQ as getHttpAuthSchemeEndpointRuleSetPlugin, aR as getHttpSigningPlugin, aS as resolveHostHeaderConfig, aT as Client, aU as DefaultIdentityProviderConfig, aV as Command, aW as getEndpointPlugin } from './index.esm3.js';
2
+ import { B as BinaryDecisionDiagram, d as decideEndpoint, N as NoAuthSigner, p as packageInfo } from './package.esm.js';
3
+ import { A as AwsRestJsonProtocol } from './AwsRestJsonProtocol.esm.js';
4
+ import 'node:crypto';
5
+ import 'node:path';
6
+ import 'node:os';
7
7
  import 'node:fs/promises';
8
- import 'stream';
9
- import 'crypto';
10
8
  import 'node:stream';
11
- import 'http';
12
- import 'https';
13
- import 'process';
9
+ import 'node:process';
10
+ import 'buffer';
14
11
  import 'node:fs';
15
- import 'zlib';
16
-
17
- var resolvedPath = function(resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) {
18
- if (input != null && input[memberName] !== undefined) {
19
- var labelValue = labelValueProvider();
20
- if (labelValue.length <= 0) {
21
- throw new Error("Empty value provided for input HTTP label: " + memberName + ".");
22
- }
23
- resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel ? labelValue.split("/").map(function(segment) {
24
- return extendedEncodeURIComponent(segment);
25
- }).join("/") : extendedEncodeURIComponent(labelValue));
26
- } else {
27
- throw new Error("No value provided for input HTTP label: " + memberName + ".");
28
- }
29
- return resolvedPath;
30
- };
12
+ import 'node:https';
13
+ import 'node:zlib';
31
14
 
32
- function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
15
+ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
33
16
  try {
34
17
  var info = gen[key](arg);
35
18
  var value = info.value;
@@ -43,53 +26,22 @@ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
43
26
  Promise.resolve(value).then(_next, _throw);
44
27
  }
45
28
  }
46
- function _async_to_generator$5(fn) {
29
+ function _async_to_generator$3(fn) {
47
30
  return function() {
48
31
  var self = this, args = arguments;
49
32
  return new Promise(function(resolve, reject) {
50
33
  var gen = fn.apply(self, args);
51
34
  function _next(value) {
52
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
35
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
53
36
  }
54
37
  function _throw(err) {
55
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
38
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
56
39
  }
57
40
  _next(undefined);
58
41
  });
59
42
  };
60
43
  }
61
- function _class_call_check$4(instance, Constructor) {
62
- if (!(instance instanceof Constructor)) {
63
- throw new TypeError("Cannot call a class as a function");
64
- }
65
- }
66
- function _defineProperties$1(target, props) {
67
- for(var i = 0; i < props.length; i++){
68
- var descriptor = props[i];
69
- descriptor.enumerable = descriptor.enumerable || false;
70
- descriptor.configurable = true;
71
- if ("value" in descriptor) descriptor.writable = true;
72
- Object.defineProperty(target, descriptor.key, descriptor);
73
- }
74
- }
75
- function _create_class$1(Constructor, protoProps, staticProps) {
76
- if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
77
- return Constructor;
78
- }
79
- function _define_property$5(obj, key, value) {
80
- if (key in obj) {
81
- Object.defineProperty(obj, key, {
82
- value: value,
83
- enumerable: true,
84
- configurable: true,
85
- writable: true
86
- });
87
- } else {
88
- obj[key] = value;
89
- }
90
- return obj;
91
- }
92
- function _ts_generator$5(thisArg, body) {
44
+ function _ts_generator$3(thisArg, body) {
93
45
  var f, y, t, g, _ = {
94
46
  label: 0,
95
47
  sent: function() {
@@ -184,828 +136,294 @@ function _ts_generator$5(thisArg, body) {
184
136
  };
185
137
  }
186
138
  }
187
- function requestBuilder(input, context) {
188
- return new RequestBuilder(input, context);
189
- }
190
- var RequestBuilder = /*#__PURE__*/ function() {
191
- function RequestBuilder(input, context) {
192
- _class_call_check$4(this, RequestBuilder);
193
- _define_property$5(this, "input", void 0);
194
- _define_property$5(this, "context", void 0);
195
- _define_property$5(this, "query", {});
196
- _define_property$5(this, "method", "");
197
- _define_property$5(this, "headers", {});
198
- _define_property$5(this, "path", "");
199
- _define_property$5(this, "body", null);
200
- _define_property$5(this, "hostname", "");
201
- _define_property$5(this, "resolvePathStack", []);
202
- this.input = input;
203
- this.context = context;
204
- }
205
- _create_class$1(RequestBuilder, [
206
- {
207
- key: "build",
208
- value: function build() {
209
- var _this = this;
210
- return _async_to_generator$5(function() {
211
- var _ref, hostname, _ref_protocol, protocol, port, basePath, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, resolvePath;
212
- return _ts_generator$5(this, function(_state) {
213
- switch(_state.label){
214
- case 0:
215
- return [
216
- 4,
217
- _this.context.endpoint()
218
- ];
219
- case 1:
220
- _ref = _state.sent(), hostname = _ref.hostname, _ref_protocol = _ref.protocol, protocol = _ref_protocol === void 0 ? "https" : _ref_protocol, port = _ref.port, basePath = _ref.path;
221
- _this.path = basePath;
222
- _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
223
- try {
224
- for(_iterator = _this.resolvePathStack[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
225
- resolvePath = _step.value;
226
- resolvePath(_this.path);
227
- }
228
- } catch (err) {
229
- _didIteratorError = true;
230
- _iteratorError = err;
231
- } finally{
232
- try {
233
- if (!_iteratorNormalCompletion && _iterator.return != null) {
234
- _iterator.return();
235
- }
236
- } finally{
237
- if (_didIteratorError) {
238
- throw _iteratorError;
239
- }
240
- }
241
- }
242
- return [
243
- 2,
244
- new HttpRequest({
245
- protocol: protocol,
246
- hostname: _this.hostname || hostname,
247
- port: port,
248
- method: _this.method,
249
- path: _this.path,
250
- query: _this.query,
251
- body: _this.body,
252
- headers: _this.headers
253
- })
254
- ];
255
- }
256
- });
257
- })();
258
- }
259
- },
260
- {
261
- key: "hn",
262
- value: function hn(hostname) {
263
- this.hostname = hostname;
264
- return this;
265
- }
266
- },
267
- {
268
- key: "bp",
269
- value: function bp(uriLabel) {
270
- var _this = this;
271
- this.resolvePathStack.push(function(basePath) {
272
- _this.path = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + uriLabel;
273
- });
274
- return this;
275
- }
276
- },
277
- {
278
- key: "p",
279
- value: function p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
280
- var _this = this;
281
- this.resolvePathStack.push(function(path) {
282
- _this.path = resolvedPath(path, _this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
283
- });
284
- return this;
285
- }
286
- },
287
- {
288
- key: "h",
289
- value: function h(headers) {
290
- this.headers = headers;
291
- return this;
292
- }
293
- },
294
- {
295
- key: "q",
296
- value: function q(query) {
297
- this.query = query;
298
- return this;
299
- }
300
- },
301
- {
302
- key: "b",
303
- value: function b(body) {
304
- this.body = body;
305
- return this;
306
- }
307
- },
308
- {
309
- key: "m",
310
- value: function m(method) {
311
- this.method = method;
312
- return this;
139
+ var defaultSSOHttpAuthSchemeParametersProvider = function() {
140
+ var _ref = _async_to_generator$3(function(config, context, input) {
141
+ var _tmp;
142
+ return _ts_generator$3(this, function(_state) {
143
+ switch(_state.label){
144
+ case 0:
145
+ _tmp = {
146
+ operation: getSmithyContext(context).operation
147
+ };
148
+ return [
149
+ 4,
150
+ normalizeProvider(config.region)()
151
+ ];
152
+ case 1:
153
+ return [
154
+ 2,
155
+ (_tmp.region = _state.sent() || function() {
156
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
157
+ }(), _tmp)
158
+ ];
313
159
  }
314
- }
315
- ]);
316
- return RequestBuilder;
317
- }();
318
-
319
- var SENSITIVE_STRING = "***SensitiveInformation***";
320
-
321
- var throwDefaultError$1 = function(param) {
322
- var output = param.output, parsedBody = param.parsedBody, exceptionCtor = param.exceptionCtor, errorCode = param.errorCode;
323
- var $metadata = deserializeMetadata$1(output);
324
- var statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
325
- var response = new exceptionCtor({
326
- name: (parsedBody === null || parsedBody === void 0 ? void 0 : parsedBody.code) || (parsedBody === null || parsedBody === void 0 ? void 0 : parsedBody.Code) || errorCode || statusCode || "UnknownError",
327
- $fault: "client",
328
- $metadata: $metadata
329
- });
330
- throw decorateServiceException(response, parsedBody);
331
- };
332
- var withBaseException = function(ExceptionCtor) {
333
- return function(param) {
334
- var output = param.output, parsedBody = param.parsedBody, errorCode = param.errorCode;
335
- throwDefaultError$1({
336
- output: output,
337
- parsedBody: parsedBody,
338
- exceptionCtor: ExceptionCtor,
339
- errorCode: errorCode
340
160
  });
161
+ });
162
+ return function defaultSSOHttpAuthSchemeParametersProvider(config, context, input) {
163
+ return _ref.apply(this, arguments);
341
164
  };
342
- };
343
- var deserializeMetadata$1 = function(output) {
344
- var _output_headers_xamznrequestid, _ref;
165
+ }();
166
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
345
167
  return {
346
- httpStatusCode: output.statusCode,
347
- requestId: (_ref = (_output_headers_xamznrequestid = output.headers["x-amzn-requestid"]) !== null && _output_headers_xamznrequestid !== void 0 ? _output_headers_xamznrequestid : output.headers["x-amzn-request-id"]) !== null && _ref !== void 0 ? _ref : output.headers["x-amz-request-id"],
348
- extendedRequestId: output.headers["x-amz-id-2"],
349
- cfId: output.headers["x-amz-cf-id"]
350
- };
351
- };
352
-
353
- var isSerializableHeaderValue = function(value) {
354
- return value != null;
355
- };
356
-
357
- function _array_like_to_array$1(arr, len) {
358
- if (len == null || len > arr.length) len = arr.length;
359
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
360
- return arr2;
361
- }
362
- function _array_with_holes$1(arr) {
363
- if (Array.isArray(arr)) return arr;
364
- }
365
- function _iterable_to_array_limit$1(arr, i) {
366
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
367
- if (_i == null) return;
368
- var _arr = [];
369
- var _n = true;
370
- var _d = false;
371
- var _s, _e;
372
- try {
373
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
374
- _arr.push(_s.value);
375
- if (i && _arr.length === i) break;
376
- }
377
- } catch (err) {
378
- _d = true;
379
- _e = err;
380
- } finally{
381
- try {
382
- if (!_n && _i["return"] != null) _i["return"]();
383
- } finally{
384
- if (_d) throw _e;
168
+ schemeId: "aws.auth#sigv4",
169
+ signingProperties: {
170
+ name: "awsssoportal",
171
+ region: authParameters.region
172
+ },
173
+ propertiesExtractor: function(config, context) {
174
+ return {
175
+ signingProperties: {
176
+ config: config,
177
+ context: context
178
+ }
179
+ };
385
180
  }
386
- }
387
- return _arr;
388
- }
389
- function _non_iterable_rest$1() {
390
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
181
+ };
391
182
  }
392
- function _sliced_to_array$1(arr, i) {
393
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
183
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
184
+ return {
185
+ schemeId: "smithy.api#noAuth"
186
+ };
394
187
  }
395
- function _unsupported_iterable_to_array$1(o, minLen) {
396
- if (!o) return;
397
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
398
- var n = Object.prototype.toString.call(o).slice(8, -1);
399
- if (n === "Object" && o.constructor) n = o.constructor.name;
400
- if (n === "Map" || n === "Set") return Array.from(n);
401
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
402
- }
403
- function map(arg0, arg1, arg2) {
404
- var target;
405
- var filter;
406
- var instructions;
407
- if (typeof arg1 === "undefined" && typeof arg2 === "undefined") {
408
- target = {};
409
- instructions = arg0;
410
- } else {
411
- target = arg0;
412
- if (typeof arg1 === "function") {
413
- filter = arg1;
414
- instructions = arg2;
415
- return mapWithFilter(target, filter, instructions);
416
- } else {
417
- instructions = arg1;
418
- }
419
- }
420
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
421
- try {
422
- for(var _iterator = Object.keys(instructions)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
423
- var key = _step.value;
424
- if (!Array.isArray(instructions[key])) {
425
- target[key] = instructions[key];
426
- continue;
427
- }
428
- applyInstruction(target, null, instructions, key);
429
- }
430
- } catch (err) {
431
- _didIteratorError = true;
432
- _iteratorError = err;
433
- } finally{
434
- try {
435
- if (!_iteratorNormalCompletion && _iterator.return != null) {
436
- _iterator.return();
437
- }
438
- } finally{
439
- if (_didIteratorError) {
440
- throw _iteratorError;
188
+ var defaultSSOHttpAuthSchemeProvider = function(authParameters) {
189
+ var options = [];
190
+ switch(authParameters.operation){
191
+ case "GetRoleCredentials":
192
+ {
193
+ options.push(createSmithyApiNoAuthHttpAuthOption());
194
+ break;
441
195
  }
442
- }
443
- }
444
- return target;
445
- }
446
- var take = function(source, instructions) {
447
- var out = {};
448
- for(var key in instructions){
449
- applyInstruction(out, source, instructions, key);
450
- }
451
- return out;
452
- };
453
- var mapWithFilter = function(target, filter, instructions) {
454
- return map(target, Object.entries(instructions).reduce(function(_instructions, param) {
455
- var _param = _sliced_to_array$1(param, 2), key = _param[0], value = _param[1];
456
- if (Array.isArray(value)) {
457
- _instructions[key] = value;
458
- } else {
459
- if (typeof value === "function") {
460
- _instructions[key] = [
461
- filter,
462
- value()
463
- ];
464
- } else {
465
- _instructions[key] = [
466
- filter,
467
- value
468
- ];
196
+ default:
197
+ {
198
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
469
199
  }
470
- }
471
- return _instructions;
472
- }, {}));
473
- };
474
- var applyInstruction = function(target, source, instructions, targetKey) {
475
- if (source !== null) {
476
- var instruction = instructions[targetKey];
477
- if (typeof instruction === "function") {
478
- instruction = [
479
- ,
480
- instruction
481
- ];
482
- }
483
- var _instruction = _sliced_to_array$1(instruction, 3), tmp = _instruction[0], filter = tmp === void 0 ? nonNullish : tmp, tmp1 = _instruction[1], valueFn = tmp1 === void 0 ? pass : tmp1, tmp2 = _instruction[2], sourceKey = tmp2 === void 0 ? targetKey : tmp2;
484
- if (typeof filter === "function" && filter(source[sourceKey]) || typeof filter !== "function" && !!filter) {
485
- target[targetKey] = valueFn(source[sourceKey]);
486
- }
487
- return;
488
- }
489
- var _instructions_targetKey = _sliced_to_array$1(instructions[targetKey], 2), filter1 = _instructions_targetKey[0], value = _instructions_targetKey[1];
490
- if (typeof value === "function") {
491
- var _value;
492
- var defaultFilterPassed = filter1 === undefined && (_value = value()) != null;
493
- var customFilterPassed = typeof filter1 === "function" && !!filter1(void 0) || typeof filter1 !== "function" && !!filter1;
494
- if (defaultFilterPassed) {
495
- target[targetKey] = _value;
496
- } else if (customFilterPassed) {
497
- target[targetKey] = value();
498
- }
499
- } else {
500
- var defaultFilterPassed1 = filter1 === undefined && value != null;
501
- var customFilterPassed1 = typeof filter1 === "function" && !!filter1(value) || typeof filter1 !== "function" && !!filter1;
502
- if (defaultFilterPassed1 || customFilterPassed1) {
503
- target[targetKey] = value;
504
- }
505
200
  }
201
+ return options;
506
202
  };
507
- var nonNullish = function(_) {
508
- return _ != null;
509
- };
510
- var pass = function(_) {
511
- return _;
203
+ var resolveHttpAuthSchemeConfig = function(config) {
204
+ var config_0 = resolveAwsSdkSigV4Config(config);
205
+ var _config_authSchemePreference;
206
+ return Object.assign(config_0, {
207
+ authSchemePreference: normalizeProvider((_config_authSchemePreference = config.authSchemePreference) !== null && _config_authSchemePreference !== void 0 ? _config_authSchemePreference : [])
208
+ });
512
209
  };
513
210
 
514
- function _type_of$4(obj) {
515
- "@swc/helpers - typeof";
516
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
517
- }
518
- var _json = function(obj) {
519
- if (obj == null) {
520
- return {};
521
- }
522
- if (Array.isArray(obj)) {
523
- return obj.filter(function(_) {
524
- return _ != null;
525
- }).map(_json);
526
- }
527
- if ((typeof obj === "undefined" ? "undefined" : _type_of$4(obj)) === "object") {
528
- var target = {};
529
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
530
- try {
531
- for(var _iterator = Object.keys(obj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
532
- var key = _step.value;
533
- if (obj[key] == null) {
534
- continue;
535
- }
536
- target[key] = _json(obj[key]);
537
- }
538
- } catch (err) {
539
- _didIteratorError = true;
540
- _iteratorError = err;
541
- } finally{
542
- try {
543
- if (!_iteratorNormalCompletion && _iterator.return != null) {
544
- _iterator.return();
545
- }
546
- } finally{
547
- if (_didIteratorError) {
548
- throw _iteratorError;
549
- }
550
- }
551
- }
552
- return target;
211
+ var resolveClientEndpointParameters = function(options) {
212
+ var _options_useDualstackEndpoint, _options_useFipsEndpoint;
213
+ return Object.assign(options, {
214
+ useDualstackEndpoint: (_options_useDualstackEndpoint = options.useDualstackEndpoint) !== null && _options_useDualstackEndpoint !== void 0 ? _options_useDualstackEndpoint : false,
215
+ useFipsEndpoint: (_options_useFipsEndpoint = options.useFipsEndpoint) !== null && _options_useFipsEndpoint !== void 0 ? _options_useFipsEndpoint : false,
216
+ defaultSigningName: "awsssoportal"
217
+ });
218
+ };
219
+ var commonParams = {
220
+ UseFIPS: {
221
+ type: "builtInParams",
222
+ name: "useFipsEndpoint"
223
+ },
224
+ Endpoint: {
225
+ type: "builtInParams",
226
+ name: "endpoint"
227
+ },
228
+ Region: {
229
+ type: "builtInParams",
230
+ name: "region"
231
+ },
232
+ UseDualStack: {
233
+ type: "builtInParams",
234
+ name: "useDualstackEndpoint"
553
235
  }
554
- return obj;
555
236
  };
556
237
 
557
- function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
558
- try {
559
- var info = gen[key](arg);
560
- var value = info.value;
561
- } catch (error) {
562
- reject(error);
563
- return;
564
- }
565
- if (info.done) {
566
- resolve(value);
238
+ function _define_property$4(obj, key, value) {
239
+ if (key in obj) {
240
+ Object.defineProperty(obj, key, {
241
+ value: value,
242
+ enumerable: true,
243
+ configurable: true,
244
+ writable: true
245
+ });
567
246
  } else {
568
- Promise.resolve(value).then(_next, _throw);
569
- }
570
- }
571
- function _async_to_generator$4(fn) {
572
- return function() {
573
- var self = this, args = arguments;
574
- return new Promise(function(resolve, reject) {
575
- var gen = fn.apply(self, args);
576
- function _next(value) {
577
- asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
578
- }
579
- function _throw(err) {
580
- asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "throw", err);
581
- }
582
- _next(undefined);
583
- });
584
- };
585
- }
586
- function _ts_generator$4(thisArg, body) {
587
- var f, y, t, g, _ = {
588
- label: 0,
589
- sent: function() {
590
- if (t[0] & 1) throw t[1];
591
- return t[1];
592
- },
593
- trys: [],
594
- ops: []
595
- };
596
- return g = {
597
- next: verb(0),
598
- "throw": verb(1),
599
- "return": verb(2)
600
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
601
- return this;
602
- }), g;
603
- function verb(n) {
604
- return function(v) {
605
- return step([
606
- n,
607
- v
608
- ]);
609
- };
610
- }
611
- function step(op) {
612
- if (f) throw new TypeError("Generator is already executing.");
613
- while(_)try {
614
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
615
- if (y = 0, t) op = [
616
- op[0] & 2,
617
- t.value
618
- ];
619
- switch(op[0]){
620
- case 0:
621
- case 1:
622
- t = op;
623
- break;
624
- case 4:
625
- _.label++;
626
- return {
627
- value: op[1],
628
- done: false
629
- };
630
- case 5:
631
- _.label++;
632
- y = op[1];
633
- op = [
634
- 0
635
- ];
636
- continue;
637
- case 7:
638
- op = _.ops.pop();
639
- _.trys.pop();
640
- continue;
641
- default:
642
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
643
- _ = 0;
644
- continue;
645
- }
646
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
647
- _.label = op[1];
648
- break;
649
- }
650
- if (op[0] === 6 && _.label < t[1]) {
651
- _.label = t[1];
652
- t = op;
653
- break;
654
- }
655
- if (t && _.label < t[2]) {
656
- _.label = t[2];
657
- _.ops.push(op);
658
- break;
659
- }
660
- if (t[2]) _.ops.pop();
661
- _.trys.pop();
662
- continue;
663
- }
664
- op = body.call(thisArg, _);
665
- } catch (e) {
666
- op = [
667
- 6,
668
- e
669
- ];
670
- y = 0;
671
- } finally{
672
- f = t = 0;
673
- }
674
- if (op[0] & 5) throw op[1];
675
- return {
676
- value: op[0] ? op[1] : void 0,
677
- done: true
678
- };
679
- }
680
- }
681
- var defaultSSOHttpAuthSchemeParametersProvider = function() {
682
- var _ref = _async_to_generator$4(function(config, context, input) {
683
- var _tmp;
684
- return _ts_generator$4(this, function(_state) {
685
- switch(_state.label){
686
- case 0:
687
- _tmp = {
688
- operation: getSmithyContext(context).operation
689
- };
690
- return [
691
- 4,
692
- normalizeProvider(config.region)()
693
- ];
694
- case 1:
695
- return [
696
- 2,
697
- (_tmp.region = _state.sent() || function() {
698
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
699
- }(), _tmp)
700
- ];
701
- }
702
- });
703
- });
704
- return function defaultSSOHttpAuthSchemeParametersProvider(config, context, input) {
705
- return _ref.apply(this, arguments);
706
- };
707
- }();
708
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
709
- return {
710
- schemeId: "aws.auth#sigv4",
711
- signingProperties: {
712
- name: "awsssoportal",
713
- region: authParameters.region
714
- },
715
- propertiesExtractor: function(config, context) {
716
- return {
717
- signingProperties: {
718
- config: config,
719
- context: context
720
- }
721
- };
722
- }
723
- };
724
- }
725
- function createSmithyApiNoAuthHttpAuthOption(authParameters) {
726
- return {
727
- schemeId: "smithy.api#noAuth"
728
- };
729
- }
730
- var defaultSSOHttpAuthSchemeProvider = function(authParameters) {
731
- var options = [];
732
- switch(authParameters.operation){
733
- case "GetRoleCredentials":
734
- {
735
- options.push(createSmithyApiNoAuthHttpAuthOption());
736
- break;
737
- }
738
- case "ListAccountRoles":
739
- {
740
- options.push(createSmithyApiNoAuthHttpAuthOption());
741
- break;
742
- }
743
- case "ListAccounts":
744
- {
745
- options.push(createSmithyApiNoAuthHttpAuthOption());
746
- break;
747
- }
748
- case "Logout":
749
- {
750
- options.push(createSmithyApiNoAuthHttpAuthOption());
751
- break;
752
- }
753
- default:
754
- {
755
- options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
756
- }
757
- }
758
- return options;
759
- };
760
- var resolveHttpAuthSchemeConfig = function(config) {
761
- var config_0 = resolveAwsSdkSigV4Config(config);
762
- var _config_authSchemePreference;
763
- return Object.assign(config_0, {
764
- authSchemePreference: normalizeProvider((_config_authSchemePreference = config.authSchemePreference) !== null && _config_authSchemePreference !== void 0 ? _config_authSchemePreference : [])
765
- });
766
- };
767
-
768
- var resolveClientEndpointParameters = function(options) {
769
- var _options_useDualstackEndpoint, _options_useFipsEndpoint;
770
- return Object.assign(options, {
771
- useDualstackEndpoint: (_options_useDualstackEndpoint = options.useDualstackEndpoint) !== null && _options_useDualstackEndpoint !== void 0 ? _options_useDualstackEndpoint : false,
772
- useFipsEndpoint: (_options_useFipsEndpoint = options.useFipsEndpoint) !== null && _options_useFipsEndpoint !== void 0 ? _options_useFipsEndpoint : false,
773
- defaultSigningName: "awsssoportal"
774
- });
775
- };
776
- var commonParams = {
777
- UseFIPS: {
778
- type: "builtInParams",
779
- name: "useFipsEndpoint"
780
- },
781
- Endpoint: {
782
- type: "builtInParams",
783
- name: "endpoint"
784
- },
785
- Region: {
786
- type: "builtInParams",
787
- name: "region"
788
- },
789
- UseDualStack: {
790
- type: "builtInParams",
791
- name: "useDualstackEndpoint"
792
- }
793
- };
794
-
795
- var version = "3.911.0";
796
- var packageInfo = {
797
- version: version};
798
-
799
- function _define_property$4(obj, key, value) {
800
- if (key in obj) {
801
- Object.defineProperty(obj, key, {
802
- value: value,
803
- enumerable: true,
804
- configurable: true,
805
- writable: true
806
- });
807
- } else {
808
- obj[key] = value;
247
+ obj[key] = value;
809
248
  }
810
249
  return obj;
811
250
  }
812
- var u = "required", v = "fn", w = "argv", x = "ref";
813
- var _obj, _obj1, _obj2, _obj3, _obj4, _obj5, _obj6;
814
- var a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = (_obj = {}, _define_property$4(_obj, u, false), _define_property$4(_obj, "type", "String"), _obj), j = (_obj1 = {}, _define_property$4(_obj1, u, true), _define_property$4(_obj1, "default", false), _define_property$4(_obj1, "type", "Boolean"), _obj1), k = _define_property$4({}, x, "Endpoint"), l = (_obj2 = {}, _define_property$4(_obj2, v, c), _define_property$4(_obj2, w, [
815
- _define_property$4({}, x, "UseFIPS"),
816
- true
817
- ]), _obj2), m = (_obj3 = {}, _define_property$4(_obj3, v, c), _define_property$4(_obj3, w, [
818
- _define_property$4({}, x, "UseDualStack"),
819
- true
820
- ]), _obj3), n = {}, o = (_obj4 = {}, _define_property$4(_obj4, v, h), _define_property$4(_obj4, w, [
821
- _define_property$4({}, x, g),
822
- "supportsFIPS"
823
- ]), _obj4), p = _define_property$4({}, x, g), q = (_obj6 = {}, _define_property$4(_obj6, v, c), _define_property$4(_obj6, w, [
824
- true,
825
- (_obj5 = {}, _define_property$4(_obj5, v, h), _define_property$4(_obj5, w, [
826
- p,
827
- "supportsDualStack"
828
- ]), _obj5)
829
- ]), _obj6), r = [
830
- l
831
- ], s = [
832
- m
833
- ], t = [
834
- _define_property$4({}, x, "Region")
251
+ var k = "ref";
252
+ var a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = _define_property$4({}, k, "Endpoint"), h = _define_property$4({}, k, d), i = {}, j = [
253
+ _define_property$4({}, k, "Region")
835
254
  ];
836
- var _obj7, _obj8, _obj9, _obj10, _obj11, _obj12, _obj13;
837
255
  var _data = {
838
- parameters: {
839
- Region: i,
840
- UseDualStack: j,
841
- UseFIPS: j,
842
- Endpoint: i
843
- },
844
- rules: [
845
- {
846
- conditions: [
847
- (_obj7 = {}, _define_property$4(_obj7, v, b), _define_property$4(_obj7, w, [
848
- k
849
- ]), _obj7)
850
- ],
851
- rules: [
256
+ conditions: [
257
+ [
258
+ c,
259
+ [
260
+ g
261
+ ]
262
+ ],
263
+ [
264
+ c,
265
+ j
266
+ ],
267
+ [
268
+ "aws.partition",
269
+ j,
270
+ d
271
+ ],
272
+ [
273
+ e,
274
+ [
275
+ _define_property$4({}, k, "UseFIPS"),
276
+ b
277
+ ]
278
+ ],
279
+ [
280
+ e,
281
+ [
282
+ _define_property$4({}, k, "UseDualStack"),
283
+ b
284
+ ]
285
+ ],
286
+ [
287
+ e,
288
+ [
852
289
  {
853
- conditions: r,
854
- error: "Invalid Configuration: FIPS and custom endpoint are not supported",
855
- type: d
290
+ fn: f,
291
+ argv: [
292
+ h,
293
+ "supportsDualStack"
294
+ ]
856
295
  },
296
+ b
297
+ ]
298
+ ],
299
+ [
300
+ e,
301
+ [
857
302
  {
858
- conditions: s,
859
- error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
860
- type: d
303
+ fn: f,
304
+ argv: [
305
+ h,
306
+ "supportsFIPS"
307
+ ]
861
308
  },
309
+ b
310
+ ]
311
+ ],
312
+ [
313
+ "stringEquals",
314
+ [
862
315
  {
863
- endpoint: {
864
- url: k,
865
- properties: n,
866
- headers: n
867
- },
868
- type: e
869
- }
870
- ],
871
- type: f
872
- },
873
- {
874
- conditions: [
875
- (_obj8 = {}, _define_property$4(_obj8, v, b), _define_property$4(_obj8, w, t), _obj8)
876
- ],
877
- rules: [
878
- {
879
- conditions: [
880
- (_obj9 = {}, _define_property$4(_obj9, v, "aws.partition"), _define_property$4(_obj9, w, t), _define_property$4(_obj9, "assign", g), _obj9)
881
- ],
882
- rules: [
883
- {
884
- conditions: [
885
- l,
886
- m
887
- ],
888
- rules: [
889
- {
890
- conditions: [
891
- (_obj10 = {}, _define_property$4(_obj10, v, c), _define_property$4(_obj10, w, [
892
- a,
893
- o
894
- ]), _obj10),
895
- q
896
- ],
897
- rules: [
898
- {
899
- endpoint: {
900
- url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
901
- properties: n,
902
- headers: n
903
- },
904
- type: e
905
- }
906
- ],
907
- type: f
908
- },
909
- {
910
- error: "FIPS and DualStack are enabled, but this partition does not support one or both",
911
- type: d
912
- }
913
- ],
914
- type: f
915
- },
916
- {
917
- conditions: r,
918
- rules: [
919
- {
920
- conditions: [
921
- (_obj11 = {}, _define_property$4(_obj11, v, c), _define_property$4(_obj11, w, [
922
- o,
923
- a
924
- ]), _obj11)
925
- ],
926
- rules: [
927
- {
928
- conditions: [
929
- (_obj13 = {}, _define_property$4(_obj13, v, "stringEquals"), _define_property$4(_obj13, w, [
930
- (_obj12 = {}, _define_property$4(_obj12, v, h), _define_property$4(_obj12, w, [
931
- p,
932
- "name"
933
- ]), _obj12),
934
- "aws-us-gov"
935
- ]), _obj13)
936
- ],
937
- endpoint: {
938
- url: "https://portal.sso.{Region}.amazonaws.com",
939
- properties: n,
940
- headers: n
941
- },
942
- type: e
943
- },
944
- {
945
- endpoint: {
946
- url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",
947
- properties: n,
948
- headers: n
949
- },
950
- type: e
951
- }
952
- ],
953
- type: f
954
- },
955
- {
956
- error: "FIPS is enabled but this partition does not support FIPS",
957
- type: d
958
- }
959
- ],
960
- type: f
961
- },
962
- {
963
- conditions: s,
964
- rules: [
965
- {
966
- conditions: [
967
- q
968
- ],
969
- rules: [
970
- {
971
- endpoint: {
972
- url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",
973
- properties: n,
974
- headers: n
975
- },
976
- type: e
977
- }
978
- ],
979
- type: f
980
- },
981
- {
982
- error: "DualStack is enabled but this partition does not support DualStack",
983
- type: d
984
- }
985
- ],
986
- type: f
987
- },
988
- {
989
- endpoint: {
990
- url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",
991
- properties: n,
992
- headers: n
993
- },
994
- type: e
995
- }
996
- ],
997
- type: f
998
- }
999
- ],
1000
- type: f
1001
- },
1002
- {
1003
- error: "Invalid Configuration: Missing Region",
1004
- type: d
1005
- }
316
+ fn: f,
317
+ argv: [
318
+ h,
319
+ "name"
320
+ ]
321
+ },
322
+ "aws-us-gov"
323
+ ]
324
+ ]
325
+ ],
326
+ results: [
327
+ [
328
+ a
329
+ ],
330
+ [
331
+ a,
332
+ "Invalid Configuration: FIPS and custom endpoint are not supported"
333
+ ],
334
+ [
335
+ a,
336
+ "Invalid Configuration: Dualstack and custom endpoint are not supported"
337
+ ],
338
+ [
339
+ g,
340
+ i
341
+ ],
342
+ [
343
+ "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
344
+ i
345
+ ],
346
+ [
347
+ a,
348
+ "FIPS and DualStack are enabled, but this partition does not support one or both"
349
+ ],
350
+ [
351
+ "https://portal.sso.{Region}.amazonaws.com",
352
+ i
353
+ ],
354
+ [
355
+ "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",
356
+ i
357
+ ],
358
+ [
359
+ a,
360
+ "FIPS is enabled but this partition does not support FIPS"
361
+ ],
362
+ [
363
+ "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",
364
+ i
365
+ ],
366
+ [
367
+ a,
368
+ "DualStack is enabled but this partition does not support DualStack"
369
+ ],
370
+ [
371
+ "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",
372
+ i
373
+ ],
374
+ [
375
+ a,
376
+ "Invalid Configuration: Missing Region"
377
+ ]
1006
378
  ]
1007
379
  };
1008
- var ruleSet = _data;
380
+ var root = 2;
381
+ var r = 100000000;
382
+ var nodes = new Int32Array([
383
+ -1,
384
+ 1,
385
+ -1,
386
+ 0,
387
+ 13,
388
+ 3,
389
+ 1,
390
+ 4,
391
+ r + 12,
392
+ 2,
393
+ 5,
394
+ r + 12,
395
+ 3,
396
+ 8,
397
+ 6,
398
+ 4,
399
+ 7,
400
+ r + 11,
401
+ 5,
402
+ r + 9,
403
+ r + 10,
404
+ 4,
405
+ 11,
406
+ 9,
407
+ 6,
408
+ 10,
409
+ r + 8,
410
+ 7,
411
+ r + 6,
412
+ r + 7,
413
+ 5,
414
+ 12,
415
+ r + 5,
416
+ 6,
417
+ r + 4,
418
+ r + 5,
419
+ 3,
420
+ r + 1,
421
+ 14,
422
+ 4,
423
+ r + 2,
424
+ r + 3
425
+ ]);
426
+ var bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
1009
427
 
1010
428
  var cache = new EndpointCache({
1011
429
  size: 50,
@@ -1019,7 +437,7 @@ var cache = new EndpointCache({
1019
437
  var defaultEndpointResolver = function(endpointParams) {
1020
438
  var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1021
439
  return cache.get(endpointParams, function() {
1022
- return resolveEndpoint(ruleSet, {
440
+ return decideEndpoint(bdd, {
1023
441
  endpointParams: endpointParams,
1024
442
  logger: context.logger
1025
443
  });
@@ -1027,200 +445,101 @@ var defaultEndpointResolver = function(endpointParams) {
1027
445
  };
1028
446
  customEndpointFunctions.aws = awsEndpointFunctions;
1029
447
 
1030
- function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
1031
- try {
1032
- var info = gen[key](arg);
1033
- var value = info.value;
1034
- } catch (error) {
1035
- reject(error);
1036
- return;
448
+ function _assert_this_initialized$3(self) {
449
+ if (self === void 0) {
450
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1037
451
  }
1038
- if (info.done) {
1039
- resolve(value);
1040
- } else {
1041
- Promise.resolve(value).then(_next, _throw);
452
+ return self;
453
+ }
454
+ function _class_call_check$3(instance, Constructor) {
455
+ if (!(instance instanceof Constructor)) {
456
+ throw new TypeError("Cannot call a class as a function");
1042
457
  }
1043
458
  }
1044
- function _async_to_generator$3(fn) {
1045
- return function() {
1046
- var self = this, args = arguments;
1047
- return new Promise(function(resolve, reject) {
1048
- var gen = fn.apply(self, args);
1049
- function _next(value) {
1050
- asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
1051
- }
1052
- function _throw(err) {
1053
- asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
1054
- }
1055
- _next(undefined);
1056
- });
459
+ function _get_prototype_of$3(o) {
460
+ _get_prototype_of$3 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
461
+ return o.__proto__ || Object.getPrototypeOf(o);
1057
462
  };
463
+ return _get_prototype_of$3(o);
1058
464
  }
1059
- function _ts_generator$3(thisArg, body) {
1060
- var f, y, t, g, _ = {
1061
- label: 0,
1062
- sent: function() {
1063
- if (t[0] & 1) throw t[1];
1064
- return t[1];
1065
- },
1066
- trys: [],
1067
- ops: []
1068
- };
1069
- return g = {
1070
- next: verb(0),
1071
- "throw": verb(1),
1072
- "return": verb(2)
1073
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
1074
- return this;
1075
- }), g;
1076
- function verb(n) {
1077
- return function(v) {
1078
- return step([
1079
- n,
1080
- v
1081
- ]);
1082
- };
465
+ function _inherits$3(subClass, superClass) {
466
+ if (typeof superClass !== "function" && superClass !== null) {
467
+ throw new TypeError("Super expression must either be null or a function");
1083
468
  }
1084
- function step(op) {
1085
- if (f) throw new TypeError("Generator is already executing.");
1086
- while(_)try {
1087
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1088
- if (y = 0, t) op = [
1089
- op[0] & 2,
1090
- t.value
1091
- ];
1092
- switch(op[0]){
1093
- case 0:
1094
- case 1:
1095
- t = op;
1096
- break;
1097
- case 4:
1098
- _.label++;
1099
- return {
1100
- value: op[1],
1101
- done: false
1102
- };
1103
- case 5:
1104
- _.label++;
1105
- y = op[1];
1106
- op = [
1107
- 0
1108
- ];
1109
- continue;
1110
- case 7:
1111
- op = _.ops.pop();
1112
- _.trys.pop();
1113
- continue;
1114
- default:
1115
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
1116
- _ = 0;
1117
- continue;
1118
- }
1119
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
1120
- _.label = op[1];
1121
- break;
1122
- }
1123
- if (op[0] === 6 && _.label < t[1]) {
1124
- _.label = t[1];
1125
- t = op;
1126
- break;
1127
- }
1128
- if (t && _.label < t[2]) {
1129
- _.label = t[2];
1130
- _.ops.push(op);
1131
- break;
1132
- }
1133
- if (t[2]) _.ops.pop();
1134
- _.trys.pop();
1135
- continue;
1136
- }
1137
- op = body.call(thisArg, _);
1138
- } catch (e) {
1139
- op = [
1140
- 6,
1141
- e
1142
- ];
1143
- y = 0;
1144
- } finally{
1145
- f = t = 0;
469
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
470
+ constructor: {
471
+ value: subClass,
472
+ writable: true,
473
+ configurable: true
1146
474
  }
1147
- if (op[0] & 5) throw op[1];
1148
- return {
1149
- value: op[0] ? op[1] : void 0,
1150
- done: true
1151
- };
1152
- }
475
+ });
476
+ if (superClass) _set_prototype_of$3(subClass, superClass);
1153
477
  }
1154
- var getRuntimeConfig$1 = function(config) {
1155
- var _config_base64Decoder, _config_base64Encoder, _config_disableHostPrefix, _config_endpointProvider, _config_extensions, _config_httpAuthSchemeProvider, _config_httpAuthSchemes, _config_logger, _config_serviceId, _config_urlParser, _config_utf8Decoder, _config_utf8Encoder;
1156
- return {
1157
- apiVersion: "2019-06-10",
1158
- base64Decoder: (_config_base64Decoder = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _config_base64Decoder !== void 0 ? _config_base64Decoder : fromBase64,
1159
- base64Encoder: (_config_base64Encoder = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _config_base64Encoder !== void 0 ? _config_base64Encoder : toBase64,
1160
- disableHostPrefix: (_config_disableHostPrefix = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _config_disableHostPrefix !== void 0 ? _config_disableHostPrefix : false,
1161
- endpointProvider: (_config_endpointProvider = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _config_endpointProvider !== void 0 ? _config_endpointProvider : defaultEndpointResolver,
1162
- extensions: (_config_extensions = config === null || config === void 0 ? void 0 : config.extensions) !== null && _config_extensions !== void 0 ? _config_extensions : [],
1163
- httpAuthSchemeProvider: (_config_httpAuthSchemeProvider = config === null || config === void 0 ? void 0 : config.httpAuthSchemeProvider) !== null && _config_httpAuthSchemeProvider !== void 0 ? _config_httpAuthSchemeProvider : defaultSSOHttpAuthSchemeProvider,
1164
- httpAuthSchemes: (_config_httpAuthSchemes = config === null || config === void 0 ? void 0 : config.httpAuthSchemes) !== null && _config_httpAuthSchemes !== void 0 ? _config_httpAuthSchemes : [
1165
- {
1166
- schemeId: "aws.auth#sigv4",
1167
- identityProvider: function(ipc) {
1168
- return ipc.getIdentityProvider("aws.auth#sigv4");
1169
- },
1170
- signer: new AwsSdkSigV4Signer()
1171
- },
1172
- {
1173
- schemeId: "smithy.api#noAuth",
1174
- identityProvider: function(ipc) {
1175
- return ipc.getIdentityProvider("smithy.api#noAuth") || /*#__PURE__*/ _async_to_generator$3(function() {
1176
- return _ts_generator$3(this, function(_state) {
1177
- return [
1178
- 2,
1179
- {}
1180
- ];
1181
- });
1182
- });
1183
- },
1184
- signer: new NoAuthSigner()
1185
- }
1186
- ],
1187
- logger: (_config_logger = config === null || config === void 0 ? void 0 : config.logger) !== null && _config_logger !== void 0 ? _config_logger : new NoOpLogger(),
1188
- serviceId: (_config_serviceId = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _config_serviceId !== void 0 ? _config_serviceId : "SSO",
1189
- urlParser: (_config_urlParser = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _config_urlParser !== void 0 ? _config_urlParser : parseUrl,
1190
- utf8Decoder: (_config_utf8Decoder = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _config_utf8Decoder !== void 0 ? _config_utf8Decoder : fromUtf8,
1191
- utf8Encoder: (_config_utf8Encoder = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _config_utf8Encoder !== void 0 ? _config_utf8Encoder : toUtf8
478
+ function _possible_constructor_return$3(self, call) {
479
+ if (call && (_type_of$3(call) === "object" || typeof call === "function")) {
480
+ return call;
481
+ }
482
+ return _assert_this_initialized$3(self);
483
+ }
484
+ function _set_prototype_of$3(o, p) {
485
+ _set_prototype_of$3 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
486
+ o.__proto__ = p;
487
+ return o;
1192
488
  };
1193
- };
1194
-
1195
- function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
489
+ return _set_prototype_of$3(o, p);
490
+ }
491
+ function _type_of$3(obj) {
492
+ "@swc/helpers - typeof";
493
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
494
+ }
495
+ function _is_native_reflect_construct$3() {
496
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
497
+ if (Reflect.construct.sham) return false;
498
+ if (typeof Proxy === "function") return true;
1196
499
  try {
1197
- var info = gen[key](arg);
1198
- var value = info.value;
1199
- } catch (error) {
1200
- reject(error);
1201
- return;
1202
- }
1203
- if (info.done) {
1204
- resolve(value);
1205
- } else {
1206
- Promise.resolve(value).then(_next, _throw);
500
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
501
+ return true;
502
+ } catch (e) {
503
+ return false;
1207
504
  }
1208
505
  }
1209
- function _async_to_generator$2(fn) {
1210
- return function() {
1211
- var self = this, args = arguments;
1212
- return new Promise(function(resolve, reject) {
1213
- var gen = fn.apply(self, args);
1214
- function _next(value) {
1215
- asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value);
1216
- }
1217
- function _throw(err) {
1218
- asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err);
1219
- }
1220
- _next(undefined);
1221
- });
506
+ function _create_super$3(Derived) {
507
+ var hasNativeReflectConstruct = _is_native_reflect_construct$3();
508
+ return function _createSuperInternal() {
509
+ var Super = _get_prototype_of$3(Derived), result;
510
+ if (hasNativeReflectConstruct) {
511
+ var NewTarget = _get_prototype_of$3(this).constructor;
512
+ result = Reflect.construct(Super, arguments, NewTarget);
513
+ } else {
514
+ result = Super.apply(this, arguments);
515
+ }
516
+ return _possible_constructor_return$3(this, result);
1222
517
  };
1223
518
  }
519
+ var SSOServiceException = /*#__PURE__*/ function(__ServiceException) {
520
+ _inherits$3(SSOServiceException, __ServiceException);
521
+ var _super = _create_super$3(SSOServiceException);
522
+ function SSOServiceException(options) {
523
+ _class_call_check$3(this, SSOServiceException);
524
+ var _this;
525
+ _this = _super.call(this, options);
526
+ Object.setPrototypeOf(_assert_this_initialized$3(_this), SSOServiceException.prototype);
527
+ return _this;
528
+ }
529
+ return SSOServiceException;
530
+ }(ServiceException);
531
+
532
+ function _assert_this_initialized$2(self) {
533
+ if (self === void 0) {
534
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
535
+ }
536
+ return self;
537
+ }
538
+ function _class_call_check$2(instance, Constructor) {
539
+ if (!(instance instanceof Constructor)) {
540
+ throw new TypeError("Cannot call a class as a function");
541
+ }
542
+ }
1224
543
  function _define_property$3(obj, key, value) {
1225
544
  if (key in obj) {
1226
545
  Object.defineProperty(obj, key, {
@@ -1234,7 +553,26 @@ function _define_property$3(obj, key, value) {
1234
553
  }
1235
554
  return obj;
1236
555
  }
1237
- function _object_spread$2(target) {
556
+ function _get_prototype_of$2(o) {
557
+ _get_prototype_of$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
558
+ return o.__proto__ || Object.getPrototypeOf(o);
559
+ };
560
+ return _get_prototype_of$2(o);
561
+ }
562
+ function _inherits$2(subClass, superClass) {
563
+ if (typeof superClass !== "function" && superClass !== null) {
564
+ throw new TypeError("Super expression must either be null or a function");
565
+ }
566
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
567
+ constructor: {
568
+ value: subClass,
569
+ writable: true,
570
+ configurable: true
571
+ }
572
+ });
573
+ if (superClass) _set_prototype_of$2(subClass, superClass);
574
+ }
575
+ function _object_spread$1(target) {
1238
576
  for(var i = 1; i < arguments.length; i++){
1239
577
  var source = arguments[i] != null ? arguments[i] : {};
1240
578
  var ownKeys = Object.keys(source);
@@ -1249,24 +587,370 @@ function _object_spread$2(target) {
1249
587
  }
1250
588
  return target;
1251
589
  }
1252
- function ownKeys$1(object, enumerableOnly) {
1253
- var keys = Object.keys(object);
1254
- if (Object.getOwnPropertySymbols) {
1255
- var symbols = Object.getOwnPropertySymbols(object);
1256
- keys.push.apply(keys, symbols);
590
+ function _possible_constructor_return$2(self, call) {
591
+ if (call && (_type_of$2(call) === "object" || typeof call === "function")) {
592
+ return call;
1257
593
  }
1258
- return keys;
594
+ return _assert_this_initialized$2(self);
1259
595
  }
1260
- function _object_spread_props$1(target, source) {
1261
- source = source != null ? source : {};
1262
- if (Object.getOwnPropertyDescriptors) {
1263
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
596
+ function _set_prototype_of$2(o, p) {
597
+ _set_prototype_of$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
598
+ o.__proto__ = p;
599
+ return o;
600
+ };
601
+ return _set_prototype_of$2(o, p);
602
+ }
603
+ function _type_of$2(obj) {
604
+ "@swc/helpers - typeof";
605
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
606
+ }
607
+ function _is_native_reflect_construct$2() {
608
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
609
+ if (Reflect.construct.sham) return false;
610
+ if (typeof Proxy === "function") return true;
611
+ try {
612
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
613
+ return true;
614
+ } catch (e) {
615
+ return false;
616
+ }
617
+ }
618
+ function _create_super$2(Derived) {
619
+ var hasNativeReflectConstruct = _is_native_reflect_construct$2();
620
+ return function _createSuperInternal() {
621
+ var Super = _get_prototype_of$2(Derived), result;
622
+ if (hasNativeReflectConstruct) {
623
+ var NewTarget = _get_prototype_of$2(this).constructor;
624
+ result = Reflect.construct(Super, arguments, NewTarget);
625
+ } else {
626
+ result = Super.apply(this, arguments);
627
+ }
628
+ return _possible_constructor_return$2(this, result);
629
+ };
630
+ }
631
+ var InvalidRequestException = /*#__PURE__*/ function(__BaseException) {
632
+ _inherits$2(InvalidRequestException, __BaseException);
633
+ var _super = _create_super$2(InvalidRequestException);
634
+ function InvalidRequestException(opts) {
635
+ _class_call_check$2(this, InvalidRequestException);
636
+ var _this;
637
+ _this = _super.call(this, _object_spread$1({
638
+ name: "InvalidRequestException",
639
+ $fault: "client"
640
+ }, opts));
641
+ _define_property$3(_assert_this_initialized$2(_this), "name", "InvalidRequestException");
642
+ _define_property$3(_assert_this_initialized$2(_this), "$fault", "client");
643
+ Object.setPrototypeOf(_assert_this_initialized$2(_this), InvalidRequestException.prototype);
644
+ return _this;
645
+ }
646
+ return InvalidRequestException;
647
+ }(SSOServiceException);
648
+ var ResourceNotFoundException = /*#__PURE__*/ function(__BaseException) {
649
+ _inherits$2(ResourceNotFoundException, __BaseException);
650
+ var _super = _create_super$2(ResourceNotFoundException);
651
+ function ResourceNotFoundException(opts) {
652
+ _class_call_check$2(this, ResourceNotFoundException);
653
+ var _this;
654
+ _this = _super.call(this, _object_spread$1({
655
+ name: "ResourceNotFoundException",
656
+ $fault: "client"
657
+ }, opts));
658
+ _define_property$3(_assert_this_initialized$2(_this), "name", "ResourceNotFoundException");
659
+ _define_property$3(_assert_this_initialized$2(_this), "$fault", "client");
660
+ Object.setPrototypeOf(_assert_this_initialized$2(_this), ResourceNotFoundException.prototype);
661
+ return _this;
662
+ }
663
+ return ResourceNotFoundException;
664
+ }(SSOServiceException);
665
+ var TooManyRequestsException = /*#__PURE__*/ function(__BaseException) {
666
+ _inherits$2(TooManyRequestsException, __BaseException);
667
+ var _super = _create_super$2(TooManyRequestsException);
668
+ function TooManyRequestsException(opts) {
669
+ _class_call_check$2(this, TooManyRequestsException);
670
+ var _this;
671
+ _this = _super.call(this, _object_spread$1({
672
+ name: "TooManyRequestsException",
673
+ $fault: "client"
674
+ }, opts));
675
+ _define_property$3(_assert_this_initialized$2(_this), "name", "TooManyRequestsException");
676
+ _define_property$3(_assert_this_initialized$2(_this), "$fault", "client");
677
+ Object.setPrototypeOf(_assert_this_initialized$2(_this), TooManyRequestsException.prototype);
678
+ return _this;
679
+ }
680
+ return TooManyRequestsException;
681
+ }(SSOServiceException);
682
+ var UnauthorizedException = /*#__PURE__*/ function(__BaseException) {
683
+ _inherits$2(UnauthorizedException, __BaseException);
684
+ var _super = _create_super$2(UnauthorizedException);
685
+ function UnauthorizedException(opts) {
686
+ _class_call_check$2(this, UnauthorizedException);
687
+ var _this;
688
+ _this = _super.call(this, _object_spread$1({
689
+ name: "UnauthorizedException",
690
+ $fault: "client"
691
+ }, opts));
692
+ _define_property$3(_assert_this_initialized$2(_this), "name", "UnauthorizedException");
693
+ _define_property$3(_assert_this_initialized$2(_this), "$fault", "client");
694
+ Object.setPrototypeOf(_assert_this_initialized$2(_this), UnauthorizedException.prototype);
695
+ return _this;
696
+ }
697
+ return UnauthorizedException;
698
+ }(SSOServiceException);
699
+
700
+ function _define_property$2(obj, key, value) {
701
+ if (key in obj) {
702
+ Object.defineProperty(obj, key, {
703
+ value: value,
704
+ enumerable: true,
705
+ configurable: true,
706
+ writable: true
707
+ });
1264
708
  } else {
1265
- ownKeys$1(Object(source)).forEach(function(key) {
1266
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
709
+ obj[key] = value;
710
+ }
711
+ return obj;
712
+ }
713
+ var _ATT = "AccessTokenType";
714
+ var _GRC = "GetRoleCredentials";
715
+ var _GRCR = "GetRoleCredentialsRequest";
716
+ var _GRCRe = "GetRoleCredentialsResponse";
717
+ var _IRE = "InvalidRequestException";
718
+ var _RC = "RoleCredentials";
719
+ var _RNFE = "ResourceNotFoundException";
720
+ var _SAKT = "SecretAccessKeyType";
721
+ var _STT = "SessionTokenType";
722
+ var _TMRE = "TooManyRequestsException";
723
+ var _UE = "UnauthorizedException";
724
+ var _aI = "accountId";
725
+ var _aKI = "accessKeyId";
726
+ var _aT = "accessToken";
727
+ var _ai = "account_id";
728
+ var _c = "client";
729
+ var _e = "error";
730
+ var _ex = "expiration";
731
+ var _h = "http";
732
+ var _hE = "httpError";
733
+ var _hH = "httpHeader";
734
+ var _hQ = "httpQuery";
735
+ var _m = "message";
736
+ var _rC = "roleCredentials";
737
+ var _rN = "roleName";
738
+ var _rn = "role_name";
739
+ var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
740
+ var _sAK = "secretAccessKey";
741
+ var _sT = "sessionToken";
742
+ var _xasbt = "x-amz-sso_bearer_token";
743
+ var n0 = "com.amazonaws.sso";
744
+ var _s_registry = TypeRegistry.for(_s);
745
+ var SSOServiceException$ = [
746
+ -3,
747
+ _s,
748
+ "SSOServiceException",
749
+ 0,
750
+ [],
751
+ []
752
+ ];
753
+ _s_registry.registerError(SSOServiceException$, SSOServiceException);
754
+ var n0_registry = TypeRegistry.for(n0);
755
+ var _obj;
756
+ var InvalidRequestException$ = [
757
+ -3,
758
+ n0,
759
+ _IRE,
760
+ (_obj = {}, _define_property$2(_obj, _e, _c), _define_property$2(_obj, _hE, 400), _obj),
761
+ [
762
+ _m
763
+ ],
764
+ [
765
+ 0
766
+ ]
767
+ ];
768
+ n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
769
+ var _obj1;
770
+ var ResourceNotFoundException$ = [
771
+ -3,
772
+ n0,
773
+ _RNFE,
774
+ (_obj1 = {}, _define_property$2(_obj1, _e, _c), _define_property$2(_obj1, _hE, 404), _obj1),
775
+ [
776
+ _m
777
+ ],
778
+ [
779
+ 0
780
+ ]
781
+ ];
782
+ n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
783
+ var _obj2;
784
+ var TooManyRequestsException$ = [
785
+ -3,
786
+ n0,
787
+ _TMRE,
788
+ (_obj2 = {}, _define_property$2(_obj2, _e, _c), _define_property$2(_obj2, _hE, 429), _obj2),
789
+ [
790
+ _m
791
+ ],
792
+ [
793
+ 0
794
+ ]
795
+ ];
796
+ n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
797
+ var _obj3;
798
+ var UnauthorizedException$ = [
799
+ -3,
800
+ n0,
801
+ _UE,
802
+ (_obj3 = {}, _define_property$2(_obj3, _e, _c), _define_property$2(_obj3, _hE, 401), _obj3),
803
+ [
804
+ _m
805
+ ],
806
+ [
807
+ 0
808
+ ]
809
+ ];
810
+ n0_registry.registerError(UnauthorizedException$, UnauthorizedException);
811
+ var errorTypeRegistries = [
812
+ _s_registry,
813
+ n0_registry
814
+ ];
815
+ var AccessTokenType = [
816
+ 0,
817
+ n0,
818
+ _ATT,
819
+ 8,
820
+ 0
821
+ ];
822
+ var SecretAccessKeyType = [
823
+ 0,
824
+ n0,
825
+ _SAKT,
826
+ 8,
827
+ 0
828
+ ];
829
+ var SessionTokenType = [
830
+ 0,
831
+ n0,
832
+ _STT,
833
+ 8,
834
+ 0
835
+ ];
836
+ var GetRoleCredentialsRequest$ = [
837
+ 3,
838
+ n0,
839
+ _GRCR,
840
+ 0,
841
+ [
842
+ _rN,
843
+ _aI,
844
+ _aT
845
+ ],
846
+ [
847
+ [
848
+ 0,
849
+ _define_property$2({}, _hQ, _rn)
850
+ ],
851
+ [
852
+ 0,
853
+ _define_property$2({}, _hQ, _ai)
854
+ ],
855
+ [
856
+ function() {
857
+ return AccessTokenType;
858
+ },
859
+ _define_property$2({}, _hH, _xasbt)
860
+ ]
861
+ ],
862
+ 3
863
+ ];
864
+ var GetRoleCredentialsResponse$ = [
865
+ 3,
866
+ n0,
867
+ _GRCRe,
868
+ 0,
869
+ [
870
+ _rC
871
+ ],
872
+ [
873
+ [
874
+ function() {
875
+ return RoleCredentials$;
876
+ },
877
+ 0
878
+ ]
879
+ ]
880
+ ];
881
+ var RoleCredentials$ = [
882
+ 3,
883
+ n0,
884
+ _RC,
885
+ 0,
886
+ [
887
+ _aKI,
888
+ _sAK,
889
+ _sT,
890
+ _ex
891
+ ],
892
+ [
893
+ 0,
894
+ [
895
+ function() {
896
+ return SecretAccessKeyType;
897
+ },
898
+ 0
899
+ ],
900
+ [
901
+ function() {
902
+ return SessionTokenType;
903
+ },
904
+ 0
905
+ ],
906
+ 1
907
+ ]
908
+ ];
909
+ var GetRoleCredentials$ = [
910
+ 9,
911
+ n0,
912
+ _GRC,
913
+ _define_property$2({}, _h, [
914
+ "GET",
915
+ "/federation/credentials",
916
+ 200
917
+ ]),
918
+ function() {
919
+ return GetRoleCredentialsRequest$;
920
+ },
921
+ function() {
922
+ return GetRoleCredentialsResponse$;
923
+ }
924
+ ];
925
+
926
+ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
927
+ try {
928
+ var info = gen[key](arg);
929
+ var value = info.value;
930
+ } catch (error) {
931
+ reject(error);
932
+ return;
933
+ }
934
+ if (info.done) {
935
+ resolve(value);
936
+ } else {
937
+ Promise.resolve(value).then(_next, _throw);
938
+ }
939
+ }
940
+ function _async_to_generator$2(fn) {
941
+ return function() {
942
+ var self = this, args = arguments;
943
+ return new Promise(function(resolve, reject) {
944
+ var gen = fn.apply(self, args);
945
+ function _next(value) {
946
+ asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value);
947
+ }
948
+ function _throw(err) {
949
+ asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err);
950
+ }
951
+ _next(undefined);
1267
952
  });
1268
- }
1269
- return target;
953
+ };
1270
954
  }
1271
955
  function _ts_generator$2(thisArg, body) {
1272
956
  var f, y, t, g, _ = {
@@ -1363,119 +1047,54 @@ function _ts_generator$2(thisArg, body) {
1363
1047
  };
1364
1048
  }
1365
1049
  }
1366
- var getRuntimeConfig = function(config) {
1367
- emitWarningIfUnsupportedVersion(process.version);
1368
- var defaultsMode = resolveDefaultsModeConfig(config);
1369
- var defaultConfigProvider = function() {
1370
- return defaultsMode().then(loadConfigsForDefaultMode);
1371
- };
1372
- var clientSharedValues = getRuntimeConfig$1(config);
1373
- emitWarningIfUnsupportedVersion$1(process.version);
1374
- var loaderConfig = {
1375
- profile: config === null || config === void 0 ? void 0 : config.profile,
1376
- logger: clientSharedValues.logger
1377
- };
1378
- var _config_authSchemePreference, _config_bodyLengthChecker, _config_defaultUserAgentProvider, _config_maxAttempts, _config_region, _config_requestHandler, _config_retryMode, _config_sha256, _config_streamCollector, _config_useDualstackEndpoint, _config_useFipsEndpoint, _config_userAgentAppId;
1379
- return _object_spread_props$1(_object_spread$2({}, clientSharedValues, config), {
1380
- runtime: "node",
1381
- defaultsMode: defaultsMode,
1382
- authSchemePreference: (_config_authSchemePreference = config === null || config === void 0 ? void 0 : config.authSchemePreference) !== null && _config_authSchemePreference !== void 0 ? _config_authSchemePreference : loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
1383
- bodyLengthChecker: (_config_bodyLengthChecker = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _config_bodyLengthChecker !== void 0 ? _config_bodyLengthChecker : calculateBodyLength,
1384
- defaultUserAgentProvider: (_config_defaultUserAgentProvider = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _config_defaultUserAgentProvider !== void 0 ? _config_defaultUserAgentProvider : createDefaultUserAgentProvider({
1385
- serviceId: clientSharedValues.serviceId,
1386
- clientVersion: packageInfo.version
1387
- }),
1388
- maxAttempts: (_config_maxAttempts = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _config_maxAttempts !== void 0 ? _config_maxAttempts : loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
1389
- region: (_config_region = config === null || config === void 0 ? void 0 : config.region) !== null && _config_region !== void 0 ? _config_region : loadConfig(NODE_REGION_CONFIG_OPTIONS, _object_spread$2({}, NODE_REGION_CONFIG_FILE_OPTIONS, loaderConfig)),
1390
- requestHandler: NodeHttpHandler.create((_config_requestHandler = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _config_requestHandler !== void 0 ? _config_requestHandler : defaultConfigProvider),
1391
- retryMode: (_config_retryMode = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _config_retryMode !== void 0 ? _config_retryMode : loadConfig(_object_spread_props$1(_object_spread$2({}, NODE_RETRY_MODE_CONFIG_OPTIONS), {
1392
- default: /*#__PURE__*/ _async_to_generator$2(function() {
1393
- return _ts_generator$2(this, function(_state) {
1394
- switch(_state.label){
1395
- case 0:
1396
- return [
1397
- 4,
1398
- defaultConfigProvider()
1399
- ];
1400
- case 1:
1050
+ var getRuntimeConfig$1 = function(config) {
1051
+ var _config_base64Decoder, _config_base64Encoder, _config_disableHostPrefix, _config_endpointProvider, _config_extensions, _config_httpAuthSchemeProvider, _config_httpAuthSchemes, _config_logger, _config_protocol, _config_protocolSettings, _config_serviceId, _config_urlParser, _config_utf8Decoder, _config_utf8Encoder;
1052
+ return {
1053
+ apiVersion: "2019-06-10",
1054
+ base64Decoder: (_config_base64Decoder = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _config_base64Decoder !== void 0 ? _config_base64Decoder : fromBase64,
1055
+ base64Encoder: (_config_base64Encoder = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _config_base64Encoder !== void 0 ? _config_base64Encoder : toBase64,
1056
+ disableHostPrefix: (_config_disableHostPrefix = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _config_disableHostPrefix !== void 0 ? _config_disableHostPrefix : false,
1057
+ endpointProvider: (_config_endpointProvider = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _config_endpointProvider !== void 0 ? _config_endpointProvider : defaultEndpointResolver,
1058
+ extensions: (_config_extensions = config === null || config === void 0 ? void 0 : config.extensions) !== null && _config_extensions !== void 0 ? _config_extensions : [],
1059
+ httpAuthSchemeProvider: (_config_httpAuthSchemeProvider = config === null || config === void 0 ? void 0 : config.httpAuthSchemeProvider) !== null && _config_httpAuthSchemeProvider !== void 0 ? _config_httpAuthSchemeProvider : defaultSSOHttpAuthSchemeProvider,
1060
+ httpAuthSchemes: (_config_httpAuthSchemes = config === null || config === void 0 ? void 0 : config.httpAuthSchemes) !== null && _config_httpAuthSchemes !== void 0 ? _config_httpAuthSchemes : [
1061
+ {
1062
+ schemeId: "aws.auth#sigv4",
1063
+ identityProvider: function(ipc) {
1064
+ return ipc.getIdentityProvider("aws.auth#sigv4");
1065
+ },
1066
+ signer: new AwsSdkSigV4Signer()
1067
+ },
1068
+ {
1069
+ schemeId: "smithy.api#noAuth",
1070
+ identityProvider: function(ipc) {
1071
+ return ipc.getIdentityProvider("smithy.api#noAuth") || /*#__PURE__*/ _async_to_generator$2(function() {
1072
+ return _ts_generator$2(this, function(_state) {
1401
1073
  return [
1402
1074
  2,
1403
- _state.sent().retryMode || DEFAULT_RETRY_MODE
1075
+ {}
1404
1076
  ];
1405
- }
1406
- });
1407
- })
1408
- }), config),
1409
- sha256: (_config_sha256 = config === null || config === void 0 ? void 0 : config.sha256) !== null && _config_sha256 !== void 0 ? _config_sha256 : Hash.bind(null, "sha256"),
1410
- streamCollector: (_config_streamCollector = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _config_streamCollector !== void 0 ? _config_streamCollector : streamCollector,
1411
- useDualstackEndpoint: (_config_useDualstackEndpoint = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _config_useDualstackEndpoint !== void 0 ? _config_useDualstackEndpoint : loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
1412
- useFipsEndpoint: (_config_useFipsEndpoint = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _config_useFipsEndpoint !== void 0 ? _config_useFipsEndpoint : loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
1413
- userAgentAppId: (_config_userAgentAppId = config === null || config === void 0 ? void 0 : config.userAgentAppId) !== null && _config_userAgentAppId !== void 0 ? _config_userAgentAppId : loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
1414
- });
1415
- };
1416
-
1417
- var getHttpAuthExtensionConfiguration = function(runtimeConfig) {
1418
- var _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
1419
- var _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
1420
- var _credentials = runtimeConfig.credentials;
1421
- return {
1422
- setHttpAuthScheme: function setHttpAuthScheme(httpAuthScheme) {
1423
- var index = _httpAuthSchemes.findIndex(function(scheme) {
1424
- return scheme.schemeId === httpAuthScheme.schemeId;
1425
- });
1426
- if (index === -1) {
1427
- _httpAuthSchemes.push(httpAuthScheme);
1428
- } else {
1429
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
1077
+ });
1078
+ });
1079
+ },
1080
+ signer: new NoAuthSigner()
1430
1081
  }
1082
+ ],
1083
+ logger: (_config_logger = config === null || config === void 0 ? void 0 : config.logger) !== null && _config_logger !== void 0 ? _config_logger : new NoOpLogger(),
1084
+ protocol: (_config_protocol = config === null || config === void 0 ? void 0 : config.protocol) !== null && _config_protocol !== void 0 ? _config_protocol : AwsRestJsonProtocol,
1085
+ protocolSettings: (_config_protocolSettings = config === null || config === void 0 ? void 0 : config.protocolSettings) !== null && _config_protocolSettings !== void 0 ? _config_protocolSettings : {
1086
+ defaultNamespace: "com.amazonaws.sso",
1087
+ errorTypeRegistries: errorTypeRegistries,
1088
+ version: "2019-06-10",
1089
+ serviceTarget: "SWBPortalService"
1431
1090
  },
1432
- httpAuthSchemes: function httpAuthSchemes() {
1433
- return _httpAuthSchemes;
1434
- },
1435
- setHttpAuthSchemeProvider: function setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
1436
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
1437
- },
1438
- httpAuthSchemeProvider: function httpAuthSchemeProvider() {
1439
- return _httpAuthSchemeProvider;
1440
- },
1441
- setCredentials: function setCredentials(credentials) {
1442
- _credentials = credentials;
1443
- },
1444
- credentials: function credentials() {
1445
- return _credentials;
1446
- }
1447
- };
1448
- };
1449
- var resolveHttpAuthRuntimeConfig = function(config) {
1450
- return {
1451
- httpAuthSchemes: config.httpAuthSchemes(),
1452
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
1453
- credentials: config.credentials()
1091
+ serviceId: (_config_serviceId = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _config_serviceId !== void 0 ? _config_serviceId : "SSO",
1092
+ urlParser: (_config_urlParser = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _config_urlParser !== void 0 ? _config_urlParser : parseUrl,
1093
+ utf8Decoder: (_config_utf8Decoder = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _config_utf8Decoder !== void 0 ? _config_utf8Decoder : fromUtf8,
1094
+ utf8Encoder: (_config_utf8Encoder = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _config_utf8Encoder !== void 0 ? _config_utf8Encoder : toUtf8
1454
1095
  };
1455
1096
  };
1456
1097
 
1457
- var resolveRuntimeExtensions = function(runtimeConfig, extensions) {
1458
- var extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
1459
- extensions.forEach(function(extension) {
1460
- return extension.configure(extensionConfiguration);
1461
- });
1462
- return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
1463
- };
1464
-
1465
- function _array_like_to_array(arr, len) {
1466
- if (len == null || len > arr.length) len = arr.length;
1467
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1468
- return arr2;
1469
- }
1470
- function _array_with_holes(arr) {
1471
- if (Array.isArray(arr)) return arr;
1472
- }
1473
- function _assert_this_initialized$3(self) {
1474
- if (self === void 0) {
1475
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1476
- }
1477
- return self;
1478
- }
1479
1098
  function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
1480
1099
  try {
1481
1100
  var info = gen[key](arg);
@@ -1494,168 +1113,63 @@ function _async_to_generator$1(fn) {
1494
1113
  return function() {
1495
1114
  var self = this, args = arguments;
1496
1115
  return new Promise(function(resolve, reject) {
1497
- var gen = fn.apply(self, args);
1498
- function _next(value) {
1499
- asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value);
1500
- }
1501
- function _throw(err) {
1502
- asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err);
1503
- }
1504
- _next(undefined);
1505
- });
1506
- };
1507
- }
1508
- function _class_call_check$3(instance, Constructor) {
1509
- if (!(instance instanceof Constructor)) {
1510
- throw new TypeError("Cannot call a class as a function");
1511
- }
1512
- }
1513
- function _defineProperties(target, props) {
1514
- for(var i = 0; i < props.length; i++){
1515
- var descriptor = props[i];
1516
- descriptor.enumerable = descriptor.enumerable || false;
1517
- descriptor.configurable = true;
1518
- if ("value" in descriptor) descriptor.writable = true;
1519
- Object.defineProperty(target, descriptor.key, descriptor);
1520
- }
1521
- }
1522
- function _create_class(Constructor, protoProps, staticProps) {
1523
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1524
- return Constructor;
1525
- }
1526
- function _define_property$2(obj, key, value) {
1527
- if (key in obj) {
1528
- Object.defineProperty(obj, key, {
1529
- value: value,
1530
- enumerable: true,
1531
- configurable: true,
1532
- writable: true
1533
- });
1534
- } else {
1535
- obj[key] = value;
1536
- }
1537
- return obj;
1538
- }
1539
- function _get(target, property, receiver) {
1540
- if (typeof Reflect !== "undefined" && Reflect.get) {
1541
- _get = Reflect.get;
1542
- } else {
1543
- _get = function get(target, property, receiver) {
1544
- var base = _super_prop_base(target, property);
1545
- if (!base) return;
1546
- var desc = Object.getOwnPropertyDescriptor(base, property);
1547
- if (desc.get) {
1548
- return desc.get.call(receiver || target);
1549
- }
1550
- return desc.value;
1551
- };
1552
- }
1553
- return _get(target, property, receiver || target);
1554
- }
1555
- function _get_prototype_of$3(o) {
1556
- _get_prototype_of$3 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1557
- return o.__proto__ || Object.getPrototypeOf(o);
1558
- };
1559
- return _get_prototype_of$3(o);
1560
- }
1561
- function _inherits$3(subClass, superClass) {
1562
- if (typeof superClass !== "function" && superClass !== null) {
1563
- throw new TypeError("Super expression must either be null or a function");
1564
- }
1565
- subClass.prototype = Object.create(superClass && superClass.prototype, {
1566
- constructor: {
1567
- value: subClass,
1568
- writable: true,
1569
- configurable: true
1570
- }
1571
- });
1572
- if (superClass) _set_prototype_of$3(subClass, superClass);
1573
- }
1574
- function _iterable_to_array_limit(arr, i) {
1575
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1576
- if (_i == null) return;
1577
- var _arr = [];
1578
- var _n = true;
1579
- var _d = false;
1580
- var _s, _e;
1581
- try {
1582
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1583
- _arr.push(_s.value);
1584
- if (i && _arr.length === i) break;
1585
- }
1586
- } catch (err) {
1587
- _d = true;
1588
- _e = err;
1589
- } finally{
1590
- try {
1591
- if (!_n && _i["return"] != null) _i["return"]();
1592
- } finally{
1593
- if (_d) throw _e;
1594
- }
1595
- }
1596
- return _arr;
1597
- }
1598
- function _non_iterable_rest() {
1599
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1600
- }
1601
- function _possible_constructor_return$3(self, call) {
1602
- if (call && (_type_of$3(call) === "object" || typeof call === "function")) {
1603
- return call;
1604
- }
1605
- return _assert_this_initialized$3(self);
1606
- }
1607
- function _set_prototype_of$3(o, p) {
1608
- _set_prototype_of$3 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1609
- o.__proto__ = p;
1610
- return o;
1116
+ var gen = fn.apply(self, args);
1117
+ function _next(value) {
1118
+ asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value);
1119
+ }
1120
+ function _throw(err) {
1121
+ asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err);
1122
+ }
1123
+ _next(undefined);
1124
+ });
1611
1125
  };
1612
- return _set_prototype_of$3(o, p);
1613
- }
1614
- function _sliced_to_array(arr, i) {
1615
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1616
1126
  }
1617
- function _super_prop_base(object, property) {
1618
- while(!Object.prototype.hasOwnProperty.call(object, property)){
1619
- object = _get_prototype_of$3(object);
1620
- if (object === null) break;
1127
+ function _define_property$1(obj, key, value) {
1128
+ if (key in obj) {
1129
+ Object.defineProperty(obj, key, {
1130
+ value: value,
1131
+ enumerable: true,
1132
+ configurable: true,
1133
+ writable: true
1134
+ });
1135
+ } else {
1136
+ obj[key] = value;
1621
1137
  }
1622
- return object;
1623
- }
1624
- function _type_of$3(obj) {
1625
- "@swc/helpers - typeof";
1626
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1138
+ return obj;
1627
1139
  }
1628
- function _unsupported_iterable_to_array(o, minLen) {
1629
- if (!o) return;
1630
- if (typeof o === "string") return _array_like_to_array(o, minLen);
1631
- var n = Object.prototype.toString.call(o).slice(8, -1);
1632
- if (n === "Object" && o.constructor) n = o.constructor.name;
1633
- if (n === "Map" || n === "Set") return Array.from(n);
1634
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
1140
+ function _object_spread(target) {
1141
+ for(var i = 1; i < arguments.length; i++){
1142
+ var source = arguments[i] != null ? arguments[i] : {};
1143
+ var ownKeys = Object.keys(source);
1144
+ if (typeof Object.getOwnPropertySymbols === "function") {
1145
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1146
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1147
+ }));
1148
+ }
1149
+ ownKeys.forEach(function(key) {
1150
+ _define_property$1(target, key, source[key]);
1151
+ });
1152
+ }
1153
+ return target;
1635
1154
  }
1636
- function _is_native_reflect_construct$3() {
1637
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1638
- if (Reflect.construct.sham) return false;
1639
- if (typeof Proxy === "function") return true;
1640
- try {
1641
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1642
- return true;
1643
- } catch (e) {
1644
- return false;
1155
+ function ownKeys(object, enumerableOnly) {
1156
+ var keys = Object.keys(object);
1157
+ if (Object.getOwnPropertySymbols) {
1158
+ var symbols = Object.getOwnPropertySymbols(object);
1159
+ keys.push.apply(keys, symbols);
1645
1160
  }
1161
+ return keys;
1646
1162
  }
1647
- function _create_super$3(Derived) {
1648
- var hasNativeReflectConstruct = _is_native_reflect_construct$3();
1649
- return function _createSuperInternal() {
1650
- var Super = _get_prototype_of$3(Derived), result;
1651
- if (hasNativeReflectConstruct) {
1652
- var NewTarget = _get_prototype_of$3(this).constructor;
1653
- result = Reflect.construct(Super, arguments, NewTarget);
1654
- } else {
1655
- result = Super.apply(this, arguments);
1656
- }
1657
- return _possible_constructor_return$3(this, result);
1658
- };
1163
+ function _object_spread_props(target, source) {
1164
+ source = source != null ? source : {};
1165
+ if (Object.getOwnPropertyDescriptors) {
1166
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1167
+ } else {
1168
+ ownKeys(Object(source)).forEach(function(key) {
1169
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1170
+ });
1171
+ }
1172
+ return target;
1659
1173
  }
1660
1174
  function _ts_generator$1(thisArg, body) {
1661
1175
  var f, y, t, g, _ = {
@@ -1752,163 +1266,167 @@ function _ts_generator$1(thisArg, body) {
1752
1266
  };
1753
1267
  }
1754
1268
  }
1755
- var SSOClient = /*#__PURE__*/ function(__Client) {
1756
- _inherits$3(SSOClient, __Client);
1757
- var _super = _create_super$3(SSOClient);
1758
- function SSOClient() {
1759
- for(var _len = arguments.length, _tmp = new Array(_len), _key = 0; _key < _len; _key++){
1760
- _tmp[_key] = arguments[_key];
1761
- }
1762
- var _tmp1 = _sliced_to_array(_tmp, 1), configuration = _tmp1[0];
1763
- _class_call_check$3(this, SSOClient);
1764
- var _this;
1765
- var _config_0 = getRuntimeConfig(configuration || {});
1766
- _this = _super.call(this, _config_0);
1767
- _define_property$2(_assert_this_initialized$3(_this), "config", void 0);
1768
- _this.initConfig = _config_0;
1769
- var _config_1 = resolveClientEndpointParameters(_config_0);
1770
- var _config_2 = resolveUserAgentConfig(_config_1);
1771
- var _config_3 = resolveRetryConfig(_config_2);
1772
- var _config_4 = resolveRegionConfig(_config_3);
1773
- var _config_5 = resolveHostHeaderConfig(_config_4);
1774
- var _config_6 = resolveEndpointConfig(_config_5);
1775
- var _config_7 = resolveHttpAuthSchemeConfig(_config_6);
1776
- var _config_8 = resolveRuntimeExtensions(_config_7, (configuration === null || configuration === void 0 ? void 0 : configuration.extensions) || []);
1777
- _this.config = _config_8;
1778
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
1779
- _this.middlewareStack.use(getRetryPlugin(_this.config));
1780
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
1781
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
1782
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
1783
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
1784
- _this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(_this.config, {
1785
- httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
1786
- identityProviderConfigProvider: function() {
1787
- var _ref = _async_to_generator$1(function(config) {
1788
- return _ts_generator$1(this, function(_state) {
1789
- return [
1790
- 2,
1791
- new DefaultIdentityProviderConfig({
1792
- "aws.auth#sigv4": config.credentials
1793
- })
1794
- ];
1795
- });
1796
- });
1797
- return function(config) {
1798
- return _ref.apply(this, arguments);
1799
- };
1800
- }()
1801
- }));
1802
- _this.middlewareStack.use(getHttpSigningPlugin(_this.config));
1803
- return _this;
1804
- }
1805
- _create_class(SSOClient, [
1806
- {
1807
- key: "destroy",
1808
- value: function destroy() {
1809
- _get(_get_prototype_of$3(SSOClient.prototype), "destroy", this).call(this);
1810
- }
1811
- }
1812
- ]);
1813
- return SSOClient;
1814
- }(Client);
1815
-
1816
- function _assert_this_initialized$2(self) {
1817
- if (self === void 0) {
1818
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1819
- }
1820
- return self;
1821
- }
1822
- function _class_call_check$2(instance, Constructor) {
1823
- if (!(instance instanceof Constructor)) {
1824
- throw new TypeError("Cannot call a class as a function");
1825
- }
1826
- }
1827
- function _get_prototype_of$2(o) {
1828
- _get_prototype_of$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1829
- return o.__proto__ || Object.getPrototypeOf(o);
1269
+ var getRuntimeConfig = function(config) {
1270
+ emitWarningIfUnsupportedVersion(process.version);
1271
+ var defaultsMode = resolveDefaultsModeConfig(config);
1272
+ var defaultConfigProvider = function() {
1273
+ return defaultsMode().then(loadConfigsForDefaultMode);
1830
1274
  };
1831
- return _get_prototype_of$2(o);
1832
- }
1833
- function _inherits$2(subClass, superClass) {
1834
- if (typeof superClass !== "function" && superClass !== null) {
1835
- throw new TypeError("Super expression must either be null or a function");
1836
- }
1837
- subClass.prototype = Object.create(superClass && superClass.prototype, {
1838
- constructor: {
1839
- value: subClass,
1840
- writable: true,
1841
- configurable: true
1842
- }
1843
- });
1844
- if (superClass) _set_prototype_of$2(subClass, superClass);
1845
- }
1846
- function _possible_constructor_return$2(self, call) {
1847
- if (call && (_type_of$2(call) === "object" || typeof call === "function")) {
1848
- return call;
1849
- }
1850
- return _assert_this_initialized$2(self);
1851
- }
1852
- function _set_prototype_of$2(o, p) {
1853
- _set_prototype_of$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1854
- o.__proto__ = p;
1855
- return o;
1275
+ var clientSharedValues = getRuntimeConfig$1(config);
1276
+ emitWarningIfUnsupportedVersion$1(process.version);
1277
+ var loaderConfig = {
1278
+ profile: config === null || config === void 0 ? void 0 : config.profile,
1279
+ logger: clientSharedValues.logger
1856
1280
  };
1857
- return _set_prototype_of$2(o, p);
1858
- }
1859
- function _type_of$2(obj) {
1860
- "@swc/helpers - typeof";
1861
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1862
- }
1863
- function _is_native_reflect_construct$2() {
1864
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1865
- if (Reflect.construct.sham) return false;
1866
- if (typeof Proxy === "function") return true;
1867
- try {
1868
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1869
- return true;
1870
- } catch (e) {
1871
- return false;
1872
- }
1873
- }
1874
- function _create_super$2(Derived) {
1875
- var hasNativeReflectConstruct = _is_native_reflect_construct$2();
1876
- return function _createSuperInternal() {
1877
- var Super = _get_prototype_of$2(Derived), result;
1878
- if (hasNativeReflectConstruct) {
1879
- var NewTarget = _get_prototype_of$2(this).constructor;
1880
- result = Reflect.construct(Super, arguments, NewTarget);
1881
- } else {
1882
- result = Super.apply(this, arguments);
1281
+ var _config_authSchemePreference, _config_bodyLengthChecker, _config_defaultUserAgentProvider, _config_maxAttempts, _config_region, _config_requestHandler, _config_retryMode, _config_sha256, _config_streamCollector, _config_useDualstackEndpoint, _config_useFipsEndpoint, _config_userAgentAppId;
1282
+ return _object_spread_props(_object_spread({}, clientSharedValues, config), {
1283
+ runtime: "node",
1284
+ defaultsMode: defaultsMode,
1285
+ authSchemePreference: (_config_authSchemePreference = config === null || config === void 0 ? void 0 : config.authSchemePreference) !== null && _config_authSchemePreference !== void 0 ? _config_authSchemePreference : loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
1286
+ bodyLengthChecker: (_config_bodyLengthChecker = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _config_bodyLengthChecker !== void 0 ? _config_bodyLengthChecker : calculateBodyLength,
1287
+ defaultUserAgentProvider: (_config_defaultUserAgentProvider = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _config_defaultUserAgentProvider !== void 0 ? _config_defaultUserAgentProvider : createDefaultUserAgentProvider({
1288
+ serviceId: clientSharedValues.serviceId,
1289
+ clientVersion: packageInfo.version
1290
+ }),
1291
+ maxAttempts: (_config_maxAttempts = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _config_maxAttempts !== void 0 ? _config_maxAttempts : loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
1292
+ region: (_config_region = config === null || config === void 0 ? void 0 : config.region) !== null && _config_region !== void 0 ? _config_region : loadConfig(NODE_REGION_CONFIG_OPTIONS, _object_spread({}, NODE_REGION_CONFIG_FILE_OPTIONS, loaderConfig)),
1293
+ requestHandler: NodeHttpHandler.create((_config_requestHandler = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _config_requestHandler !== void 0 ? _config_requestHandler : defaultConfigProvider),
1294
+ retryMode: (_config_retryMode = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _config_retryMode !== void 0 ? _config_retryMode : loadConfig(_object_spread_props(_object_spread({}, NODE_RETRY_MODE_CONFIG_OPTIONS), {
1295
+ default: /*#__PURE__*/ _async_to_generator$1(function() {
1296
+ return _ts_generator$1(this, function(_state) {
1297
+ switch(_state.label){
1298
+ case 0:
1299
+ return [
1300
+ 4,
1301
+ defaultConfigProvider()
1302
+ ];
1303
+ case 1:
1304
+ return [
1305
+ 2,
1306
+ _state.sent().retryMode || DEFAULT_RETRY_MODE
1307
+ ];
1308
+ }
1309
+ });
1310
+ })
1311
+ }), config),
1312
+ sha256: (_config_sha256 = config === null || config === void 0 ? void 0 : config.sha256) !== null && _config_sha256 !== void 0 ? _config_sha256 : Hash.bind(null, "sha256"),
1313
+ streamCollector: (_config_streamCollector = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _config_streamCollector !== void 0 ? _config_streamCollector : streamCollector,
1314
+ useDualstackEndpoint: (_config_useDualstackEndpoint = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _config_useDualstackEndpoint !== void 0 ? _config_useDualstackEndpoint : loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
1315
+ useFipsEndpoint: (_config_useFipsEndpoint = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _config_useFipsEndpoint !== void 0 ? _config_useFipsEndpoint : loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
1316
+ userAgentAppId: (_config_userAgentAppId = config === null || config === void 0 ? void 0 : config.userAgentAppId) !== null && _config_userAgentAppId !== void 0 ? _config_userAgentAppId : loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
1317
+ });
1318
+ };
1319
+
1320
+ var getHttpAuthExtensionConfiguration = function(runtimeConfig) {
1321
+ var _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
1322
+ var _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
1323
+ var _credentials = runtimeConfig.credentials;
1324
+ return {
1325
+ setHttpAuthScheme: function setHttpAuthScheme(httpAuthScheme) {
1326
+ var index = _httpAuthSchemes.findIndex(function(scheme) {
1327
+ return scheme.schemeId === httpAuthScheme.schemeId;
1328
+ });
1329
+ if (index === -1) {
1330
+ _httpAuthSchemes.push(httpAuthScheme);
1331
+ } else {
1332
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
1333
+ }
1334
+ },
1335
+ httpAuthSchemes: function httpAuthSchemes() {
1336
+ return _httpAuthSchemes;
1337
+ },
1338
+ setHttpAuthSchemeProvider: function setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
1339
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
1340
+ },
1341
+ httpAuthSchemeProvider: function httpAuthSchemeProvider() {
1342
+ return _httpAuthSchemeProvider;
1343
+ },
1344
+ setCredentials: function setCredentials(credentials) {
1345
+ _credentials = credentials;
1346
+ },
1347
+ credentials: function credentials() {
1348
+ return _credentials;
1883
1349
  }
1884
- return _possible_constructor_return$2(this, result);
1885
1350
  };
1886
- }
1887
- var SSOServiceException = /*#__PURE__*/ function(__ServiceException) {
1888
- _inherits$2(SSOServiceException, __ServiceException);
1889
- var _super = _create_super$2(SSOServiceException);
1890
- function SSOServiceException(options) {
1891
- _class_call_check$2(this, SSOServiceException);
1892
- var _this;
1893
- _this = _super.call(this, options);
1894
- Object.setPrototypeOf(_assert_this_initialized$2(_this), SSOServiceException.prototype);
1895
- return _this;
1896
- }
1897
- return SSOServiceException;
1898
- }(ServiceException);
1351
+ };
1352
+ var resolveHttpAuthRuntimeConfig = function(config) {
1353
+ return {
1354
+ httpAuthSchemes: config.httpAuthSchemes(),
1355
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
1356
+ credentials: config.credentials()
1357
+ };
1358
+ };
1359
+
1360
+ var resolveRuntimeExtensions = function(runtimeConfig, extensions) {
1361
+ var extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
1362
+ extensions.forEach(function(extension) {
1363
+ return extension.configure(extensionConfiguration);
1364
+ });
1365
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
1366
+ };
1899
1367
 
1368
+ function _array_like_to_array(arr, len) {
1369
+ if (len == null || len > arr.length) len = arr.length;
1370
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1371
+ return arr2;
1372
+ }
1373
+ function _array_with_holes(arr) {
1374
+ if (Array.isArray(arr)) return arr;
1375
+ }
1900
1376
  function _assert_this_initialized$1(self) {
1901
1377
  if (self === void 0) {
1902
1378
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1903
1379
  }
1904
1380
  return self;
1905
1381
  }
1382
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1383
+ try {
1384
+ var info = gen[key](arg);
1385
+ var value = info.value;
1386
+ } catch (error) {
1387
+ reject(error);
1388
+ return;
1389
+ }
1390
+ if (info.done) {
1391
+ resolve(value);
1392
+ } else {
1393
+ Promise.resolve(value).then(_next, _throw);
1394
+ }
1395
+ }
1396
+ function _async_to_generator(fn) {
1397
+ return function() {
1398
+ var self = this, args = arguments;
1399
+ return new Promise(function(resolve, reject) {
1400
+ var gen = fn.apply(self, args);
1401
+ function _next(value) {
1402
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1403
+ }
1404
+ function _throw(err) {
1405
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1406
+ }
1407
+ _next(undefined);
1408
+ });
1409
+ };
1410
+ }
1906
1411
  function _class_call_check$1(instance, Constructor) {
1907
1412
  if (!(instance instanceof Constructor)) {
1908
1413
  throw new TypeError("Cannot call a class as a function");
1909
1414
  }
1910
1415
  }
1911
- function _define_property$1(obj, key, value) {
1416
+ function _defineProperties(target, props) {
1417
+ for(var i = 0; i < props.length; i++){
1418
+ var descriptor = props[i];
1419
+ descriptor.enumerable = descriptor.enumerable || false;
1420
+ descriptor.configurable = true;
1421
+ if ("value" in descriptor) descriptor.writable = true;
1422
+ Object.defineProperty(target, descriptor.key, descriptor);
1423
+ }
1424
+ }
1425
+ function _create_class(Constructor, protoProps, staticProps) {
1426
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1427
+ return Constructor;
1428
+ }
1429
+ function _define_property(obj, key, value) {
1912
1430
  if (key in obj) {
1913
1431
  Object.defineProperty(obj, key, {
1914
1432
  value: value,
@@ -1921,6 +1439,22 @@ function _define_property$1(obj, key, value) {
1921
1439
  }
1922
1440
  return obj;
1923
1441
  }
1442
+ function _get(target, property, receiver) {
1443
+ if (typeof Reflect !== "undefined" && Reflect.get) {
1444
+ _get = Reflect.get;
1445
+ } else {
1446
+ _get = function get(target, property, receiver) {
1447
+ var base = _super_prop_base(target, property);
1448
+ if (!base) return;
1449
+ var desc = Object.getOwnPropertyDescriptor(base, property);
1450
+ if (desc.get) {
1451
+ return desc.get.call(receiver || target);
1452
+ }
1453
+ return desc.value;
1454
+ };
1455
+ }
1456
+ return _get(target, property, receiver || target);
1457
+ }
1924
1458
  function _get_prototype_of$1(o) {
1925
1459
  _get_prototype_of$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1926
1460
  return o.__proto__ || Object.getPrototypeOf(o);
@@ -1940,20 +1474,32 @@ function _inherits$1(subClass, superClass) {
1940
1474
  });
1941
1475
  if (superClass) _set_prototype_of$1(subClass, superClass);
1942
1476
  }
1943
- function _object_spread$1(target) {
1944
- for(var i = 1; i < arguments.length; i++){
1945
- var source = arguments[i] != null ? arguments[i] : {};
1946
- var ownKeys = Object.keys(source);
1947
- if (typeof Object.getOwnPropertySymbols === "function") {
1948
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1949
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1950
- }));
1477
+ function _iterable_to_array_limit(arr, i) {
1478
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1479
+ if (_i == null) return;
1480
+ var _arr = [];
1481
+ var _n = true;
1482
+ var _d = false;
1483
+ var _s, _e;
1484
+ try {
1485
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1486
+ _arr.push(_s.value);
1487
+ if (i && _arr.length === i) break;
1488
+ }
1489
+ } catch (err) {
1490
+ _d = true;
1491
+ _e = err;
1492
+ } finally{
1493
+ try {
1494
+ if (!_n && _i["return"] != null) _i["return"]();
1495
+ } finally{
1496
+ if (_d) throw _e;
1951
1497
  }
1952
- ownKeys.forEach(function(key) {
1953
- _define_property$1(target, key, source[key]);
1954
- });
1955
1498
  }
1956
- return target;
1499
+ return _arr;
1500
+ }
1501
+ function _non_iterable_rest() {
1502
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1957
1503
  }
1958
1504
  function _possible_constructor_return$1(self, call) {
1959
1505
  if (call && (_type_of$1(call) === "object" || typeof call === "function")) {
@@ -1961,202 +1507,58 @@ function _possible_constructor_return$1(self, call) {
1961
1507
  }
1962
1508
  return _assert_this_initialized$1(self);
1963
1509
  }
1964
- function _set_prototype_of$1(o, p) {
1965
- _set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1966
- o.__proto__ = p;
1967
- return o;
1968
- };
1969
- return _set_prototype_of$1(o, p);
1970
- }
1971
- function _type_of$1(obj) {
1972
- "@swc/helpers - typeof";
1973
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1974
- }
1975
- function _is_native_reflect_construct$1() {
1976
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1977
- if (Reflect.construct.sham) return false;
1978
- if (typeof Proxy === "function") return true;
1979
- try {
1980
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1981
- return true;
1982
- } catch (e) {
1983
- return false;
1984
- }
1985
- }
1986
- function _create_super$1(Derived) {
1987
- var hasNativeReflectConstruct = _is_native_reflect_construct$1();
1988
- return function _createSuperInternal() {
1989
- var Super = _get_prototype_of$1(Derived), result;
1990
- if (hasNativeReflectConstruct) {
1991
- var NewTarget = _get_prototype_of$1(this).constructor;
1992
- result = Reflect.construct(Super, arguments, NewTarget);
1993
- } else {
1994
- result = Super.apply(this, arguments);
1995
- }
1996
- return _possible_constructor_return$1(this, result);
1997
- };
1998
- }
1999
- var InvalidRequestException = /*#__PURE__*/ function(__BaseException) {
2000
- _inherits$1(InvalidRequestException, __BaseException);
2001
- var _super = _create_super$1(InvalidRequestException);
2002
- function InvalidRequestException(opts) {
2003
- _class_call_check$1(this, InvalidRequestException);
2004
- var _this;
2005
- _this = _super.call(this, _object_spread$1({
2006
- name: "InvalidRequestException",
2007
- $fault: "client"
2008
- }, opts));
2009
- _define_property$1(_assert_this_initialized$1(_this), "name", "InvalidRequestException");
2010
- _define_property$1(_assert_this_initialized$1(_this), "$fault", "client");
2011
- Object.setPrototypeOf(_assert_this_initialized$1(_this), InvalidRequestException.prototype);
2012
- return _this;
2013
- }
2014
- return InvalidRequestException;
2015
- }(SSOServiceException);
2016
- var ResourceNotFoundException = /*#__PURE__*/ function(__BaseException) {
2017
- _inherits$1(ResourceNotFoundException, __BaseException);
2018
- var _super = _create_super$1(ResourceNotFoundException);
2019
- function ResourceNotFoundException(opts) {
2020
- _class_call_check$1(this, ResourceNotFoundException);
2021
- var _this;
2022
- _this = _super.call(this, _object_spread$1({
2023
- name: "ResourceNotFoundException",
2024
- $fault: "client"
2025
- }, opts));
2026
- _define_property$1(_assert_this_initialized$1(_this), "name", "ResourceNotFoundException");
2027
- _define_property$1(_assert_this_initialized$1(_this), "$fault", "client");
2028
- Object.setPrototypeOf(_assert_this_initialized$1(_this), ResourceNotFoundException.prototype);
2029
- return _this;
2030
- }
2031
- return ResourceNotFoundException;
2032
- }(SSOServiceException);
2033
- var TooManyRequestsException = /*#__PURE__*/ function(__BaseException) {
2034
- _inherits$1(TooManyRequestsException, __BaseException);
2035
- var _super = _create_super$1(TooManyRequestsException);
2036
- function TooManyRequestsException(opts) {
2037
- _class_call_check$1(this, TooManyRequestsException);
2038
- var _this;
2039
- _this = _super.call(this, _object_spread$1({
2040
- name: "TooManyRequestsException",
2041
- $fault: "client"
2042
- }, opts));
2043
- _define_property$1(_assert_this_initialized$1(_this), "name", "TooManyRequestsException");
2044
- _define_property$1(_assert_this_initialized$1(_this), "$fault", "client");
2045
- Object.setPrototypeOf(_assert_this_initialized$1(_this), TooManyRequestsException.prototype);
2046
- return _this;
2047
- }
2048
- return TooManyRequestsException;
2049
- }(SSOServiceException);
2050
- var UnauthorizedException = /*#__PURE__*/ function(__BaseException) {
2051
- _inherits$1(UnauthorizedException, __BaseException);
2052
- var _super = _create_super$1(UnauthorizedException);
2053
- function UnauthorizedException(opts) {
2054
- _class_call_check$1(this, UnauthorizedException);
2055
- var _this;
2056
- _this = _super.call(this, _object_spread$1({
2057
- name: "UnauthorizedException",
2058
- $fault: "client"
2059
- }, opts));
2060
- _define_property$1(_assert_this_initialized$1(_this), "name", "UnauthorizedException");
2061
- _define_property$1(_assert_this_initialized$1(_this), "$fault", "client");
2062
- Object.setPrototypeOf(_assert_this_initialized$1(_this), UnauthorizedException.prototype);
2063
- return _this;
2064
- }
2065
- return UnauthorizedException;
2066
- }(SSOServiceException);
2067
- var GetRoleCredentialsRequestFilterSensitiveLog = function(obj) {
2068
- return _object_spread$1({}, obj, obj.accessToken && {
2069
- accessToken: SENSITIVE_STRING
2070
- });
2071
- };
2072
- var RoleCredentialsFilterSensitiveLog = function(obj) {
2073
- return _object_spread$1({}, obj, obj.secretAccessKey && {
2074
- secretAccessKey: SENSITIVE_STRING
2075
- }, obj.sessionToken && {
2076
- sessionToken: SENSITIVE_STRING
2077
- });
2078
- };
2079
- var GetRoleCredentialsResponseFilterSensitiveLog = function(obj) {
2080
- return _object_spread$1({}, obj, obj.roleCredentials && {
2081
- roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials)
2082
- });
2083
- };
2084
-
2085
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
2086
- try {
2087
- var info = gen[key](arg);
2088
- var value = info.value;
2089
- } catch (error) {
2090
- reject(error);
2091
- return;
2092
- }
2093
- if (info.done) {
2094
- resolve(value);
2095
- } else {
2096
- Promise.resolve(value).then(_next, _throw);
2097
- }
2098
- }
2099
- function _async_to_generator(fn) {
2100
- return function() {
2101
- var self = this, args = arguments;
2102
- return new Promise(function(resolve, reject) {
2103
- var gen = fn.apply(self, args);
2104
- function _next(value) {
2105
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
2106
- }
2107
- function _throw(err) {
2108
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
2109
- }
2110
- _next(undefined);
2111
- });
1510
+ function _set_prototype_of$1(o, p) {
1511
+ _set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1512
+ o.__proto__ = p;
1513
+ return o;
2112
1514
  };
1515
+ return _set_prototype_of$1(o, p);
2113
1516
  }
2114
- function _define_property(obj, key, value) {
2115
- if (key in obj) {
2116
- Object.defineProperty(obj, key, {
2117
- value: value,
2118
- enumerable: true,
2119
- configurable: true,
2120
- writable: true
2121
- });
2122
- } else {
2123
- obj[key] = value;
2124
- }
2125
- return obj;
1517
+ function _sliced_to_array(arr, i) {
1518
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
2126
1519
  }
2127
- function _object_spread(target) {
2128
- for(var i = 1; i < arguments.length; i++){
2129
- var source = arguments[i] != null ? arguments[i] : {};
2130
- var ownKeys = Object.keys(source);
2131
- if (typeof Object.getOwnPropertySymbols === "function") {
2132
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
2133
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2134
- }));
2135
- }
2136
- ownKeys.forEach(function(key) {
2137
- _define_property(target, key, source[key]);
2138
- });
1520
+ function _super_prop_base(object, property) {
1521
+ while(!Object.prototype.hasOwnProperty.call(object, property)){
1522
+ object = _get_prototype_of$1(object);
1523
+ if (object === null) break;
2139
1524
  }
2140
- return target;
1525
+ return object;
2141
1526
  }
2142
- function ownKeys(object, enumerableOnly) {
2143
- var keys = Object.keys(object);
2144
- if (Object.getOwnPropertySymbols) {
2145
- var symbols = Object.getOwnPropertySymbols(object);
2146
- keys.push.apply(keys, symbols);
2147
- }
2148
- return keys;
1527
+ function _type_of$1(obj) {
1528
+ "@swc/helpers - typeof";
1529
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2149
1530
  }
2150
- function _object_spread_props(target, source) {
2151
- source = source != null ? source : {};
2152
- if (Object.getOwnPropertyDescriptors) {
2153
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2154
- } else {
2155
- ownKeys(Object(source)).forEach(function(key) {
2156
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2157
- });
1531
+ function _unsupported_iterable_to_array(o, minLen) {
1532
+ if (!o) return;
1533
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
1534
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1535
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1536
+ if (n === "Map" || n === "Set") return Array.from(n);
1537
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
1538
+ }
1539
+ function _is_native_reflect_construct$1() {
1540
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1541
+ if (Reflect.construct.sham) return false;
1542
+ if (typeof Proxy === "function") return true;
1543
+ try {
1544
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1545
+ return true;
1546
+ } catch (e) {
1547
+ return false;
2158
1548
  }
2159
- return target;
1549
+ }
1550
+ function _create_super$1(Derived) {
1551
+ var hasNativeReflectConstruct = _is_native_reflect_construct$1();
1552
+ return function _createSuperInternal() {
1553
+ var Super = _get_prototype_of$1(Derived), result;
1554
+ if (hasNativeReflectConstruct) {
1555
+ var NewTarget = _get_prototype_of$1(this).constructor;
1556
+ result = Reflect.construct(Super, arguments, NewTarget);
1557
+ } else {
1558
+ result = Super.apply(this, arguments);
1559
+ }
1560
+ return _possible_constructor_return$1(this, result);
1561
+ };
2160
1562
  }
2161
1563
  function _ts_generator(thisArg, body) {
2162
1564
  var f, y, t, g, _ = {
@@ -2253,292 +1655,67 @@ function _ts_generator(thisArg, body) {
2253
1655
  };
2254
1656
  }
2255
1657
  }
2256
- var se_GetRoleCredentialsCommand = function() {
2257
- var _ref = _async_to_generator(function(input, context) {
2258
- var b, headers, _obj, query, body;
2259
- return _ts_generator(this, function(_state) {
2260
- b = requestBuilder(input, context);
2261
- headers = map({}, isSerializableHeaderValue, _define_property({}, _xasbt, input[_aT]));
2262
- b.bp("/federation/credentials");
2263
- query = map((_obj = {}, _define_property(_obj, _rn, [
2264
- expectNonNull(input[_rN], "roleName")
2265
- ]), _define_property(_obj, _ai, [
2266
- expectNonNull(input[_aI], "accountId")
2267
- ]), _obj));
2268
- b.m("GET").h(headers).q(query).b(body);
2269
- return [
2270
- 2,
2271
- b.build()
2272
- ];
2273
- });
2274
- });
2275
- return function se_GetRoleCredentialsCommand(input, context) {
2276
- return _ref.apply(this, arguments);
2277
- };
2278
- }();
2279
- var de_GetRoleCredentialsCommand = function() {
2280
- var _ref = _async_to_generator(function(output, context) {
2281
- var contents, data, doc;
2282
- return _ts_generator(this, function(_state) {
2283
- switch(_state.label){
2284
- case 0:
2285
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1658
+ var SSOClient = /*#__PURE__*/ function(__Client) {
1659
+ _inherits$1(SSOClient, __Client);
1660
+ var _super = _create_super$1(SSOClient);
1661
+ function SSOClient() {
1662
+ for(var _len = arguments.length, _tmp = new Array(_len), _key = 0; _key < _len; _key++){
1663
+ _tmp[_key] = arguments[_key];
1664
+ }
1665
+ var _tmp1 = _sliced_to_array(_tmp, 1), configuration = _tmp1[0];
1666
+ _class_call_check$1(this, SSOClient);
1667
+ var _this;
1668
+ var _config_0 = getRuntimeConfig(configuration || {});
1669
+ _this = _super.call(this, _config_0);
1670
+ _define_property(_assert_this_initialized$1(_this), "config", void 0);
1671
+ _this.initConfig = _config_0;
1672
+ var _config_1 = resolveClientEndpointParameters(_config_0);
1673
+ var _config_2 = resolveUserAgentConfig(_config_1);
1674
+ var _config_3 = resolveRetryConfig(_config_2);
1675
+ var _config_4 = resolveRegionConfig(_config_3);
1676
+ var _config_5 = resolveHostHeaderConfig(_config_4);
1677
+ var _config_6 = resolveEndpointConfig(_config_5);
1678
+ var _config_7 = resolveHttpAuthSchemeConfig(_config_6);
1679
+ var _config_8 = resolveRuntimeExtensions(_config_7, (configuration === null || configuration === void 0 ? void 0 : configuration.extensions) || []);
1680
+ _this.config = _config_8;
1681
+ _this.middlewareStack.use(getSchemaSerdePlugin(_this.config));
1682
+ _this.middlewareStack.use(getUserAgentPlugin(_this.config));
1683
+ _this.middlewareStack.use(getRetryPlugin(_this.config));
1684
+ _this.middlewareStack.use(getContentLengthPlugin(_this.config));
1685
+ _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
1686
+ _this.middlewareStack.use(getLoggerPlugin(_this.config));
1687
+ _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
1688
+ _this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(_this.config, {
1689
+ httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
1690
+ identityProviderConfigProvider: function() {
1691
+ var _ref = _async_to_generator(function(config) {
1692
+ return _ts_generator(this, function(_state) {
2286
1693
  return [
2287
1694
  2,
2288
- de_CommandError(output, context)
1695
+ new DefaultIdentityProviderConfig({
1696
+ "aws.auth#sigv4": config.credentials
1697
+ })
2289
1698
  ];
2290
- }
2291
- contents = map({
2292
- $metadata: deserializeMetadata(output)
2293
- });
2294
- return [
2295
- 4,
2296
- parseJsonBody(output.body, context)
2297
- ];
2298
- case 1:
2299
- data = expectNonNull.apply(void 0, [
2300
- expectObject.apply(void 0, [
2301
- _state.sent()
2302
- ]),
2303
- "body"
2304
- ]);
2305
- doc = take(data, {
2306
- roleCredentials: _json
2307
1699
  });
2308
- Object.assign(contents, doc);
2309
- return [
2310
- 2,
2311
- contents
2312
- ];
2313
- }
2314
- });
2315
- });
2316
- return function de_GetRoleCredentialsCommand(output, context) {
2317
- return _ref.apply(this, arguments);
2318
- };
2319
- }();
2320
- var de_CommandError = function() {
2321
- var _ref = _async_to_generator(function(output, context) {
2322
- var parsedOutput, _tmp, _tmp1, errorCode, parsedBody;
2323
- return _ts_generator(this, function(_state) {
2324
- switch(_state.label){
2325
- case 0:
2326
- _tmp = [
2327
- _object_spread({}, output)
2328
- ];
2329
- _tmp1 = {};
2330
- return [
2331
- 4,
2332
- parseJsonErrorBody(output.body, context)
2333
- ];
2334
- case 1:
2335
- parsedOutput = _object_spread_props.apply(void 0, _tmp.concat([
2336
- (_tmp1.body = _state.sent(), _tmp1)
2337
- ]));
2338
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2339
- switch(errorCode){
2340
- case "InvalidRequestException":
2341
- return [
2342
- 3,
2343
- 2
2344
- ];
2345
- case "com.amazonaws.sso#InvalidRequestException":
2346
- return [
2347
- 3,
2348
- 2
2349
- ];
2350
- case "ResourceNotFoundException":
2351
- return [
2352
- 3,
2353
- 4
2354
- ];
2355
- case "com.amazonaws.sso#ResourceNotFoundException":
2356
- return [
2357
- 3,
2358
- 4
2359
- ];
2360
- case "TooManyRequestsException":
2361
- return [
2362
- 3,
2363
- 6
2364
- ];
2365
- case "com.amazonaws.sso#TooManyRequestsException":
2366
- return [
2367
- 3,
2368
- 6
2369
- ];
2370
- case "UnauthorizedException":
2371
- return [
2372
- 3,
2373
- 8
2374
- ];
2375
- case "com.amazonaws.sso#UnauthorizedException":
2376
- return [
2377
- 3,
2378
- 8
2379
- ];
2380
- }
2381
- return [
2382
- 3,
2383
- 10
2384
- ];
2385
- case 2:
2386
- return [
2387
- 4,
2388
- de_InvalidRequestExceptionRes(parsedOutput, context)
2389
- ];
2390
- case 3:
2391
- throw _state.sent();
2392
- case 4:
2393
- return [
2394
- 4,
2395
- de_ResourceNotFoundExceptionRes(parsedOutput, context)
2396
- ];
2397
- case 5:
2398
- throw _state.sent();
2399
- case 6:
2400
- return [
2401
- 4,
2402
- de_TooManyRequestsExceptionRes(parsedOutput, context)
2403
- ];
2404
- case 7:
2405
- throw _state.sent();
2406
- case 8:
2407
- return [
2408
- 4,
2409
- de_UnauthorizedExceptionRes(parsedOutput, context)
2410
- ];
2411
- case 9:
2412
- throw _state.sent();
2413
- case 10:
2414
- parsedBody = parsedOutput.body;
2415
- return [
2416
- 2,
2417
- throwDefaultError({
2418
- output: output,
2419
- parsedBody: parsedBody,
2420
- errorCode: errorCode
2421
- })
2422
- ];
2423
- case 11:
2424
- return [
2425
- 2
2426
- ];
1700
+ });
1701
+ return function(config) {
1702
+ return _ref.apply(this, arguments);
1703
+ };
1704
+ }()
1705
+ }));
1706
+ _this.middlewareStack.use(getHttpSigningPlugin(_this.config));
1707
+ return _this;
1708
+ }
1709
+ _create_class(SSOClient, [
1710
+ {
1711
+ key: "destroy",
1712
+ value: function destroy() {
1713
+ _get(_get_prototype_of$1(SSOClient.prototype), "destroy", this).call(this);
2427
1714
  }
2428
- });
2429
- });
2430
- return function de_CommandError(output, context) {
2431
- return _ref.apply(this, arguments);
2432
- };
2433
- }();
2434
- var throwDefaultError = withBaseException(SSOServiceException);
2435
- var de_InvalidRequestExceptionRes = function() {
2436
- var _ref = _async_to_generator(function(parsedOutput, context) {
2437
- var contents, data, doc, exception;
2438
- return _ts_generator(this, function(_state) {
2439
- contents = map({});
2440
- data = parsedOutput.body;
2441
- doc = take(data, {
2442
- message: expectString
2443
- });
2444
- Object.assign(contents, doc);
2445
- exception = new InvalidRequestException(_object_spread({
2446
- $metadata: deserializeMetadata(parsedOutput)
2447
- }, contents));
2448
- return [
2449
- 2,
2450
- decorateServiceException(exception, parsedOutput.body)
2451
- ];
2452
- });
2453
- });
2454
- return function de_InvalidRequestExceptionRes(parsedOutput, context) {
2455
- return _ref.apply(this, arguments);
2456
- };
2457
- }();
2458
- var de_ResourceNotFoundExceptionRes = function() {
2459
- var _ref = _async_to_generator(function(parsedOutput, context) {
2460
- var contents, data, doc, exception;
2461
- return _ts_generator(this, function(_state) {
2462
- contents = map({});
2463
- data = parsedOutput.body;
2464
- doc = take(data, {
2465
- message: expectString
2466
- });
2467
- Object.assign(contents, doc);
2468
- exception = new ResourceNotFoundException(_object_spread({
2469
- $metadata: deserializeMetadata(parsedOutput)
2470
- }, contents));
2471
- return [
2472
- 2,
2473
- decorateServiceException(exception, parsedOutput.body)
2474
- ];
2475
- });
2476
- });
2477
- return function de_ResourceNotFoundExceptionRes(parsedOutput, context) {
2478
- return _ref.apply(this, arguments);
2479
- };
2480
- }();
2481
- var de_TooManyRequestsExceptionRes = function() {
2482
- var _ref = _async_to_generator(function(parsedOutput, context) {
2483
- var contents, data, doc, exception;
2484
- return _ts_generator(this, function(_state) {
2485
- contents = map({});
2486
- data = parsedOutput.body;
2487
- doc = take(data, {
2488
- message: expectString
2489
- });
2490
- Object.assign(contents, doc);
2491
- exception = new TooManyRequestsException(_object_spread({
2492
- $metadata: deserializeMetadata(parsedOutput)
2493
- }, contents));
2494
- return [
2495
- 2,
2496
- decorateServiceException(exception, parsedOutput.body)
2497
- ];
2498
- });
2499
- });
2500
- return function de_TooManyRequestsExceptionRes(parsedOutput, context) {
2501
- return _ref.apply(this, arguments);
2502
- };
2503
- }();
2504
- var de_UnauthorizedExceptionRes = function() {
2505
- var _ref = _async_to_generator(function(parsedOutput, context) {
2506
- var contents, data, doc, exception;
2507
- return _ts_generator(this, function(_state) {
2508
- contents = map({});
2509
- data = parsedOutput.body;
2510
- doc = take(data, {
2511
- message: expectString
2512
- });
2513
- Object.assign(contents, doc);
2514
- exception = new UnauthorizedException(_object_spread({
2515
- $metadata: deserializeMetadata(parsedOutput)
2516
- }, contents));
2517
- return [
2518
- 2,
2519
- decorateServiceException(exception, parsedOutput.body)
2520
- ];
2521
- });
2522
- });
2523
- return function de_UnauthorizedExceptionRes(parsedOutput, context) {
2524
- return _ref.apply(this, arguments);
2525
- };
2526
- }();
2527
- var deserializeMetadata = function(output) {
2528
- var _output_headers_xamznrequestid, _ref;
2529
- return {
2530
- httpStatusCode: output.statusCode,
2531
- requestId: (_ref = (_output_headers_xamznrequestid = output.headers["x-amzn-requestid"]) !== null && _output_headers_xamznrequestid !== void 0 ? _output_headers_xamznrequestid : output.headers["x-amzn-request-id"]) !== null && _ref !== void 0 ? _ref : output.headers["x-amz-request-id"],
2532
- extendedRequestId: output.headers["x-amz-id-2"],
2533
- cfId: output.headers["x-amz-cf-id"]
2534
- };
2535
- };
2536
- var _aI = "accountId";
2537
- var _aT = "accessToken";
2538
- var _ai = "account_id";
2539
- var _rN = "roleName";
2540
- var _rn = "role_name";
2541
- var _xasbt = "x-amz-sso_bearer_token";
1715
+ }
1716
+ ]);
1717
+ return SSOClient;
1718
+ }(Client);
2542
1719
 
2543
1720
  function _assert_this_initialized(self) {
2544
1721
  if (self === void 0) {
@@ -2611,8 +1788,8 @@ function _create_super(Derived) {
2611
1788
  return _possible_constructor_return(this, result);
2612
1789
  };
2613
1790
  }
2614
- var GetRoleCredentialsCommand = /*#__PURE__*/ function(_$Command_classBuilder_ep_m_s_n_f_ser_de_build) {
2615
- _inherits(GetRoleCredentialsCommand, _$Command_classBuilder_ep_m_s_n_f_ser_de_build);
1791
+ var GetRoleCredentialsCommand = /*#__PURE__*/ function(_$Command_classBuilder_ep_m_s_n_sc_build) {
1792
+ _inherits(GetRoleCredentialsCommand, _$Command_classBuilder_ep_m_s_n_sc_build);
2616
1793
  var _super = _create_super(GetRoleCredentialsCommand);
2617
1794
  function GetRoleCredentialsCommand() {
2618
1795
  _class_call_check(this, GetRoleCredentialsCommand);
@@ -2621,9 +1798,8 @@ var GetRoleCredentialsCommand = /*#__PURE__*/ function(_$Command_classBuilder_ep
2621
1798
  return GetRoleCredentialsCommand;
2622
1799
  }(Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
2623
1800
  return [
2624
- getSerdePlugin(config, this.serialize, this.deserialize),
2625
1801
  getEndpointPlugin(config, Command.getEndpointParameterInstructions())
2626
1802
  ];
2627
- }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build());
1803
+ }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").sc(GetRoleCredentials$).build());
2628
1804
 
2629
1805
  export { GetRoleCredentialsCommand, SSOClient };