@etainabl/nodejs-sdk 1.3.110 → 1.3.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/esm/chunk-3YGWW265.js +64 -0
  2. package/dist/esm/chunk-3YGWW265.js.map +1 -0
  3. package/dist/esm/chunk-BIVFO5LG.js +2476 -0
  4. package/dist/esm/chunk-BIVFO5LG.js.map +1 -0
  5. package/dist/esm/chunk-CIKXN3GS.js +64 -0
  6. package/dist/esm/chunk-CIKXN3GS.js.map +1 -0
  7. package/dist/esm/chunk-E6O4HVLA.js +121 -0
  8. package/dist/esm/chunk-E6O4HVLA.js.map +1 -0
  9. package/dist/esm/chunk-HAEAETXR.js +210 -0
  10. package/dist/esm/chunk-HAEAETXR.js.map +1 -0
  11. package/dist/esm/chunk-ITSE4X2J.js +1733 -0
  12. package/dist/esm/chunk-ITSE4X2J.js.map +1 -0
  13. package/dist/esm/chunk-OWL7NKW5.js +47 -0
  14. package/dist/esm/chunk-OWL7NKW5.js.map +1 -0
  15. package/dist/esm/chunk-R63LRFTI.js +153 -0
  16. package/dist/esm/chunk-R63LRFTI.js.map +1 -0
  17. package/dist/esm/chunk-UFTVLHTW.js +114 -0
  18. package/dist/esm/chunk-UFTVLHTW.js.map +1 -0
  19. package/dist/esm/chunk-UZGMBQZB.js +13 -0
  20. package/dist/esm/chunk-UZGMBQZB.js.map +1 -0
  21. package/dist/esm/chunk-XXAWQ5GA.js +3359 -0
  22. package/dist/esm/chunk-XXAWQ5GA.js.map +1 -0
  23. package/dist/esm/dist-es-4ZHJVMJ4.js +21 -0
  24. package/dist/esm/dist-es-4ZHJVMJ4.js.map +1 -0
  25. package/dist/esm/dist-es-FD7XXZCE.js +305 -0
  26. package/dist/esm/dist-es-FD7XXZCE.js.map +1 -0
  27. package/dist/esm/dist-es-MXGFLXV2.js +379 -0
  28. package/dist/esm/dist-es-MXGFLXV2.js.map +1 -0
  29. package/dist/esm/dist-es-QPNGCVTW.js +67 -0
  30. package/dist/esm/dist-es-QPNGCVTW.js.map +1 -0
  31. package/dist/esm/dist-es-RHLCSE2G.js +200 -0
  32. package/dist/esm/dist-es-RHLCSE2G.js.map +1 -0
  33. package/dist/esm/dist-es-X5IH3XCT.js +88 -0
  34. package/dist/esm/dist-es-X5IH3XCT.js.map +1 -0
  35. package/dist/esm/dist-es-XEM2CDDP.js +163 -0
  36. package/dist/esm/dist-es-XEM2CDDP.js.map +1 -0
  37. package/dist/esm/index.js +4299 -81
  38. package/dist/esm/index.js.map +1 -1
  39. package/dist/esm/loadSso-3QBKTJF3.js +655 -0
  40. package/dist/esm/loadSso-3QBKTJF3.js.map +1 -0
  41. package/dist/esm/sso-oidc-GZ3LZ3MF.js +827 -0
  42. package/dist/esm/sso-oidc-GZ3LZ3MF.js.map +1 -0
  43. package/dist/esm/sts-CIQKG7FB.js +1162 -0
  44. package/dist/esm/sts-CIQKG7FB.js.map +1 -0
  45. package/dist/index.d.cts +176 -82
  46. package/dist/index.d.ts +176 -82
  47. package/dist/index.js +21923 -1147
  48. package/dist/index.js.map +1 -1
  49. package/package.json +4 -2
