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