@digipair/skill-s3 0.114.1 → 0.114.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2090 @@
1
+ import { v as resolveAwsSdkSigV4Config, w as normalizeProvider, x as getSmithyContext, y as EndpointCache, z as resolveEndpoint, A as awsEndpointFunctions, B as customEndpointFunctions, D as toUtf8, F as fromUtf8, n as parseUrl, G as NoOpLogger, J as AwsSdkSigV4Signer, K as toBase64, L as fromBase64, M as emitWarningIfUnsupportedVersion, O as resolveDefaultsModeConfig, Q as emitWarningIfUnsupportedVersion$1, o as loadConfig, R as NODE_APP_ID_CONFIG_OPTIONS, S as NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, T as NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, U as streamCollector, V as Hash, N 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 SENSITIVE_STRING, aq as requestBuilder, ar as map, as as isSerializableHeaderValue, at as expectNonNull, au as expectObject, av as take, aw as withBaseException, ax as expectString, ay as decorateServiceException, az as Command, aA as getSerdePlugin, aB as getEndpointPlugin } from './index.esm3.js';
2
+ import { p as parseJsonBody, l as loadRestJsonErrorCode, a as parseJsonErrorBody, _ as _json } from './parseJsonBody.esm.js';
3
+ import { N as NoAuthSigner } from './noAuth.esm.js';
4
+ import 'buffer';
5
+ import 'path';
6
+ import 'os';
7
+ import 'fs';
8
+ import 'stream';
9
+ import 'crypto';
10
+ import 'http';
11
+ import 'https';
12
+ import 'process';
13
+ import 'node:fs';
14
+ import 'async_hooks';
15
+ import 'zlib';
16
+ import 'node:stream';
17
+
18
+ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
19
+ try {
20
+ var info = gen[key](arg);
21
+ var value = info.value;
22
+ } catch (error) {
23
+ reject(error);
24
+ return;
25
+ }
26
+ if (info.done) {
27
+ resolve(value);
28
+ } else {
29
+ Promise.resolve(value).then(_next, _throw);
30
+ }
31
+ }
32
+ function _async_to_generator$4(fn) {
33
+ return function() {
34
+ var self = this, args = arguments;
35
+ return new Promise(function(resolve, reject) {
36
+ var gen = fn.apply(self, args);
37
+ function _next(value) {
38
+ asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
39
+ }
40
+ function _throw(err) {
41
+ asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "throw", err);
42
+ }
43
+ _next(undefined);
44
+ });
45
+ };
46
+ }
47
+ function _ts_generator$4(thisArg, body) {
48
+ var f, y, t, g, _ = {
49
+ label: 0,
50
+ sent: function() {
51
+ if (t[0] & 1) throw t[1];
52
+ return t[1];
53
+ },
54
+ trys: [],
55
+ ops: []
56
+ };
57
+ return g = {
58
+ next: verb(0),
59
+ "throw": verb(1),
60
+ "return": verb(2)
61
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
62
+ return this;
63
+ }), g;
64
+ function verb(n) {
65
+ return function(v) {
66
+ return step([
67
+ n,
68
+ v
69
+ ]);
70
+ };
71
+ }
72
+ function step(op) {
73
+ if (f) throw new TypeError("Generator is already executing.");
74
+ while(_)try {
75
+ 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;
76
+ if (y = 0, t) op = [
77
+ op[0] & 2,
78
+ t.value
79
+ ];
80
+ switch(op[0]){
81
+ case 0:
82
+ case 1:
83
+ t = op;
84
+ break;
85
+ case 4:
86
+ _.label++;
87
+ return {
88
+ value: op[1],
89
+ done: false
90
+ };
91
+ case 5:
92
+ _.label++;
93
+ y = op[1];
94
+ op = [
95
+ 0
96
+ ];
97
+ continue;
98
+ case 7:
99
+ op = _.ops.pop();
100
+ _.trys.pop();
101
+ continue;
102
+ default:
103
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
104
+ _ = 0;
105
+ continue;
106
+ }
107
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
108
+ _.label = op[1];
109
+ break;
110
+ }
111
+ if (op[0] === 6 && _.label < t[1]) {
112
+ _.label = t[1];
113
+ t = op;
114
+ break;
115
+ }
116
+ if (t && _.label < t[2]) {
117
+ _.label = t[2];
118
+ _.ops.push(op);
119
+ break;
120
+ }
121
+ if (t[2]) _.ops.pop();
122
+ _.trys.pop();
123
+ continue;
124
+ }
125
+ op = body.call(thisArg, _);
126
+ } catch (e) {
127
+ op = [
128
+ 6,
129
+ e
130
+ ];
131
+ y = 0;
132
+ } finally{
133
+ f = t = 0;
134
+ }
135
+ if (op[0] & 5) throw op[1];
136
+ return {
137
+ value: op[0] ? op[1] : void 0,
138
+ done: true
139
+ };
140
+ }
141
+ }
142
+ var defaultSSOHttpAuthSchemeParametersProvider = function() {
143
+ var _ref = _async_to_generator$4(function(config, context, input) {
144
+ var _tmp;
145
+ return _ts_generator$4(this, function(_state) {
146
+ switch(_state.label){
147
+ case 0:
148
+ _tmp = {
149
+ operation: getSmithyContext(context).operation
150
+ };
151
+ return [
152
+ 4,
153
+ normalizeProvider(config.region)()
154
+ ];
155
+ case 1:
156
+ return [
157
+ 2,
158
+ (_tmp.region = _state.sent() || function() {
159
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
160
+ }(), _tmp)
161
+ ];
162
+ }
163
+ });
164
+ });
165
+ return function defaultSSOHttpAuthSchemeParametersProvider(config, context, input) {
166
+ return _ref.apply(this, arguments);
167
+ };
168
+ }();
169
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
170
+ return {
171
+ schemeId: "aws.auth#sigv4",
172
+ signingProperties: {
173
+ name: "awsssoportal",
174
+ region: authParameters.region
175
+ },
176
+ propertiesExtractor: function(config, context) {
177
+ return {
178
+ signingProperties: {
179
+ config: config,
180
+ context: context
181
+ }
182
+ };
183
+ }
184
+ };
185
+ }
186
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
187
+ return {
188
+ schemeId: "smithy.api#noAuth"
189
+ };
190
+ }
191
+ var defaultSSOHttpAuthSchemeProvider = function(authParameters) {
192
+ var options = [];
193
+ switch(authParameters.operation){
194
+ case "GetRoleCredentials":
195
+ {
196
+ options.push(createSmithyApiNoAuthHttpAuthOption());
197
+ break;
198
+ }
199
+ case "ListAccountRoles":
200
+ {
201
+ options.push(createSmithyApiNoAuthHttpAuthOption());
202
+ break;
203
+ }
204
+ case "ListAccounts":
205
+ {
206
+ options.push(createSmithyApiNoAuthHttpAuthOption());
207
+ break;
208
+ }
209
+ case "Logout":
210
+ {
211
+ options.push(createSmithyApiNoAuthHttpAuthOption());
212
+ break;
213
+ }
214
+ default:
215
+ {
216
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
217
+ }
218
+ }
219
+ return options;
220
+ };
221
+ var resolveHttpAuthSchemeConfig = function(config) {
222
+ var config_0 = resolveAwsSdkSigV4Config(config);
223
+ var _config_authSchemePreference;
224
+ return Object.assign(config_0, {
225
+ authSchemePreference: normalizeProvider((_config_authSchemePreference = config.authSchemePreference) !== null && _config_authSchemePreference !== void 0 ? _config_authSchemePreference : [])
226
+ });
227
+ };
228
+
229
+ var resolveClientEndpointParameters = function(options) {
230
+ var _options_useDualstackEndpoint, _options_useFipsEndpoint;
231
+ return Object.assign(options, {
232
+ useDualstackEndpoint: (_options_useDualstackEndpoint = options.useDualstackEndpoint) !== null && _options_useDualstackEndpoint !== void 0 ? _options_useDualstackEndpoint : false,
233
+ useFipsEndpoint: (_options_useFipsEndpoint = options.useFipsEndpoint) !== null && _options_useFipsEndpoint !== void 0 ? _options_useFipsEndpoint : false,
234
+ defaultSigningName: "awsssoportal"
235
+ });
236
+ };
237
+ var commonParams = {
238
+ UseFIPS: {
239
+ type: "builtInParams",
240
+ name: "useFipsEndpoint"
241
+ },
242
+ Endpoint: {
243
+ type: "builtInParams",
244
+ name: "endpoint"
245
+ },
246
+ Region: {
247
+ type: "builtInParams",
248
+ name: "region"
249
+ },
250
+ UseDualStack: {
251
+ type: "builtInParams",
252
+ name: "useDualstackEndpoint"
253
+ }
254
+ };
255
+
256
+ var version = "3.911.0";
257
+ var packageInfo = {
258
+ version: version};
259
+
260
+ function _define_property$4(obj, key, value) {
261
+ if (key in obj) {
262
+ Object.defineProperty(obj, key, {
263
+ value: value,
264
+ enumerable: true,
265
+ configurable: true,
266
+ writable: true
267
+ });
268
+ } else {
269
+ obj[key] = value;
270
+ }
271
+ return obj;
272
+ }
273
+ var u = "required", v = "fn", w = "argv", x = "ref";
274
+ var _obj, _obj1, _obj2, _obj3, _obj4, _obj5, _obj6;
275
+ 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, [
276
+ _define_property$4({}, x, "UseFIPS"),
277
+ true
278
+ ]), _obj2), m = (_obj3 = {}, _define_property$4(_obj3, v, c), _define_property$4(_obj3, w, [
279
+ _define_property$4({}, x, "UseDualStack"),
280
+ true
281
+ ]), _obj3), n = {}, o = (_obj4 = {}, _define_property$4(_obj4, v, h), _define_property$4(_obj4, w, [
282
+ _define_property$4({}, x, g),
283
+ "supportsFIPS"
284
+ ]), _obj4), p = _define_property$4({}, x, g), q = (_obj6 = {}, _define_property$4(_obj6, v, c), _define_property$4(_obj6, w, [
285
+ true,
286
+ (_obj5 = {}, _define_property$4(_obj5, v, h), _define_property$4(_obj5, w, [
287
+ p,
288
+ "supportsDualStack"
289
+ ]), _obj5)
290
+ ]), _obj6), r = [
291
+ l
292
+ ], s = [
293
+ m
294
+ ], t = [
295
+ _define_property$4({}, x, "Region")
296
+ ];
297
+ var _obj7, _obj8, _obj9, _obj10, _obj11, _obj12, _obj13;
298
+ var _data = {
299
+ parameters: {
300
+ Region: i,
301
+ UseDualStack: j,
302
+ UseFIPS: j,
303
+ Endpoint: i
304
+ },
305
+ rules: [
306
+ {
307
+ conditions: [
308
+ (_obj7 = {}, _define_property$4(_obj7, v, b), _define_property$4(_obj7, w, [
309
+ k
310
+ ]), _obj7)
311
+ ],
312
+ rules: [
313
+ {
314
+ conditions: r,
315
+ error: "Invalid Configuration: FIPS and custom endpoint are not supported",
316
+ type: d
317
+ },
318
+ {
319
+ conditions: s,
320
+ error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
321
+ type: d
322
+ },
323
+ {
324
+ endpoint: {
325
+ url: k,
326
+ properties: n,
327
+ headers: n
328
+ },
329
+ type: e
330
+ }
331
+ ],
332
+ type: f
333
+ },
334
+ {
335
+ conditions: [
336
+ (_obj8 = {}, _define_property$4(_obj8, v, b), _define_property$4(_obj8, w, t), _obj8)
337
+ ],
338
+ rules: [
339
+ {
340
+ conditions: [
341
+ (_obj9 = {}, _define_property$4(_obj9, v, "aws.partition"), _define_property$4(_obj9, w, t), _define_property$4(_obj9, "assign", g), _obj9)
342
+ ],
343
+ rules: [
344
+ {
345
+ conditions: [
346
+ l,
347
+ m
348
+ ],
349
+ rules: [
350
+ {
351
+ conditions: [
352
+ (_obj10 = {}, _define_property$4(_obj10, v, c), _define_property$4(_obj10, w, [
353
+ a,
354
+ o
355
+ ]), _obj10),
356
+ q
357
+ ],
358
+ rules: [
359
+ {
360
+ endpoint: {
361
+ url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
362
+ properties: n,
363
+ headers: n
364
+ },
365
+ type: e
366
+ }
367
+ ],
368
+ type: f
369
+ },
370
+ {
371
+ error: "FIPS and DualStack are enabled, but this partition does not support one or both",
372
+ type: d
373
+ }
374
+ ],
375
+ type: f
376
+ },
377
+ {
378
+ conditions: r,
379
+ rules: [
380
+ {
381
+ conditions: [
382
+ (_obj11 = {}, _define_property$4(_obj11, v, c), _define_property$4(_obj11, w, [
383
+ o,
384
+ a
385
+ ]), _obj11)
386
+ ],
387
+ rules: [
388
+ {
389
+ conditions: [
390
+ (_obj13 = {}, _define_property$4(_obj13, v, "stringEquals"), _define_property$4(_obj13, w, [
391
+ (_obj12 = {}, _define_property$4(_obj12, v, h), _define_property$4(_obj12, w, [
392
+ p,
393
+ "name"
394
+ ]), _obj12),
395
+ "aws-us-gov"
396
+ ]), _obj13)
397
+ ],
398
+ endpoint: {
399
+ url: "https://portal.sso.{Region}.amazonaws.com",
400
+ properties: n,
401
+ headers: n
402
+ },
403
+ type: e
404
+ },
405
+ {
406
+ endpoint: {
407
+ url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",
408
+ properties: n,
409
+ headers: n
410
+ },
411
+ type: e
412
+ }
413
+ ],
414
+ type: f
415
+ },
416
+ {
417
+ error: "FIPS is enabled but this partition does not support FIPS",
418
+ type: d
419
+ }
420
+ ],
421
+ type: f
422
+ },
423
+ {
424
+ conditions: s,
425
+ rules: [
426
+ {
427
+ conditions: [
428
+ q
429
+ ],
430
+ rules: [
431
+ {
432
+ endpoint: {
433
+ url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",
434
+ properties: n,
435
+ headers: n
436
+ },
437
+ type: e
438
+ }
439
+ ],
440
+ type: f
441
+ },
442
+ {
443
+ error: "DualStack is enabled but this partition does not support DualStack",
444
+ type: d
445
+ }
446
+ ],
447
+ type: f
448
+ },
449
+ {
450
+ endpoint: {
451
+ url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",
452
+ properties: n,
453
+ headers: n
454
+ },
455
+ type: e
456
+ }
457
+ ],
458
+ type: f
459
+ }
460
+ ],
461
+ type: f
462
+ },
463
+ {
464
+ error: "Invalid Configuration: Missing Region",
465
+ type: d
466
+ }
467
+ ]
468
+ };
469
+ var ruleSet = _data;
470
+
471
+ var cache = new EndpointCache({
472
+ size: 50,
473
+ params: [
474
+ "Endpoint",
475
+ "Region",
476
+ "UseDualStack",
477
+ "UseFIPS"
478
+ ]
479
+ });
480
+ var defaultEndpointResolver = function(endpointParams) {
481
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
482
+ return cache.get(endpointParams, function() {
483
+ return resolveEndpoint(ruleSet, {
484
+ endpointParams: endpointParams,
485
+ logger: context.logger
486
+ });
487
+ });
488
+ };
489
+ customEndpointFunctions.aws = awsEndpointFunctions;
490
+
491
+ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
492
+ try {
493
+ var info = gen[key](arg);
494
+ var value = info.value;
495
+ } catch (error) {
496
+ reject(error);
497
+ return;
498
+ }
499
+ if (info.done) {
500
+ resolve(value);
501
+ } else {
502
+ Promise.resolve(value).then(_next, _throw);
503
+ }
504
+ }
505
+ function _async_to_generator$3(fn) {
506
+ return function() {
507
+ var self = this, args = arguments;
508
+ return new Promise(function(resolve, reject) {
509
+ var gen = fn.apply(self, args);
510
+ function _next(value) {
511
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
512
+ }
513
+ function _throw(err) {
514
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
515
+ }
516
+ _next(undefined);
517
+ });
518
+ };
519
+ }
520
+ function _ts_generator$3(thisArg, body) {
521
+ var f, y, t, g, _ = {
522
+ label: 0,
523
+ sent: function() {
524
+ if (t[0] & 1) throw t[1];
525
+ return t[1];
526
+ },
527
+ trys: [],
528
+ ops: []
529
+ };
530
+ return g = {
531
+ next: verb(0),
532
+ "throw": verb(1),
533
+ "return": verb(2)
534
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
535
+ return this;
536
+ }), g;
537
+ function verb(n) {
538
+ return function(v) {
539
+ return step([
540
+ n,
541
+ v
542
+ ]);
543
+ };
544
+ }
545
+ function step(op) {
546
+ if (f) throw new TypeError("Generator is already executing.");
547
+ while(_)try {
548
+ 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;
549
+ if (y = 0, t) op = [
550
+ op[0] & 2,
551
+ t.value
552
+ ];
553
+ switch(op[0]){
554
+ case 0:
555
+ case 1:
556
+ t = op;
557
+ break;
558
+ case 4:
559
+ _.label++;
560
+ return {
561
+ value: op[1],
562
+ done: false
563
+ };
564
+ case 5:
565
+ _.label++;
566
+ y = op[1];
567
+ op = [
568
+ 0
569
+ ];
570
+ continue;
571
+ case 7:
572
+ op = _.ops.pop();
573
+ _.trys.pop();
574
+ continue;
575
+ default:
576
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
577
+ _ = 0;
578
+ continue;
579
+ }
580
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
581
+ _.label = op[1];
582
+ break;
583
+ }
584
+ if (op[0] === 6 && _.label < t[1]) {
585
+ _.label = t[1];
586
+ t = op;
587
+ break;
588
+ }
589
+ if (t && _.label < t[2]) {
590
+ _.label = t[2];
591
+ _.ops.push(op);
592
+ break;
593
+ }
594
+ if (t[2]) _.ops.pop();
595
+ _.trys.pop();
596
+ continue;
597
+ }
598
+ op = body.call(thisArg, _);
599
+ } catch (e) {
600
+ op = [
601
+ 6,
602
+ e
603
+ ];
604
+ y = 0;
605
+ } finally{
606
+ f = t = 0;
607
+ }
608
+ if (op[0] & 5) throw op[1];
609
+ return {
610
+ value: op[0] ? op[1] : void 0,
611
+ done: true
612
+ };
613
+ }
614
+ }
615
+ var getRuntimeConfig$1 = function(config) {
616
+ 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;
617
+ return {
618
+ apiVersion: "2019-06-10",
619
+ base64Decoder: (_config_base64Decoder = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _config_base64Decoder !== void 0 ? _config_base64Decoder : fromBase64,
620
+ base64Encoder: (_config_base64Encoder = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _config_base64Encoder !== void 0 ? _config_base64Encoder : toBase64,
621
+ disableHostPrefix: (_config_disableHostPrefix = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _config_disableHostPrefix !== void 0 ? _config_disableHostPrefix : false,
622
+ endpointProvider: (_config_endpointProvider = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _config_endpointProvider !== void 0 ? _config_endpointProvider : defaultEndpointResolver,
623
+ extensions: (_config_extensions = config === null || config === void 0 ? void 0 : config.extensions) !== null && _config_extensions !== void 0 ? _config_extensions : [],
624
+ httpAuthSchemeProvider: (_config_httpAuthSchemeProvider = config === null || config === void 0 ? void 0 : config.httpAuthSchemeProvider) !== null && _config_httpAuthSchemeProvider !== void 0 ? _config_httpAuthSchemeProvider : defaultSSOHttpAuthSchemeProvider,
625
+ httpAuthSchemes: (_config_httpAuthSchemes = config === null || config === void 0 ? void 0 : config.httpAuthSchemes) !== null && _config_httpAuthSchemes !== void 0 ? _config_httpAuthSchemes : [
626
+ {
627
+ schemeId: "aws.auth#sigv4",
628
+ identityProvider: function(ipc) {
629
+ return ipc.getIdentityProvider("aws.auth#sigv4");
630
+ },
631
+ signer: new AwsSdkSigV4Signer()
632
+ },
633
+ {
634
+ schemeId: "smithy.api#noAuth",
635
+ identityProvider: function(ipc) {
636
+ return ipc.getIdentityProvider("smithy.api#noAuth") || /*#__PURE__*/ _async_to_generator$3(function() {
637
+ return _ts_generator$3(this, function(_state) {
638
+ return [
639
+ 2,
640
+ {}
641
+ ];
642
+ });
643
+ });
644
+ },
645
+ signer: new NoAuthSigner()
646
+ }
647
+ ],
648
+ logger: (_config_logger = config === null || config === void 0 ? void 0 : config.logger) !== null && _config_logger !== void 0 ? _config_logger : new NoOpLogger(),
649
+ serviceId: (_config_serviceId = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _config_serviceId !== void 0 ? _config_serviceId : "SSO",
650
+ urlParser: (_config_urlParser = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _config_urlParser !== void 0 ? _config_urlParser : parseUrl,
651
+ utf8Decoder: (_config_utf8Decoder = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _config_utf8Decoder !== void 0 ? _config_utf8Decoder : fromUtf8,
652
+ utf8Encoder: (_config_utf8Encoder = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _config_utf8Encoder !== void 0 ? _config_utf8Encoder : toUtf8
653
+ };
654
+ };
655
+
656
+ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
657
+ try {
658
+ var info = gen[key](arg);
659
+ var value = info.value;
660
+ } catch (error) {
661
+ reject(error);
662
+ return;
663
+ }
664
+ if (info.done) {
665
+ resolve(value);
666
+ } else {
667
+ Promise.resolve(value).then(_next, _throw);
668
+ }
669
+ }
670
+ function _async_to_generator$2(fn) {
671
+ return function() {
672
+ var self = this, args = arguments;
673
+ return new Promise(function(resolve, reject) {
674
+ var gen = fn.apply(self, args);
675
+ function _next(value) {
676
+ asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "next", value);
677
+ }
678
+ function _throw(err) {
679
+ asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, "throw", err);
680
+ }
681
+ _next(undefined);
682
+ });
683
+ };
684
+ }
685
+ function _define_property$3(obj, key, value) {
686
+ if (key in obj) {
687
+ Object.defineProperty(obj, key, {
688
+ value: value,
689
+ enumerable: true,
690
+ configurable: true,
691
+ writable: true
692
+ });
693
+ } else {
694
+ obj[key] = value;
695
+ }
696
+ return obj;
697
+ }
698
+ function _object_spread$2(target) {
699
+ for(var i = 1; i < arguments.length; i++){
700
+ var source = arguments[i] != null ? arguments[i] : {};
701
+ var ownKeys = Object.keys(source);
702
+ if (typeof Object.getOwnPropertySymbols === "function") {
703
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
704
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
705
+ }));
706
+ }
707
+ ownKeys.forEach(function(key) {
708
+ _define_property$3(target, key, source[key]);
709
+ });
710
+ }
711
+ return target;
712
+ }
713
+ function ownKeys$1(object, enumerableOnly) {
714
+ var keys = Object.keys(object);
715
+ if (Object.getOwnPropertySymbols) {
716
+ var symbols = Object.getOwnPropertySymbols(object);
717
+ keys.push.apply(keys, symbols);
718
+ }
719
+ return keys;
720
+ }
721
+ function _object_spread_props$1(target, source) {
722
+ source = source != null ? source : {};
723
+ if (Object.getOwnPropertyDescriptors) {
724
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
725
+ } else {
726
+ ownKeys$1(Object(source)).forEach(function(key) {
727
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
728
+ });
729
+ }
730
+ return target;
731
+ }
732
+ function _ts_generator$2(thisArg, body) {
733
+ var f, y, t, g, _ = {
734
+ label: 0,
735
+ sent: function() {
736
+ if (t[0] & 1) throw t[1];
737
+ return t[1];
738
+ },
739
+ trys: [],
740
+ ops: []
741
+ };
742
+ return g = {
743
+ next: verb(0),
744
+ "throw": verb(1),
745
+ "return": verb(2)
746
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
747
+ return this;
748
+ }), g;
749
+ function verb(n) {
750
+ return function(v) {
751
+ return step([
752
+ n,
753
+ v
754
+ ]);
755
+ };
756
+ }
757
+ function step(op) {
758
+ if (f) throw new TypeError("Generator is already executing.");
759
+ while(_)try {
760
+ 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;
761
+ if (y = 0, t) op = [
762
+ op[0] & 2,
763
+ t.value
764
+ ];
765
+ switch(op[0]){
766
+ case 0:
767
+ case 1:
768
+ t = op;
769
+ break;
770
+ case 4:
771
+ _.label++;
772
+ return {
773
+ value: op[1],
774
+ done: false
775
+ };
776
+ case 5:
777
+ _.label++;
778
+ y = op[1];
779
+ op = [
780
+ 0
781
+ ];
782
+ continue;
783
+ case 7:
784
+ op = _.ops.pop();
785
+ _.trys.pop();
786
+ continue;
787
+ default:
788
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
789
+ _ = 0;
790
+ continue;
791
+ }
792
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
793
+ _.label = op[1];
794
+ break;
795
+ }
796
+ if (op[0] === 6 && _.label < t[1]) {
797
+ _.label = t[1];
798
+ t = op;
799
+ break;
800
+ }
801
+ if (t && _.label < t[2]) {
802
+ _.label = t[2];
803
+ _.ops.push(op);
804
+ break;
805
+ }
806
+ if (t[2]) _.ops.pop();
807
+ _.trys.pop();
808
+ continue;
809
+ }
810
+ op = body.call(thisArg, _);
811
+ } catch (e) {
812
+ op = [
813
+ 6,
814
+ e
815
+ ];
816
+ y = 0;
817
+ } finally{
818
+ f = t = 0;
819
+ }
820
+ if (op[0] & 5) throw op[1];
821
+ return {
822
+ value: op[0] ? op[1] : void 0,
823
+ done: true
824
+ };
825
+ }
826
+ }
827
+ var getRuntimeConfig = function(config) {
828
+ emitWarningIfUnsupportedVersion(process.version);
829
+ var defaultsMode = resolveDefaultsModeConfig(config);
830
+ var defaultConfigProvider = function() {
831
+ return defaultsMode().then(loadConfigsForDefaultMode);
832
+ };
833
+ var clientSharedValues = getRuntimeConfig$1(config);
834
+ emitWarningIfUnsupportedVersion$1(process.version);
835
+ var loaderConfig = {
836
+ profile: config === null || config === void 0 ? void 0 : config.profile,
837
+ logger: clientSharedValues.logger
838
+ };
839
+ 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;
840
+ return _object_spread_props$1(_object_spread$2({}, clientSharedValues, config), {
841
+ runtime: "node",
842
+ defaultsMode: defaultsMode,
843
+ 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),
844
+ bodyLengthChecker: (_config_bodyLengthChecker = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _config_bodyLengthChecker !== void 0 ? _config_bodyLengthChecker : calculateBodyLength,
845
+ defaultUserAgentProvider: (_config_defaultUserAgentProvider = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _config_defaultUserAgentProvider !== void 0 ? _config_defaultUserAgentProvider : createDefaultUserAgentProvider({
846
+ serviceId: clientSharedValues.serviceId,
847
+ clientVersion: packageInfo.version
848
+ }),
849
+ 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),
850
+ 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)),
851
+ requestHandler: NodeHttpHandler.create((_config_requestHandler = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _config_requestHandler !== void 0 ? _config_requestHandler : defaultConfigProvider),
852
+ 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), {
853
+ default: /*#__PURE__*/ _async_to_generator$2(function() {
854
+ return _ts_generator$2(this, function(_state) {
855
+ switch(_state.label){
856
+ case 0:
857
+ return [
858
+ 4,
859
+ defaultConfigProvider()
860
+ ];
861
+ case 1:
862
+ return [
863
+ 2,
864
+ _state.sent().retryMode || DEFAULT_RETRY_MODE
865
+ ];
866
+ }
867
+ });
868
+ })
869
+ }), config),
870
+ sha256: (_config_sha256 = config === null || config === void 0 ? void 0 : config.sha256) !== null && _config_sha256 !== void 0 ? _config_sha256 : Hash.bind(null, "sha256"),
871
+ streamCollector: (_config_streamCollector = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _config_streamCollector !== void 0 ? _config_streamCollector : streamCollector,
872
+ 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),
873
+ 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),
874
+ 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)
875
+ });
876
+ };
877
+
878
+ var getHttpAuthExtensionConfiguration = function(runtimeConfig) {
879
+ var _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
880
+ var _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
881
+ var _credentials = runtimeConfig.credentials;
882
+ return {
883
+ setHttpAuthScheme: function setHttpAuthScheme(httpAuthScheme) {
884
+ var index = _httpAuthSchemes.findIndex(function(scheme) {
885
+ return scheme.schemeId === httpAuthScheme.schemeId;
886
+ });
887
+ if (index === -1) {
888
+ _httpAuthSchemes.push(httpAuthScheme);
889
+ } else {
890
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
891
+ }
892
+ },
893
+ httpAuthSchemes: function httpAuthSchemes() {
894
+ return _httpAuthSchemes;
895
+ },
896
+ setHttpAuthSchemeProvider: function setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
897
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
898
+ },
899
+ httpAuthSchemeProvider: function httpAuthSchemeProvider() {
900
+ return _httpAuthSchemeProvider;
901
+ },
902
+ setCredentials: function setCredentials(credentials) {
903
+ _credentials = credentials;
904
+ },
905
+ credentials: function credentials() {
906
+ return _credentials;
907
+ }
908
+ };
909
+ };
910
+ var resolveHttpAuthRuntimeConfig = function(config) {
911
+ return {
912
+ httpAuthSchemes: config.httpAuthSchemes(),
913
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
914
+ credentials: config.credentials()
915
+ };
916
+ };
917
+
918
+ var resolveRuntimeExtensions = function(runtimeConfig, extensions) {
919
+ var extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
920
+ extensions.forEach(function(extension) {
921
+ return extension.configure(extensionConfiguration);
922
+ });
923
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
924
+ };
925
+
926
+ function _array_like_to_array(arr, len) {
927
+ if (len == null || len > arr.length) len = arr.length;
928
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
929
+ return arr2;
930
+ }
931
+ function _array_with_holes(arr) {
932
+ if (Array.isArray(arr)) return arr;
933
+ }
934
+ function _assert_this_initialized$3(self) {
935
+ if (self === void 0) {
936
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
937
+ }
938
+ return self;
939
+ }
940
+ function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
941
+ try {
942
+ var info = gen[key](arg);
943
+ var value = info.value;
944
+ } catch (error) {
945
+ reject(error);
946
+ return;
947
+ }
948
+ if (info.done) {
949
+ resolve(value);
950
+ } else {
951
+ Promise.resolve(value).then(_next, _throw);
952
+ }
953
+ }
954
+ function _async_to_generator$1(fn) {
955
+ return function() {
956
+ var self = this, args = arguments;
957
+ return new Promise(function(resolve, reject) {
958
+ var gen = fn.apply(self, args);
959
+ function _next(value) {
960
+ asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value);
961
+ }
962
+ function _throw(err) {
963
+ asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err);
964
+ }
965
+ _next(undefined);
966
+ });
967
+ };
968
+ }
969
+ function _class_call_check$3(instance, Constructor) {
970
+ if (!(instance instanceof Constructor)) {
971
+ throw new TypeError("Cannot call a class as a function");
972
+ }
973
+ }
974
+ function _defineProperties(target, props) {
975
+ for(var i = 0; i < props.length; i++){
976
+ var descriptor = props[i];
977
+ descriptor.enumerable = descriptor.enumerable || false;
978
+ descriptor.configurable = true;
979
+ if ("value" in descriptor) descriptor.writable = true;
980
+ Object.defineProperty(target, descriptor.key, descriptor);
981
+ }
982
+ }
983
+ function _create_class(Constructor, protoProps, staticProps) {
984
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
985
+ return Constructor;
986
+ }
987
+ function _define_property$2(obj, key, value) {
988
+ if (key in obj) {
989
+ Object.defineProperty(obj, key, {
990
+ value: value,
991
+ enumerable: true,
992
+ configurable: true,
993
+ writable: true
994
+ });
995
+ } else {
996
+ obj[key] = value;
997
+ }
998
+ return obj;
999
+ }
1000
+ function _get(target, property, receiver) {
1001
+ if (typeof Reflect !== "undefined" && Reflect.get) {
1002
+ _get = Reflect.get;
1003
+ } else {
1004
+ _get = function get(target, property, receiver) {
1005
+ var base = _super_prop_base(target, property);
1006
+ if (!base) return;
1007
+ var desc = Object.getOwnPropertyDescriptor(base, property);
1008
+ if (desc.get) {
1009
+ return desc.get.call(receiver || target);
1010
+ }
1011
+ return desc.value;
1012
+ };
1013
+ }
1014
+ return _get(target, property, receiver || target);
1015
+ }
1016
+ function _get_prototype_of$3(o) {
1017
+ _get_prototype_of$3 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1018
+ return o.__proto__ || Object.getPrototypeOf(o);
1019
+ };
1020
+ return _get_prototype_of$3(o);
1021
+ }
1022
+ function _inherits$3(subClass, superClass) {
1023
+ if (typeof superClass !== "function" && superClass !== null) {
1024
+ throw new TypeError("Super expression must either be null or a function");
1025
+ }
1026
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
1027
+ constructor: {
1028
+ value: subClass,
1029
+ writable: true,
1030
+ configurable: true
1031
+ }
1032
+ });
1033
+ if (superClass) _set_prototype_of$3(subClass, superClass);
1034
+ }
1035
+ function _iterable_to_array_limit(arr, i) {
1036
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1037
+ if (_i == null) return;
1038
+ var _arr = [];
1039
+ var _n = true;
1040
+ var _d = false;
1041
+ var _s, _e;
1042
+ try {
1043
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1044
+ _arr.push(_s.value);
1045
+ if (i && _arr.length === i) break;
1046
+ }
1047
+ } catch (err) {
1048
+ _d = true;
1049
+ _e = err;
1050
+ } finally{
1051
+ try {
1052
+ if (!_n && _i["return"] != null) _i["return"]();
1053
+ } finally{
1054
+ if (_d) throw _e;
1055
+ }
1056
+ }
1057
+ return _arr;
1058
+ }
1059
+ function _non_iterable_rest() {
1060
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1061
+ }
1062
+ function _possible_constructor_return$3(self, call) {
1063
+ if (call && (_type_of$3(call) === "object" || typeof call === "function")) {
1064
+ return call;
1065
+ }
1066
+ return _assert_this_initialized$3(self);
1067
+ }
1068
+ function _set_prototype_of$3(o, p) {
1069
+ _set_prototype_of$3 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1070
+ o.__proto__ = p;
1071
+ return o;
1072
+ };
1073
+ return _set_prototype_of$3(o, p);
1074
+ }
1075
+ function _sliced_to_array(arr, i) {
1076
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
1077
+ }
1078
+ function _super_prop_base(object, property) {
1079
+ while(!Object.prototype.hasOwnProperty.call(object, property)){
1080
+ object = _get_prototype_of$3(object);
1081
+ if (object === null) break;
1082
+ }
1083
+ return object;
1084
+ }
1085
+ function _type_of$3(obj) {
1086
+ "@swc/helpers - typeof";
1087
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1088
+ }
1089
+ function _unsupported_iterable_to_array(o, minLen) {
1090
+ if (!o) return;
1091
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
1092
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1093
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1094
+ if (n === "Map" || n === "Set") return Array.from(n);
1095
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
1096
+ }
1097
+ function _is_native_reflect_construct$3() {
1098
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1099
+ if (Reflect.construct.sham) return false;
1100
+ if (typeof Proxy === "function") return true;
1101
+ try {
1102
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1103
+ return true;
1104
+ } catch (e) {
1105
+ return false;
1106
+ }
1107
+ }
1108
+ function _create_super$3(Derived) {
1109
+ var hasNativeReflectConstruct = _is_native_reflect_construct$3();
1110
+ return function _createSuperInternal() {
1111
+ var Super = _get_prototype_of$3(Derived), result;
1112
+ if (hasNativeReflectConstruct) {
1113
+ var NewTarget = _get_prototype_of$3(this).constructor;
1114
+ result = Reflect.construct(Super, arguments, NewTarget);
1115
+ } else {
1116
+ result = Super.apply(this, arguments);
1117
+ }
1118
+ return _possible_constructor_return$3(this, result);
1119
+ };
1120
+ }
1121
+ function _ts_generator$1(thisArg, body) {
1122
+ var f, y, t, g, _ = {
1123
+ label: 0,
1124
+ sent: function() {
1125
+ if (t[0] & 1) throw t[1];
1126
+ return t[1];
1127
+ },
1128
+ trys: [],
1129
+ ops: []
1130
+ };
1131
+ return g = {
1132
+ next: verb(0),
1133
+ "throw": verb(1),
1134
+ "return": verb(2)
1135
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
1136
+ return this;
1137
+ }), g;
1138
+ function verb(n) {
1139
+ return function(v) {
1140
+ return step([
1141
+ n,
1142
+ v
1143
+ ]);
1144
+ };
1145
+ }
1146
+ function step(op) {
1147
+ if (f) throw new TypeError("Generator is already executing.");
1148
+ while(_)try {
1149
+ 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;
1150
+ if (y = 0, t) op = [
1151
+ op[0] & 2,
1152
+ t.value
1153
+ ];
1154
+ switch(op[0]){
1155
+ case 0:
1156
+ case 1:
1157
+ t = op;
1158
+ break;
1159
+ case 4:
1160
+ _.label++;
1161
+ return {
1162
+ value: op[1],
1163
+ done: false
1164
+ };
1165
+ case 5:
1166
+ _.label++;
1167
+ y = op[1];
1168
+ op = [
1169
+ 0
1170
+ ];
1171
+ continue;
1172
+ case 7:
1173
+ op = _.ops.pop();
1174
+ _.trys.pop();
1175
+ continue;
1176
+ default:
1177
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
1178
+ _ = 0;
1179
+ continue;
1180
+ }
1181
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
1182
+ _.label = op[1];
1183
+ break;
1184
+ }
1185
+ if (op[0] === 6 && _.label < t[1]) {
1186
+ _.label = t[1];
1187
+ t = op;
1188
+ break;
1189
+ }
1190
+ if (t && _.label < t[2]) {
1191
+ _.label = t[2];
1192
+ _.ops.push(op);
1193
+ break;
1194
+ }
1195
+ if (t[2]) _.ops.pop();
1196
+ _.trys.pop();
1197
+ continue;
1198
+ }
1199
+ op = body.call(thisArg, _);
1200
+ } catch (e) {
1201
+ op = [
1202
+ 6,
1203
+ e
1204
+ ];
1205
+ y = 0;
1206
+ } finally{
1207
+ f = t = 0;
1208
+ }
1209
+ if (op[0] & 5) throw op[1];
1210
+ return {
1211
+ value: op[0] ? op[1] : void 0,
1212
+ done: true
1213
+ };
1214
+ }
1215
+ }
1216
+ var SSOClient = /*#__PURE__*/ function(__Client) {
1217
+ _inherits$3(SSOClient, __Client);
1218
+ var _super = _create_super$3(SSOClient);
1219
+ function SSOClient() {
1220
+ for(var _len = arguments.length, _tmp = new Array(_len), _key = 0; _key < _len; _key++){
1221
+ _tmp[_key] = arguments[_key];
1222
+ }
1223
+ var _tmp1 = _sliced_to_array(_tmp, 1), configuration = _tmp1[0];
1224
+ _class_call_check$3(this, SSOClient);
1225
+ var _this;
1226
+ var _config_0 = getRuntimeConfig(configuration || {});
1227
+ _this = _super.call(this, _config_0);
1228
+ _define_property$2(_assert_this_initialized$3(_this), "config", void 0);
1229
+ _this.initConfig = _config_0;
1230
+ var _config_1 = resolveClientEndpointParameters(_config_0);
1231
+ var _config_2 = resolveUserAgentConfig(_config_1);
1232
+ var _config_3 = resolveRetryConfig(_config_2);
1233
+ var _config_4 = resolveRegionConfig(_config_3);
1234
+ var _config_5 = resolveHostHeaderConfig(_config_4);
1235
+ var _config_6 = resolveEndpointConfig(_config_5);
1236
+ var _config_7 = resolveHttpAuthSchemeConfig(_config_6);
1237
+ var _config_8 = resolveRuntimeExtensions(_config_7, (configuration === null || configuration === void 0 ? void 0 : configuration.extensions) || []);
1238
+ _this.config = _config_8;
1239
+ _this.middlewareStack.use(getUserAgentPlugin(_this.config));
1240
+ _this.middlewareStack.use(getRetryPlugin(_this.config));
1241
+ _this.middlewareStack.use(getContentLengthPlugin(_this.config));
1242
+ _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
1243
+ _this.middlewareStack.use(getLoggerPlugin(_this.config));
1244
+ _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
1245
+ _this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(_this.config, {
1246
+ httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
1247
+ identityProviderConfigProvider: function() {
1248
+ var _ref = _async_to_generator$1(function(config) {
1249
+ return _ts_generator$1(this, function(_state) {
1250
+ return [
1251
+ 2,
1252
+ new DefaultIdentityProviderConfig({
1253
+ "aws.auth#sigv4": config.credentials
1254
+ })
1255
+ ];
1256
+ });
1257
+ });
1258
+ return function(config) {
1259
+ return _ref.apply(this, arguments);
1260
+ };
1261
+ }()
1262
+ }));
1263
+ _this.middlewareStack.use(getHttpSigningPlugin(_this.config));
1264
+ return _this;
1265
+ }
1266
+ _create_class(SSOClient, [
1267
+ {
1268
+ key: "destroy",
1269
+ value: function destroy() {
1270
+ _get(_get_prototype_of$3(SSOClient.prototype), "destroy", this).call(this);
1271
+ }
1272
+ }
1273
+ ]);
1274
+ return SSOClient;
1275
+ }(Client);
1276
+
1277
+ function _assert_this_initialized$2(self) {
1278
+ if (self === void 0) {
1279
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1280
+ }
1281
+ return self;
1282
+ }
1283
+ function _class_call_check$2(instance, Constructor) {
1284
+ if (!(instance instanceof Constructor)) {
1285
+ throw new TypeError("Cannot call a class as a function");
1286
+ }
1287
+ }
1288
+ function _get_prototype_of$2(o) {
1289
+ _get_prototype_of$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1290
+ return o.__proto__ || Object.getPrototypeOf(o);
1291
+ };
1292
+ return _get_prototype_of$2(o);
1293
+ }
1294
+ function _inherits$2(subClass, superClass) {
1295
+ if (typeof superClass !== "function" && superClass !== null) {
1296
+ throw new TypeError("Super expression must either be null or a function");
1297
+ }
1298
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
1299
+ constructor: {
1300
+ value: subClass,
1301
+ writable: true,
1302
+ configurable: true
1303
+ }
1304
+ });
1305
+ if (superClass) _set_prototype_of$2(subClass, superClass);
1306
+ }
1307
+ function _possible_constructor_return$2(self, call) {
1308
+ if (call && (_type_of$2(call) === "object" || typeof call === "function")) {
1309
+ return call;
1310
+ }
1311
+ return _assert_this_initialized$2(self);
1312
+ }
1313
+ function _set_prototype_of$2(o, p) {
1314
+ _set_prototype_of$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1315
+ o.__proto__ = p;
1316
+ return o;
1317
+ };
1318
+ return _set_prototype_of$2(o, p);
1319
+ }
1320
+ function _type_of$2(obj) {
1321
+ "@swc/helpers - typeof";
1322
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1323
+ }
1324
+ function _is_native_reflect_construct$2() {
1325
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1326
+ if (Reflect.construct.sham) return false;
1327
+ if (typeof Proxy === "function") return true;
1328
+ try {
1329
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1330
+ return true;
1331
+ } catch (e) {
1332
+ return false;
1333
+ }
1334
+ }
1335
+ function _create_super$2(Derived) {
1336
+ var hasNativeReflectConstruct = _is_native_reflect_construct$2();
1337
+ return function _createSuperInternal() {
1338
+ var Super = _get_prototype_of$2(Derived), result;
1339
+ if (hasNativeReflectConstruct) {
1340
+ var NewTarget = _get_prototype_of$2(this).constructor;
1341
+ result = Reflect.construct(Super, arguments, NewTarget);
1342
+ } else {
1343
+ result = Super.apply(this, arguments);
1344
+ }
1345
+ return _possible_constructor_return$2(this, result);
1346
+ };
1347
+ }
1348
+ var SSOServiceException = /*#__PURE__*/ function(__ServiceException) {
1349
+ _inherits$2(SSOServiceException, __ServiceException);
1350
+ var _super = _create_super$2(SSOServiceException);
1351
+ function SSOServiceException(options) {
1352
+ _class_call_check$2(this, SSOServiceException);
1353
+ var _this;
1354
+ _this = _super.call(this, options);
1355
+ Object.setPrototypeOf(_assert_this_initialized$2(_this), SSOServiceException.prototype);
1356
+ return _this;
1357
+ }
1358
+ return SSOServiceException;
1359
+ }(ServiceException);
1360
+
1361
+ function _assert_this_initialized$1(self) {
1362
+ if (self === void 0) {
1363
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1364
+ }
1365
+ return self;
1366
+ }
1367
+ function _class_call_check$1(instance, Constructor) {
1368
+ if (!(instance instanceof Constructor)) {
1369
+ throw new TypeError("Cannot call a class as a function");
1370
+ }
1371
+ }
1372
+ function _define_property$1(obj, key, value) {
1373
+ if (key in obj) {
1374
+ Object.defineProperty(obj, key, {
1375
+ value: value,
1376
+ enumerable: true,
1377
+ configurable: true,
1378
+ writable: true
1379
+ });
1380
+ } else {
1381
+ obj[key] = value;
1382
+ }
1383
+ return obj;
1384
+ }
1385
+ function _get_prototype_of$1(o) {
1386
+ _get_prototype_of$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
1387
+ return o.__proto__ || Object.getPrototypeOf(o);
1388
+ };
1389
+ return _get_prototype_of$1(o);
1390
+ }
1391
+ function _inherits$1(subClass, superClass) {
1392
+ if (typeof superClass !== "function" && superClass !== null) {
1393
+ throw new TypeError("Super expression must either be null or a function");
1394
+ }
1395
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
1396
+ constructor: {
1397
+ value: subClass,
1398
+ writable: true,
1399
+ configurable: true
1400
+ }
1401
+ });
1402
+ if (superClass) _set_prototype_of$1(subClass, superClass);
1403
+ }
1404
+ function _object_spread$1(target) {
1405
+ for(var i = 1; i < arguments.length; i++){
1406
+ var source = arguments[i] != null ? arguments[i] : {};
1407
+ var ownKeys = Object.keys(source);
1408
+ if (typeof Object.getOwnPropertySymbols === "function") {
1409
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1410
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1411
+ }));
1412
+ }
1413
+ ownKeys.forEach(function(key) {
1414
+ _define_property$1(target, key, source[key]);
1415
+ });
1416
+ }
1417
+ return target;
1418
+ }
1419
+ function _possible_constructor_return$1(self, call) {
1420
+ if (call && (_type_of$1(call) === "object" || typeof call === "function")) {
1421
+ return call;
1422
+ }
1423
+ return _assert_this_initialized$1(self);
1424
+ }
1425
+ function _set_prototype_of$1(o, p) {
1426
+ _set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1427
+ o.__proto__ = p;
1428
+ return o;
1429
+ };
1430
+ return _set_prototype_of$1(o, p);
1431
+ }
1432
+ function _type_of$1(obj) {
1433
+ "@swc/helpers - typeof";
1434
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1435
+ }
1436
+ function _is_native_reflect_construct$1() {
1437
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1438
+ if (Reflect.construct.sham) return false;
1439
+ if (typeof Proxy === "function") return true;
1440
+ try {
1441
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1442
+ return true;
1443
+ } catch (e) {
1444
+ return false;
1445
+ }
1446
+ }
1447
+ function _create_super$1(Derived) {
1448
+ var hasNativeReflectConstruct = _is_native_reflect_construct$1();
1449
+ return function _createSuperInternal() {
1450
+ var Super = _get_prototype_of$1(Derived), result;
1451
+ if (hasNativeReflectConstruct) {
1452
+ var NewTarget = _get_prototype_of$1(this).constructor;
1453
+ result = Reflect.construct(Super, arguments, NewTarget);
1454
+ } else {
1455
+ result = Super.apply(this, arguments);
1456
+ }
1457
+ return _possible_constructor_return$1(this, result);
1458
+ };
1459
+ }
1460
+ var InvalidRequestException = /*#__PURE__*/ function(__BaseException) {
1461
+ _inherits$1(InvalidRequestException, __BaseException);
1462
+ var _super = _create_super$1(InvalidRequestException);
1463
+ function InvalidRequestException(opts) {
1464
+ _class_call_check$1(this, InvalidRequestException);
1465
+ var _this;
1466
+ _this = _super.call(this, _object_spread$1({
1467
+ name: "InvalidRequestException",
1468
+ $fault: "client"
1469
+ }, opts));
1470
+ _define_property$1(_assert_this_initialized$1(_this), "name", "InvalidRequestException");
1471
+ _define_property$1(_assert_this_initialized$1(_this), "$fault", "client");
1472
+ Object.setPrototypeOf(_assert_this_initialized$1(_this), InvalidRequestException.prototype);
1473
+ return _this;
1474
+ }
1475
+ return InvalidRequestException;
1476
+ }(SSOServiceException);
1477
+ var ResourceNotFoundException = /*#__PURE__*/ function(__BaseException) {
1478
+ _inherits$1(ResourceNotFoundException, __BaseException);
1479
+ var _super = _create_super$1(ResourceNotFoundException);
1480
+ function ResourceNotFoundException(opts) {
1481
+ _class_call_check$1(this, ResourceNotFoundException);
1482
+ var _this;
1483
+ _this = _super.call(this, _object_spread$1({
1484
+ name: "ResourceNotFoundException",
1485
+ $fault: "client"
1486
+ }, opts));
1487
+ _define_property$1(_assert_this_initialized$1(_this), "name", "ResourceNotFoundException");
1488
+ _define_property$1(_assert_this_initialized$1(_this), "$fault", "client");
1489
+ Object.setPrototypeOf(_assert_this_initialized$1(_this), ResourceNotFoundException.prototype);
1490
+ return _this;
1491
+ }
1492
+ return ResourceNotFoundException;
1493
+ }(SSOServiceException);
1494
+ var TooManyRequestsException = /*#__PURE__*/ function(__BaseException) {
1495
+ _inherits$1(TooManyRequestsException, __BaseException);
1496
+ var _super = _create_super$1(TooManyRequestsException);
1497
+ function TooManyRequestsException(opts) {
1498
+ _class_call_check$1(this, TooManyRequestsException);
1499
+ var _this;
1500
+ _this = _super.call(this, _object_spread$1({
1501
+ name: "TooManyRequestsException",
1502
+ $fault: "client"
1503
+ }, opts));
1504
+ _define_property$1(_assert_this_initialized$1(_this), "name", "TooManyRequestsException");
1505
+ _define_property$1(_assert_this_initialized$1(_this), "$fault", "client");
1506
+ Object.setPrototypeOf(_assert_this_initialized$1(_this), TooManyRequestsException.prototype);
1507
+ return _this;
1508
+ }
1509
+ return TooManyRequestsException;
1510
+ }(SSOServiceException);
1511
+ var UnauthorizedException = /*#__PURE__*/ function(__BaseException) {
1512
+ _inherits$1(UnauthorizedException, __BaseException);
1513
+ var _super = _create_super$1(UnauthorizedException);
1514
+ function UnauthorizedException(opts) {
1515
+ _class_call_check$1(this, UnauthorizedException);
1516
+ var _this;
1517
+ _this = _super.call(this, _object_spread$1({
1518
+ name: "UnauthorizedException",
1519
+ $fault: "client"
1520
+ }, opts));
1521
+ _define_property$1(_assert_this_initialized$1(_this), "name", "UnauthorizedException");
1522
+ _define_property$1(_assert_this_initialized$1(_this), "$fault", "client");
1523
+ Object.setPrototypeOf(_assert_this_initialized$1(_this), UnauthorizedException.prototype);
1524
+ return _this;
1525
+ }
1526
+ return UnauthorizedException;
1527
+ }(SSOServiceException);
1528
+ var GetRoleCredentialsRequestFilterSensitiveLog = function(obj) {
1529
+ return _object_spread$1({}, obj, obj.accessToken && {
1530
+ accessToken: SENSITIVE_STRING
1531
+ });
1532
+ };
1533
+ var RoleCredentialsFilterSensitiveLog = function(obj) {
1534
+ return _object_spread$1({}, obj, obj.secretAccessKey && {
1535
+ secretAccessKey: SENSITIVE_STRING
1536
+ }, obj.sessionToken && {
1537
+ sessionToken: SENSITIVE_STRING
1538
+ });
1539
+ };
1540
+ var GetRoleCredentialsResponseFilterSensitiveLog = function(obj) {
1541
+ return _object_spread$1({}, obj, obj.roleCredentials && {
1542
+ roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials)
1543
+ });
1544
+ };
1545
+
1546
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1547
+ try {
1548
+ var info = gen[key](arg);
1549
+ var value = info.value;
1550
+ } catch (error) {
1551
+ reject(error);
1552
+ return;
1553
+ }
1554
+ if (info.done) {
1555
+ resolve(value);
1556
+ } else {
1557
+ Promise.resolve(value).then(_next, _throw);
1558
+ }
1559
+ }
1560
+ function _async_to_generator(fn) {
1561
+ return function() {
1562
+ var self = this, args = arguments;
1563
+ return new Promise(function(resolve, reject) {
1564
+ var gen = fn.apply(self, args);
1565
+ function _next(value) {
1566
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1567
+ }
1568
+ function _throw(err) {
1569
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1570
+ }
1571
+ _next(undefined);
1572
+ });
1573
+ };
1574
+ }
1575
+ function _define_property(obj, key, value) {
1576
+ if (key in obj) {
1577
+ Object.defineProperty(obj, key, {
1578
+ value: value,
1579
+ enumerable: true,
1580
+ configurable: true,
1581
+ writable: true
1582
+ });
1583
+ } else {
1584
+ obj[key] = value;
1585
+ }
1586
+ return obj;
1587
+ }
1588
+ function _object_spread(target) {
1589
+ for(var i = 1; i < arguments.length; i++){
1590
+ var source = arguments[i] != null ? arguments[i] : {};
1591
+ var ownKeys = Object.keys(source);
1592
+ if (typeof Object.getOwnPropertySymbols === "function") {
1593
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1594
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1595
+ }));
1596
+ }
1597
+ ownKeys.forEach(function(key) {
1598
+ _define_property(target, key, source[key]);
1599
+ });
1600
+ }
1601
+ return target;
1602
+ }
1603
+ function ownKeys(object, enumerableOnly) {
1604
+ var keys = Object.keys(object);
1605
+ if (Object.getOwnPropertySymbols) {
1606
+ var symbols = Object.getOwnPropertySymbols(object);
1607
+ keys.push.apply(keys, symbols);
1608
+ }
1609
+ return keys;
1610
+ }
1611
+ function _object_spread_props(target, source) {
1612
+ source = source != null ? source : {};
1613
+ if (Object.getOwnPropertyDescriptors) {
1614
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1615
+ } else {
1616
+ ownKeys(Object(source)).forEach(function(key) {
1617
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1618
+ });
1619
+ }
1620
+ return target;
1621
+ }
1622
+ function _ts_generator(thisArg, body) {
1623
+ var f, y, t, g, _ = {
1624
+ label: 0,
1625
+ sent: function() {
1626
+ if (t[0] & 1) throw t[1];
1627
+ return t[1];
1628
+ },
1629
+ trys: [],
1630
+ ops: []
1631
+ };
1632
+ return g = {
1633
+ next: verb(0),
1634
+ "throw": verb(1),
1635
+ "return": verb(2)
1636
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
1637
+ return this;
1638
+ }), g;
1639
+ function verb(n) {
1640
+ return function(v) {
1641
+ return step([
1642
+ n,
1643
+ v
1644
+ ]);
1645
+ };
1646
+ }
1647
+ function step(op) {
1648
+ if (f) throw new TypeError("Generator is already executing.");
1649
+ while(_)try {
1650
+ 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;
1651
+ if (y = 0, t) op = [
1652
+ op[0] & 2,
1653
+ t.value
1654
+ ];
1655
+ switch(op[0]){
1656
+ case 0:
1657
+ case 1:
1658
+ t = op;
1659
+ break;
1660
+ case 4:
1661
+ _.label++;
1662
+ return {
1663
+ value: op[1],
1664
+ done: false
1665
+ };
1666
+ case 5:
1667
+ _.label++;
1668
+ y = op[1];
1669
+ op = [
1670
+ 0
1671
+ ];
1672
+ continue;
1673
+ case 7:
1674
+ op = _.ops.pop();
1675
+ _.trys.pop();
1676
+ continue;
1677
+ default:
1678
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
1679
+ _ = 0;
1680
+ continue;
1681
+ }
1682
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
1683
+ _.label = op[1];
1684
+ break;
1685
+ }
1686
+ if (op[0] === 6 && _.label < t[1]) {
1687
+ _.label = t[1];
1688
+ t = op;
1689
+ break;
1690
+ }
1691
+ if (t && _.label < t[2]) {
1692
+ _.label = t[2];
1693
+ _.ops.push(op);
1694
+ break;
1695
+ }
1696
+ if (t[2]) _.ops.pop();
1697
+ _.trys.pop();
1698
+ continue;
1699
+ }
1700
+ op = body.call(thisArg, _);
1701
+ } catch (e) {
1702
+ op = [
1703
+ 6,
1704
+ e
1705
+ ];
1706
+ y = 0;
1707
+ } finally{
1708
+ f = t = 0;
1709
+ }
1710
+ if (op[0] & 5) throw op[1];
1711
+ return {
1712
+ value: op[0] ? op[1] : void 0,
1713
+ done: true
1714
+ };
1715
+ }
1716
+ }
1717
+ var se_GetRoleCredentialsCommand = function() {
1718
+ var _ref = _async_to_generator(function(input, context) {
1719
+ var b, headers, _obj, query, body;
1720
+ return _ts_generator(this, function(_state) {
1721
+ b = requestBuilder(input, context);
1722
+ headers = map({}, isSerializableHeaderValue, _define_property({}, _xasbt, input[_aT]));
1723
+ b.bp("/federation/credentials");
1724
+ query = map((_obj = {}, _define_property(_obj, _rn, [
1725
+ expectNonNull(input[_rN], "roleName")
1726
+ ]), _define_property(_obj, _ai, [
1727
+ expectNonNull(input[_aI], "accountId")
1728
+ ]), _obj));
1729
+ b.m("GET").h(headers).q(query).b(body);
1730
+ return [
1731
+ 2,
1732
+ b.build()
1733
+ ];
1734
+ });
1735
+ });
1736
+ return function se_GetRoleCredentialsCommand(input, context) {
1737
+ return _ref.apply(this, arguments);
1738
+ };
1739
+ }();
1740
+ var de_GetRoleCredentialsCommand = function() {
1741
+ var _ref = _async_to_generator(function(output, context) {
1742
+ var contents, data, doc;
1743
+ return _ts_generator(this, function(_state) {
1744
+ switch(_state.label){
1745
+ case 0:
1746
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1747
+ return [
1748
+ 2,
1749
+ de_CommandError(output, context)
1750
+ ];
1751
+ }
1752
+ contents = map({
1753
+ $metadata: deserializeMetadata(output)
1754
+ });
1755
+ return [
1756
+ 4,
1757
+ parseJsonBody(output.body, context)
1758
+ ];
1759
+ case 1:
1760
+ data = expectNonNull.apply(void 0, [
1761
+ expectObject.apply(void 0, [
1762
+ _state.sent()
1763
+ ]),
1764
+ "body"
1765
+ ]);
1766
+ doc = take(data, {
1767
+ roleCredentials: _json
1768
+ });
1769
+ Object.assign(contents, doc);
1770
+ return [
1771
+ 2,
1772
+ contents
1773
+ ];
1774
+ }
1775
+ });
1776
+ });
1777
+ return function de_GetRoleCredentialsCommand(output, context) {
1778
+ return _ref.apply(this, arguments);
1779
+ };
1780
+ }();
1781
+ var de_CommandError = function() {
1782
+ var _ref = _async_to_generator(function(output, context) {
1783
+ var parsedOutput, _tmp, _tmp1, errorCode, parsedBody;
1784
+ return _ts_generator(this, function(_state) {
1785
+ switch(_state.label){
1786
+ case 0:
1787
+ _tmp = [
1788
+ _object_spread({}, output)
1789
+ ];
1790
+ _tmp1 = {};
1791
+ return [
1792
+ 4,
1793
+ parseJsonErrorBody(output.body, context)
1794
+ ];
1795
+ case 1:
1796
+ parsedOutput = _object_spread_props.apply(void 0, _tmp.concat([
1797
+ (_tmp1.body = _state.sent(), _tmp1)
1798
+ ]));
1799
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1800
+ switch(errorCode){
1801
+ case "InvalidRequestException":
1802
+ return [
1803
+ 3,
1804
+ 2
1805
+ ];
1806
+ case "com.amazonaws.sso#InvalidRequestException":
1807
+ return [
1808
+ 3,
1809
+ 2
1810
+ ];
1811
+ case "ResourceNotFoundException":
1812
+ return [
1813
+ 3,
1814
+ 4
1815
+ ];
1816
+ case "com.amazonaws.sso#ResourceNotFoundException":
1817
+ return [
1818
+ 3,
1819
+ 4
1820
+ ];
1821
+ case "TooManyRequestsException":
1822
+ return [
1823
+ 3,
1824
+ 6
1825
+ ];
1826
+ case "com.amazonaws.sso#TooManyRequestsException":
1827
+ return [
1828
+ 3,
1829
+ 6
1830
+ ];
1831
+ case "UnauthorizedException":
1832
+ return [
1833
+ 3,
1834
+ 8
1835
+ ];
1836
+ case "com.amazonaws.sso#UnauthorizedException":
1837
+ return [
1838
+ 3,
1839
+ 8
1840
+ ];
1841
+ }
1842
+ return [
1843
+ 3,
1844
+ 10
1845
+ ];
1846
+ case 2:
1847
+ return [
1848
+ 4,
1849
+ de_InvalidRequestExceptionRes(parsedOutput, context)
1850
+ ];
1851
+ case 3:
1852
+ throw _state.sent();
1853
+ case 4:
1854
+ return [
1855
+ 4,
1856
+ de_ResourceNotFoundExceptionRes(parsedOutput, context)
1857
+ ];
1858
+ case 5:
1859
+ throw _state.sent();
1860
+ case 6:
1861
+ return [
1862
+ 4,
1863
+ de_TooManyRequestsExceptionRes(parsedOutput, context)
1864
+ ];
1865
+ case 7:
1866
+ throw _state.sent();
1867
+ case 8:
1868
+ return [
1869
+ 4,
1870
+ de_UnauthorizedExceptionRes(parsedOutput, context)
1871
+ ];
1872
+ case 9:
1873
+ throw _state.sent();
1874
+ case 10:
1875
+ parsedBody = parsedOutput.body;
1876
+ return [
1877
+ 2,
1878
+ throwDefaultError({
1879
+ output: output,
1880
+ parsedBody: parsedBody,
1881
+ errorCode: errorCode
1882
+ })
1883
+ ];
1884
+ case 11:
1885
+ return [
1886
+ 2
1887
+ ];
1888
+ }
1889
+ });
1890
+ });
1891
+ return function de_CommandError(output, context) {
1892
+ return _ref.apply(this, arguments);
1893
+ };
1894
+ }();
1895
+ var throwDefaultError = withBaseException(SSOServiceException);
1896
+ var de_InvalidRequestExceptionRes = function() {
1897
+ var _ref = _async_to_generator(function(parsedOutput, context) {
1898
+ var contents, data, doc, exception;
1899
+ return _ts_generator(this, function(_state) {
1900
+ contents = map({});
1901
+ data = parsedOutput.body;
1902
+ doc = take(data, {
1903
+ message: expectString
1904
+ });
1905
+ Object.assign(contents, doc);
1906
+ exception = new InvalidRequestException(_object_spread({
1907
+ $metadata: deserializeMetadata(parsedOutput)
1908
+ }, contents));
1909
+ return [
1910
+ 2,
1911
+ decorateServiceException(exception, parsedOutput.body)
1912
+ ];
1913
+ });
1914
+ });
1915
+ return function de_InvalidRequestExceptionRes(parsedOutput, context) {
1916
+ return _ref.apply(this, arguments);
1917
+ };
1918
+ }();
1919
+ var de_ResourceNotFoundExceptionRes = function() {
1920
+ var _ref = _async_to_generator(function(parsedOutput, context) {
1921
+ var contents, data, doc, exception;
1922
+ return _ts_generator(this, function(_state) {
1923
+ contents = map({});
1924
+ data = parsedOutput.body;
1925
+ doc = take(data, {
1926
+ message: expectString
1927
+ });
1928
+ Object.assign(contents, doc);
1929
+ exception = new ResourceNotFoundException(_object_spread({
1930
+ $metadata: deserializeMetadata(parsedOutput)
1931
+ }, contents));
1932
+ return [
1933
+ 2,
1934
+ decorateServiceException(exception, parsedOutput.body)
1935
+ ];
1936
+ });
1937
+ });
1938
+ return function de_ResourceNotFoundExceptionRes(parsedOutput, context) {
1939
+ return _ref.apply(this, arguments);
1940
+ };
1941
+ }();
1942
+ var de_TooManyRequestsExceptionRes = function() {
1943
+ var _ref = _async_to_generator(function(parsedOutput, context) {
1944
+ var contents, data, doc, exception;
1945
+ return _ts_generator(this, function(_state) {
1946
+ contents = map({});
1947
+ data = parsedOutput.body;
1948
+ doc = take(data, {
1949
+ message: expectString
1950
+ });
1951
+ Object.assign(contents, doc);
1952
+ exception = new TooManyRequestsException(_object_spread({
1953
+ $metadata: deserializeMetadata(parsedOutput)
1954
+ }, contents));
1955
+ return [
1956
+ 2,
1957
+ decorateServiceException(exception, parsedOutput.body)
1958
+ ];
1959
+ });
1960
+ });
1961
+ return function de_TooManyRequestsExceptionRes(parsedOutput, context) {
1962
+ return _ref.apply(this, arguments);
1963
+ };
1964
+ }();
1965
+ var de_UnauthorizedExceptionRes = function() {
1966
+ var _ref = _async_to_generator(function(parsedOutput, context) {
1967
+ var contents, data, doc, exception;
1968
+ return _ts_generator(this, function(_state) {
1969
+ contents = map({});
1970
+ data = parsedOutput.body;
1971
+ doc = take(data, {
1972
+ message: expectString
1973
+ });
1974
+ Object.assign(contents, doc);
1975
+ exception = new UnauthorizedException(_object_spread({
1976
+ $metadata: deserializeMetadata(parsedOutput)
1977
+ }, contents));
1978
+ return [
1979
+ 2,
1980
+ decorateServiceException(exception, parsedOutput.body)
1981
+ ];
1982
+ });
1983
+ });
1984
+ return function de_UnauthorizedExceptionRes(parsedOutput, context) {
1985
+ return _ref.apply(this, arguments);
1986
+ };
1987
+ }();
1988
+ var deserializeMetadata = function(output) {
1989
+ var _output_headers_xamznrequestid, _ref;
1990
+ return {
1991
+ httpStatusCode: output.statusCode,
1992
+ 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"],
1993
+ extendedRequestId: output.headers["x-amz-id-2"],
1994
+ cfId: output.headers["x-amz-cf-id"]
1995
+ };
1996
+ };
1997
+ var _aI = "accountId";
1998
+ var _aT = "accessToken";
1999
+ var _ai = "account_id";
2000
+ var _rN = "roleName";
2001
+ var _rn = "role_name";
2002
+ var _xasbt = "x-amz-sso_bearer_token";
2003
+
2004
+ function _assert_this_initialized(self) {
2005
+ if (self === void 0) {
2006
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2007
+ }
2008
+ return self;
2009
+ }
2010
+ function _class_call_check(instance, Constructor) {
2011
+ if (!(instance instanceof Constructor)) {
2012
+ throw new TypeError("Cannot call a class as a function");
2013
+ }
2014
+ }
2015
+ function _get_prototype_of(o) {
2016
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
2017
+ return o.__proto__ || Object.getPrototypeOf(o);
2018
+ };
2019
+ return _get_prototype_of(o);
2020
+ }
2021
+ function _inherits(subClass, superClass) {
2022
+ if (typeof superClass !== "function" && superClass !== null) {
2023
+ throw new TypeError("Super expression must either be null or a function");
2024
+ }
2025
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
2026
+ constructor: {
2027
+ value: subClass,
2028
+ writable: true,
2029
+ configurable: true
2030
+ }
2031
+ });
2032
+ if (superClass) _set_prototype_of(subClass, superClass);
2033
+ }
2034
+ function _possible_constructor_return(self, call) {
2035
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
2036
+ return call;
2037
+ }
2038
+ return _assert_this_initialized(self);
2039
+ }
2040
+ function _set_prototype_of(o, p) {
2041
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2042
+ o.__proto__ = p;
2043
+ return o;
2044
+ };
2045
+ return _set_prototype_of(o, p);
2046
+ }
2047
+ function _type_of(obj) {
2048
+ "@swc/helpers - typeof";
2049
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2050
+ }
2051
+ function _is_native_reflect_construct() {
2052
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
2053
+ if (Reflect.construct.sham) return false;
2054
+ if (typeof Proxy === "function") return true;
2055
+ try {
2056
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
2057
+ return true;
2058
+ } catch (e) {
2059
+ return false;
2060
+ }
2061
+ }
2062
+ function _create_super(Derived) {
2063
+ var hasNativeReflectConstruct = _is_native_reflect_construct();
2064
+ return function _createSuperInternal() {
2065
+ var Super = _get_prototype_of(Derived), result;
2066
+ if (hasNativeReflectConstruct) {
2067
+ var NewTarget = _get_prototype_of(this).constructor;
2068
+ result = Reflect.construct(Super, arguments, NewTarget);
2069
+ } else {
2070
+ result = Super.apply(this, arguments);
2071
+ }
2072
+ return _possible_constructor_return(this, result);
2073
+ };
2074
+ }
2075
+ var GetRoleCredentialsCommand = /*#__PURE__*/ function(_$Command_classBuilder_ep_m_s_n_f_ser_de_build) {
2076
+ _inherits(GetRoleCredentialsCommand, _$Command_classBuilder_ep_m_s_n_f_ser_de_build);
2077
+ var _super = _create_super(GetRoleCredentialsCommand);
2078
+ function GetRoleCredentialsCommand() {
2079
+ _class_call_check(this, GetRoleCredentialsCommand);
2080
+ return _super.apply(this, arguments);
2081
+ }
2082
+ return GetRoleCredentialsCommand;
2083
+ }(Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
2084
+ return [
2085
+ getSerdePlugin(config, this.serialize, this.deserialize),
2086
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions())
2087
+ ];
2088
+ }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build());
2089
+
2090
+ export { GetRoleCredentialsCommand, SSOClient };