@etainabl/nodejs-sdk 1.3.193 → 1.3.196

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