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