@@ -0,0 +1,827 @@
1
+ import {
2
+ loadRestJsonErrorCode,
3
+ parseJsonBody,
4
+ parseJsonErrorBody
5
+ } from "./chunk-CIKXN3GS.js";
6
+ import {
7
+ package_default
8
+ } from "./chunk-E6O4HVLA.js";
9
+ import {
10
+ AwsSdkSigV4Signer,
11
+ DEFAULT_RETRY_MODE,
12
+ DefaultIdentityProviderConfig,
13
+ EndpointCache,
14
+ Hash,
15
+ NODE_APP_ID_CONFIG_OPTIONS,
16
+ NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
17
+ NODE_MAX_ATTEMPT_CONFIG_OPTIONS,
18
+ NODE_REGION_CONFIG_FILE_OPTIONS,
19
+ NODE_REGION_CONFIG_OPTIONS,
20
+ NODE_RETRY_MODE_CONFIG_OPTIONS,
21
+ NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
22
+ NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
23
+ NoAuthSigner,
24
+ awsEndpointFunctions,
25
+ calculateBodyLength,
26
+ createDefaultUserAgentProvider,
27
+ customEndpointFunctions,
28
+ emitWarningIfUnsupportedVersion,
29
+ getAwsRegionExtensionConfiguration,
30
+ getContentLengthPlugin,
31
+ getEndpointPlugin,
32
+ getHostHeaderPlugin,
33
+ getHttpAuthSchemeEndpointRuleSetPlugin,
34
+ getHttpSigningPlugin,
35
+ getLoggerPlugin,
36
+ getRecursionDetectionPlugin,
37
+ getRetryPlugin,
38
+ getSerdePlugin,
39
+ getUserAgentPlugin,
40
+ resolveAwsRegionExtensionConfiguration,
41
+ resolveAwsSdkSigV4Config,
42
+ resolveDefaultsModeConfig,
43
+ resolveEndpoint,
44
+ resolveEndpointConfig,
45
+ resolveHostHeaderConfig,
46
+ resolveRegionConfig,
47
+ resolveRetryConfig,
48
+ resolveUserAgentConfig
49
+ } from "./chunk-XXAWQ5GA.js";
50
+ import {
51
+ loadConfig,
52
+ parseUrl
53
+ } from "./chunk-UFTVLHTW.js";
54
+ import {
55
+ Client,
56
+ Command,
57
+ NoOpLogger,
58
+ NodeHttpHandler,
59
+ SENSITIVE_STRING,
60
+ ServiceException,
61
+ _json,
62
+ createAggregatedClient,
63
+ decorateServiceException,
64
+ emitWarningIfUnsupportedVersion as emitWarningIfUnsupportedVersion2,
65
+ expectInt32,
66
+ expectNonNull,
67
+ expectObject,
68
+ expectString,
69
+ fromBase64,
70
+ fromUtf8,
71
+ getDefaultExtensionConfiguration,
72
+ getHttpHandlerExtensionConfiguration,
73
+ getSmithyContext,
74
+ loadConfigsForDefaultMode,
75
+ map,
76
+ normalizeProvider,
77
+ requestBuilder,
78
+ resolveDefaultRuntimeConfig,
79
+ resolveHttpHandlerRuntimeConfig,
80
+ streamCollector,
81
+ take,
82
+ toBase64,
83
+ toUtf8,
84
+ withBaseException
85
+ } from "./chunk-BIVFO5LG.js";
86
+ import "./chunk-HAEAETXR.js";
87
+ import "./chunk-UZGMBQZB.js";
88
+ import "./chunk-3YGWW265.js";
89
+ import "./chunk-R63LRFTI.js";
90
+
91
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js
92
+ var defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
93
+ return {
94
+ operation: getSmithyContext(context).operation,
95
+ region: await normalizeProvider(config.region)() || (() => {
96
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
97
+ })()
98
+ };
99
+ };
100
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
101
+ return {
102
+ schemeId: "aws.auth#sigv4",
103
+ signingProperties: {
104
+ name: "sso-oauth",
105
+ region: authParameters.region
106
+ },
107
+ propertiesExtractor: (config, context) => ({
108
+ signingProperties: {
109
+ config,
110
+ context
111
+ }
112
+ })
113
+ };
114
+ }
115
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
116
+ return {
117
+ schemeId: "smithy.api#noAuth"
118
+ };
119
+ }
120
+ var defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
121
+ const options = [];
122
+ switch (authParameters.operation) {
123
+ case "CreateToken": {
124
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
125
+ break;
126
+ }
127
+ default: {
128
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
129
+ }
130
+ }
131
+ return options;
132
+ };
133
+ var resolveHttpAuthSchemeConfig = (config) => {
134
+ const config_0 = resolveAwsSdkSigV4Config(config);
135
+ return Object.assign(config_0, {
136
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
137
+ });
138
+ };
139
+
140
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js
141
+ var resolveClientEndpointParameters = (options) => {
142
+ return Object.assign(options, {
143
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
144
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
145
+ defaultSigningName: "sso-oauth"
146
+ });
147
+ };
148
+ var commonParams = {
149
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
150
+ Endpoint: { type: "builtInParams", name: "endpoint" },
151
+ Region: { type: "builtInParams", name: "region" },
152
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
153
+ };
154
+
155
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/ruleset.js
156
+ var u = "required";
157
+ var v = "fn";
158
+ var w = "argv";
159
+ var x = "ref";
160
+ var a = true;
161
+ var b = "isSet";
162
+ var c = "booleanEquals";
163
+ var d = "error";
164
+ var e = "endpoint";
165
+ var f = "tree";
166
+ var g = "PartitionResult";
167
+ var h = "getAttr";
168
+ var i = { [u]: false, "type": "String" };
169
+ var j = { [u]: true, "default": false, "type": "Boolean" };
170
+ var k = { [x]: "Endpoint" };
171
+ var l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] };
172
+ var m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] };
173
+ var n = {};
174
+ var o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] };
175
+ var p = { [x]: g };
176
+ var q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] };
177
+ var r = [l];
178
+ var s = [m];
179
+ var t = [{ [x]: "Region" }];
180
+ var _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
181
+ var ruleSet = _data;
182
+
183
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js
184
+ var cache = new EndpointCache({
185
+ size: 50,
186
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
187
+ });
188
+ var defaultEndpointResolver = (endpointParams, context = {}) => {
189
+ return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
190
+ endpointParams,
191
+ logger: context.logger
192
+ }));
193
+ };
194
+ customEndpointFunctions.aws = awsEndpointFunctions;
195
+
196
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.shared.js
197
+ var getRuntimeConfig = (config) => {
198
+ return {
199
+ apiVersion: "2019-06-10",
200
+ base64Decoder: config?.base64Decoder ?? fromBase64,
201
+ base64Encoder: config?.base64Encoder ?? toBase64,
202
+ disableHostPrefix: config?.disableHostPrefix ?? false,
203
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
204
+ extensions: config?.extensions ?? [],
205
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,
206
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
207
+ {
208
+ schemeId: "aws.auth#sigv4",
209
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
210
+ signer: new AwsSdkSigV4Signer()
211
+ },
212
+ {
213
+ schemeId: "smithy.api#noAuth",
214
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
215
+ signer: new NoAuthSigner()
216
+ }
217
+ ],
218
+ logger: config?.logger ?? new NoOpLogger(),
219
+ serviceId: config?.serviceId ?? "SSO OIDC",
220
+ urlParser: config?.urlParser ?? parseUrl,
221
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
222
+ utf8Encoder: config?.utf8Encoder ?? toUtf8
223
+ };
224
+ };
225
+
226
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js
227
+ var getRuntimeConfig2 = (config) => {
228
+ emitWarningIfUnsupportedVersion2(process.version);
229
+ const defaultsMode = resolveDefaultsModeConfig(config);
230
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
231
+ const clientSharedValues = getRuntimeConfig(config);
232
+ emitWarningIfUnsupportedVersion(process.version);
233
+ const loaderConfig = {
234
+ profile: config?.profile,
235
+ logger: clientSharedValues.logger
236
+ };
237
+ return {
238
+ ...clientSharedValues,
239
+ ...config,
240
+ runtime: "node",
241
+ defaultsMode,
242
+ authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
243
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
244
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
245
+ maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
246
+ region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
247
+ requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
248
+ retryMode: config?.retryMode ?? loadConfig({
249
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
250
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
251
+ }, config),
252
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
253
+ streamCollector: config?.streamCollector ?? streamCollector,
254
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
255
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
256
+ userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
257
+ };
258
+ };
259
+
260
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.js
261
+ var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
262
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
263
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
264
+ let _credentials = runtimeConfig.credentials;
265
+ return {
266
+ setHttpAuthScheme(httpAuthScheme) {
267
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
268
+ if (index === -1) {
269
+ _httpAuthSchemes.push(httpAuthScheme);
270
+ } else {
271
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
272
+ }
273
+ },
274
+ httpAuthSchemes() {
275
+ return _httpAuthSchemes;
276
+ },
277
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
278
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
279
+ },
280
+ httpAuthSchemeProvider() {
281
+ return _httpAuthSchemeProvider;
282
+ },
283
+ setCredentials(credentials) {
284
+ _credentials = credentials;
285
+ },
286
+ credentials() {
287
+ return _credentials;
288
+ }
289
+ };
290
+ };
291
+ var resolveHttpAuthRuntimeConfig = (config) => {
292
+ return {
293
+ httpAuthSchemes: config.httpAuthSchemes(),
294
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
295
+ credentials: config.credentials()
296
+ };
297
+ };
298
+
299
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeExtensions.js
300
+ var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
301
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
302
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
303
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
304
+ };
305
+
306
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDCClient.js
307
+ var SSOOIDCClient = class extends Client {
308
+ config;
309
+ constructor(...[configuration]) {
310
+ const _config_0 = getRuntimeConfig2(configuration || {});
311
+ super(_config_0);
312
+ this.initConfig = _config_0;
313
+ const _config_1 = resolveClientEndpointParameters(_config_0);
314
+ const _config_2 = resolveUserAgentConfig(_config_1);
315
+ const _config_3 = resolveRetryConfig(_config_2);
316
+ const _config_4 = resolveRegionConfig(_config_3);
317
+ const _config_5 = resolveHostHeaderConfig(_config_4);
318
+ const _config_6 = resolveEndpointConfig(_config_5);
319
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
320
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
321
+ this.config = _config_8;
322
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
323
+ this.middlewareStack.use(getRetryPlugin(this.config));
324
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
325
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
326
+ this.middlewareStack.use(getLoggerPlugin(this.config));
327
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
328
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
329
+ httpAuthSchemeParametersProvider: defaultSSOOIDCHttpAuthSchemeParametersProvider,
330
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
331
+ "aws.auth#sigv4": config.credentials
332
+ })
333
+ }));
334
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
335
+ }
336
+ destroy() {
337
+ super.destroy();
338
+ }
339
+ };
340
+
341
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js
342
+ var SSOOIDCServiceException = class _SSOOIDCServiceException extends ServiceException {
343
+ constructor(options) {
344
+ super(options);
345
+ Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);
346
+ }
347
+ };
348
+
349
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/models_0.js
350
+ var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException {
351
+ name = "AccessDeniedException";
352
+ $fault = "client";
353
+ error;
354
+ error_description;
355
+ constructor(opts) {
356
+ super({
357
+ name: "AccessDeniedException",
358
+ $fault: "client",
359
+ ...opts
360
+ });
361
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
362
+ this.error = opts.error;
363
+ this.error_description = opts.error_description;
364
+ }
365
+ };
366
+ var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException {
367
+ name = "AuthorizationPendingException";
368
+ $fault = "client";
369
+ error;
370
+ error_description;
371
+ constructor(opts) {
372
+ super({
373
+ name: "AuthorizationPendingException",
374
+ $fault: "client",
375
+ ...opts
376
+ });
377
+ Object.setPrototypeOf(this, _AuthorizationPendingException.prototype);
378
+ this.error = opts.error;
379
+ this.error_description = opts.error_description;
380
+ }
381
+ };
382
+ var CreateTokenRequestFilterSensitiveLog = (obj) => ({
383
+ ...obj,
384
+ ...obj.clientSecret && { clientSecret: SENSITIVE_STRING },
385
+ ...obj.refreshToken && { refreshToken: SENSITIVE_STRING },
386
+ ...obj.codeVerifier && { codeVerifier: SENSITIVE_STRING }
387
+ });
388
+ var CreateTokenResponseFilterSensitiveLog = (obj) => ({
389
+ ...obj,
390
+ ...obj.accessToken && { accessToken: SENSITIVE_STRING },
391
+ ...obj.refreshToken && { refreshToken: SENSITIVE_STRING },
392
+ ...obj.idToken && { idToken: SENSITIVE_STRING }
393
+ });
394
+ var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {
395
+ name = "ExpiredTokenException";
396
+ $fault = "client";
397
+ error;
398
+ error_description;
399
+ constructor(opts) {
400
+ super({
401
+ name: "ExpiredTokenException",
402
+ $fault: "client",
403
+ ...opts
404
+ });
405
+ Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
406
+ this.error = opts.error;
407
+ this.error_description = opts.error_description;
408
+ }
409
+ };
410
+ var InternalServerException = class _InternalServerException extends SSOOIDCServiceException {
411
+ name = "InternalServerException";
412
+ $fault = "server";
413
+ error;
414
+ error_description;
415
+ constructor(opts) {
416
+ super({
417
+ name: "InternalServerException",
418
+ $fault: "server",
419
+ ...opts
420
+ });
421
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
422
+ this.error = opts.error;
423
+ this.error_description = opts.error_description;
424
+ }
425
+ };
426
+ var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException {
427
+ name = "InvalidClientException";
428
+ $fault = "client";
429
+ error;
430
+ error_description;
431
+ constructor(opts) {
432
+ super({
433
+ name: "InvalidClientException",
434
+ $fault: "client",
435
+ ...opts
436
+ });
437
+ Object.setPrototypeOf(this, _InvalidClientException.prototype);
438
+ this.error = opts.error;
439
+ this.error_description = opts.error_description;
440
+ }
441
+ };
442
+ var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException {
443
+ name = "InvalidGrantException";
444
+ $fault = "client";
445
+ error;
446
+ error_description;
447
+ constructor(opts) {
448
+ super({
449
+ name: "InvalidGrantException",
450
+ $fault: "client",
451
+ ...opts
452
+ });
453
+ Object.setPrototypeOf(this, _InvalidGrantException.prototype);
454
+ this.error = opts.error;
455
+ this.error_description = opts.error_description;
456
+ }
457
+ };
458
+ var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException {
459
+ name = "InvalidRequestException";
460
+ $fault = "client";
461
+ error;
462
+ error_description;
463
+ constructor(opts) {
464
+ super({
465
+ name: "InvalidRequestException",
466
+ $fault: "client",
467
+ ...opts
468
+ });
469
+ Object.setPrototypeOf(this, _InvalidRequestException.prototype);
470
+ this.error = opts.error;
471
+ this.error_description = opts.error_description;
472
+ }
473
+ };
474
+ var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException {
475
+ name = "InvalidScopeException";
476
+ $fault = "client";
477
+ error;
478
+ error_description;
479
+ constructor(opts) {
480
+ super({
481
+ name: "InvalidScopeException",
482
+ $fault: "client",
483
+ ...opts
484
+ });
485
+ Object.setPrototypeOf(this, _InvalidScopeException.prototype);
486
+ this.error = opts.error;
487
+ this.error_description = opts.error_description;
488
+ }
489
+ };
490
+ var SlowDownException = class _SlowDownException extends SSOOIDCServiceException {
491
+ name = "SlowDownException";
492
+ $fault = "client";
493
+ error;
494
+ error_description;
495
+ constructor(opts) {
496
+ super({
497
+ name: "SlowDownException",
498
+ $fault: "client",
499
+ ...opts
500
+ });
501
+ Object.setPrototypeOf(this, _SlowDownException.prototype);
502
+ this.error = opts.error;
503
+ this.error_description = opts.error_description;
504
+ }
505
+ };
506
+ var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException {
507
+ name = "UnauthorizedClientException";
508
+ $fault = "client";
509
+ error;
510
+ error_description;
511
+ constructor(opts) {
512
+ super({
513
+ name: "UnauthorizedClientException",
514
+ $fault: "client",
515
+ ...opts
516
+ });
517
+ Object.setPrototypeOf(this, _UnauthorizedClientException.prototype);
518
+ this.error = opts.error;
519
+ this.error_description = opts.error_description;
520
+ }
521
+ };
522
+ var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException {
523
+ name = "UnsupportedGrantTypeException";
524
+ $fault = "client";
525
+ error;
526
+ error_description;
527
+ constructor(opts) {
528
+ super({
529
+ name: "UnsupportedGrantTypeException",
530
+ $fault: "client",
531
+ ...opts
532
+ });
533
+ Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype);
534
+ this.error = opts.error;
535
+ this.error_description = opts.error_description;
536
+ }
537
+ };
538
+
539
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/protocols/Aws_restJson1.js
540
+ var se_CreateTokenCommand = async (input, context) => {
541
+ const b2 = requestBuilder(input, context);
542
+ const headers = {
543
+ "content-type": "application/json"
544
+ };
545
+ b2.bp("/token");
546
+ let body;
547
+ body = JSON.stringify(take(input, {
548
+ clientId: [],
549
+ clientSecret: [],
550
+ code: [],
551
+ codeVerifier: [],
552
+ deviceCode: [],
553
+ grantType: [],
554
+ redirectUri: [],
555
+ refreshToken: [],
556
+ scope: (_) => _json(_)
557
+ }));
558
+ b2.m("POST").h(headers).b(body);
559
+ return b2.build();
560
+ };
561
+ var de_CreateTokenCommand = async (output, context) => {
562
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
563
+ return de_CommandError(output, context);
564
+ }
565
+ const contents = map({
566
+ $metadata: deserializeMetadata(output)
567
+ });
568
+ const data = expectNonNull(expectObject(await parseJsonBody(output.body, context)), "body");
569
+ const doc = take(data, {
570
+ accessToken: expectString,
571
+ expiresIn: expectInt32,
572
+ idToken: expectString,
573
+ refreshToken: expectString,
574
+ tokenType: expectString
575
+ });
576
+ Object.assign(contents, doc);
577
+ return contents;
578
+ };
579
+ var de_CommandError = async (output, context) => {
580
+ const parsedOutput = {
581
+ ...output,
582
+ body: await parseJsonErrorBody(output.body, context)
583
+ };
584
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
585
+ switch (errorCode) {
586
+ case "AccessDeniedException":
587
+ case "com.amazonaws.ssooidc#AccessDeniedException":
588
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
589
+ case "AuthorizationPendingException":
590
+ case "com.amazonaws.ssooidc#AuthorizationPendingException":
591
+ throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
592
+ case "ExpiredTokenException":
593
+ case "com.amazonaws.ssooidc#ExpiredTokenException":
594
+ throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
595
+ case "InternalServerException":
596
+ case "com.amazonaws.ssooidc#InternalServerException":
597
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
598
+ case "InvalidClientException":
599
+ case "com.amazonaws.ssooidc#InvalidClientException":
600
+ throw await de_InvalidClientExceptionRes(parsedOutput, context);
601
+ case "InvalidGrantException":
602
+ case "com.amazonaws.ssooidc#InvalidGrantException":
603
+ throw await de_InvalidGrantExceptionRes(parsedOutput, context);
604
+ case "InvalidRequestException":
605
+ case "com.amazonaws.ssooidc#InvalidRequestException":
606
+ throw await de_InvalidRequestExceptionRes(parsedOutput, context);
607
+ case "InvalidScopeException":
608
+ case "com.amazonaws.ssooidc#InvalidScopeException":
609
+ throw await de_InvalidScopeExceptionRes(parsedOutput, context);
610
+ case "SlowDownException":
611
+ case "com.amazonaws.ssooidc#SlowDownException":
612
+ throw await de_SlowDownExceptionRes(parsedOutput, context);
613
+ case "UnauthorizedClientException":
614
+ case "com.amazonaws.ssooidc#UnauthorizedClientException":
615
+ throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
616
+ case "UnsupportedGrantTypeException":
617
+ case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
618
+ throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
619
+ default:
620
+ const parsedBody = parsedOutput.body;
621
+ return throwDefaultError({
622
+ output,
623
+ parsedBody,
624
+ errorCode
625
+ });
626
+ }
627
+ };
628
+ var throwDefaultError = withBaseException(SSOOIDCServiceException);
629
+ var de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
630
+ const contents = map({});
631
+ const data = parsedOutput.body;
632
+ const doc = take(data, {
633
+ error: expectString,
634
+ error_description: expectString
635
+ });
636
+ Object.assign(contents, doc);
637
+ const exception = new AccessDeniedException({
638
+ $metadata: deserializeMetadata(parsedOutput),
639
+ ...contents
640
+ });
641
+ return decorateServiceException(exception, parsedOutput.body);
642
+ };
643
+ var de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
644
+ const contents = map({});
645
+ const data = parsedOutput.body;
646
+ const doc = take(data, {
647
+ error: expectString,
648
+ error_description: expectString
649
+ });
650
+ Object.assign(contents, doc);
651
+ const exception = new AuthorizationPendingException({
652
+ $metadata: deserializeMetadata(parsedOutput),
653
+ ...contents
654
+ });
655
+ return decorateServiceException(exception, parsedOutput.body);
656
+ };
657
+ var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
658
+ const contents = map({});
659
+ const data = parsedOutput.body;
660
+ const doc = take(data, {
661
+ error: expectString,
662
+ error_description: expectString
663
+ });
664
+ Object.assign(contents, doc);
665
+ const exception = new ExpiredTokenException({
666
+ $metadata: deserializeMetadata(parsedOutput),
667
+ ...contents
668
+ });
669
+ return decorateServiceException(exception, parsedOutput.body);
670
+ };
671
+ var de_InternalServerExceptionRes = async (parsedOutput, context) => {
672
+ const contents = map({});
673
+ const data = parsedOutput.body;
674
+ const doc = take(data, {
675
+ error: expectString,
676
+ error_description: expectString
677
+ });
678
+ Object.assign(contents, doc);
679
+ const exception = new InternalServerException({
680
+ $metadata: deserializeMetadata(parsedOutput),
681
+ ...contents
682
+ });
683
+ return decorateServiceException(exception, parsedOutput.body);
684
+ };
685
+ var de_InvalidClientExceptionRes = async (parsedOutput, context) => {
686
+ const contents = map({});
687
+ const data = parsedOutput.body;
688
+ const doc = take(data, {
689
+ error: expectString,
690
+ error_description: expectString
691
+ });
692
+ Object.assign(contents, doc);
693
+ const exception = new InvalidClientException({
694
+ $metadata: deserializeMetadata(parsedOutput),
695
+ ...contents
696
+ });
697
+ return decorateServiceException(exception, parsedOutput.body);
698
+ };
699
+ var de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
700
+ const contents = map({});
701
+ const data = parsedOutput.body;
702
+ const doc = take(data, {
703
+ error: expectString,
704
+ error_description: expectString
705
+ });
706
+ Object.assign(contents, doc);
707
+ const exception = new InvalidGrantException({
708
+ $metadata: deserializeMetadata(parsedOutput),
709
+ ...contents
710
+ });
711
+ return decorateServiceException(exception, parsedOutput.body);
712
+ };
713
+ var de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
714
+ const contents = map({});
715
+ const data = parsedOutput.body;
716
+ const doc = take(data, {
717
+ error: expectString,
718
+ error_description: expectString
719
+ });
720
+ Object.assign(contents, doc);
721
+ const exception = new InvalidRequestException({
722
+ $metadata: deserializeMetadata(parsedOutput),
723
+ ...contents
724
+ });
725
+ return decorateServiceException(exception, parsedOutput.body);
726
+ };
727
+ var de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
728
+ const contents = map({});
729
+ const data = parsedOutput.body;
730
+ const doc = take(data, {
731
+ error: expectString,
732
+ error_description: expectString
733
+ });
734
+ Object.assign(contents, doc);
735
+ const exception = new InvalidScopeException({
736
+ $metadata: deserializeMetadata(parsedOutput),
737
+ ...contents
738
+ });
739
+ return decorateServiceException(exception, parsedOutput.body);
740
+ };
741
+ var de_SlowDownExceptionRes = async (parsedOutput, context) => {
742
+ const contents = map({});
743
+ const data = parsedOutput.body;
744
+ const doc = take(data, {
745
+ error: expectString,
746
+ error_description: expectString
747
+ });
748
+ Object.assign(contents, doc);
749
+ const exception = new SlowDownException({
750
+ $metadata: deserializeMetadata(parsedOutput),
751
+ ...contents
752
+ });
753
+ return decorateServiceException(exception, parsedOutput.body);
754
+ };
755
+ var de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
756
+ const contents = map({});
757
+ const data = parsedOutput.body;
758
+ const doc = take(data, {
759
+ error: expectString,
760
+ error_description: expectString
761
+ });
762
+ Object.assign(contents, doc);
763
+ const exception = new UnauthorizedClientException({
764
+ $metadata: deserializeMetadata(parsedOutput),
765
+ ...contents
766
+ });
767
+ return decorateServiceException(exception, parsedOutput.body);
768
+ };
769
+ var de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => {
770
+ const contents = map({});
771
+ const data = parsedOutput.body;
772
+ const doc = take(data, {
773
+ error: expectString,
774
+ error_description: expectString
775
+ });
776
+ Object.assign(contents, doc);
777
+ const exception = new UnsupportedGrantTypeException({
778
+ $metadata: deserializeMetadata(parsedOutput),
779
+ ...contents
780
+ });
781
+ return decorateServiceException(exception, parsedOutput.body);
782
+ };
783
+ var deserializeMetadata = (output) => ({
784
+ httpStatusCode: output.statusCode,
785
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
786
+ extendedRequestId: output.headers["x-amz-id-2"],
787
+ cfId: output.headers["x-amz-cf-id"]
788
+ });
789
+
790
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js
791
+ var CreateTokenCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
792
+ return [
793
+ getSerdePlugin(config, this.serialize, this.deserialize),
794
+ getEndpointPlugin(config, Command2.getEndpointParameterInstructions())
795
+ ];
796
+ }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {
797
+ };
798
+
799
+ // node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/SSOOIDC.js
800
+ var commands = {
801
+ CreateTokenCommand
802
+ };
803
+ var SSOOIDC = class extends SSOOIDCClient {
804
+ };
805
+ createAggregatedClient(commands, SSOOIDC);
806
+ export {
807
+ Command as $Command,
808
+ AccessDeniedException,
809
+ AuthorizationPendingException,
810
+ CreateTokenCommand,
811
+ CreateTokenRequestFilterSensitiveLog,
812
+ CreateTokenResponseFilterSensitiveLog,
813
+ ExpiredTokenException,
814
+ InternalServerException,
815
+ InvalidClientException,
816
+ InvalidGrantException,
817
+ InvalidRequestException,
818
+ InvalidScopeException,
819
+ SSOOIDC,
820
+ SSOOIDCClient,
821
+ SSOOIDCServiceException,
822
+ SlowDownException,
823
+ UnauthorizedClientException,
824
+ UnsupportedGrantTypeException,
825
+ Client as __Client
826
+ };
827
+ //# sourceMappingURL=sso-oidc-GZ3LZ3MF.js.map