@beesolve/analytics-processor 0.4.0 → 0.5.0

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 (75) hide show
  1. package/DOCS.md +23 -3
  2. package/dist/cdk.js +46 -0
  3. package/dist/dailyRollup/dailyRollup.mjs.map +2 -2
  4. package/dist/hourly/hourly.mjs +3 -3
  5. package/dist/hourly/hourly.mjs.map +3 -3
  6. package/dist/index.d.ts +233 -3
  7. package/dist/index.js +509 -40
  8. package/dist/monthlyRollup/monthlyRollup.mjs.map +2 -2
  9. package/dist/sitemap/bowser-UJEXXM6S.mjs +2 -0
  10. package/dist/sitemap/bowser-UJEXXM6S.mjs.map +7 -0
  11. package/dist/sitemap/chunk-3UGRDNDZ.mjs +6 -0
  12. package/dist/sitemap/chunk-3UGRDNDZ.mjs.map +7 -0
  13. package/dist/sitemap/chunk-BH7ZEBAB.mjs +2 -0
  14. package/dist/sitemap/chunk-BH7ZEBAB.mjs.map +7 -0
  15. package/dist/sitemap/chunk-CFZ5JWD3.mjs +2 -0
  16. package/dist/sitemap/chunk-CFZ5JWD3.mjs.map +7 -0
  17. package/dist/sitemap/chunk-KRS5YV2Z.mjs +2 -0
  18. package/dist/sitemap/chunk-KRS5YV2Z.mjs.map +7 -0
  19. package/dist/sitemap/chunk-LB33VBGK.mjs +2 -0
  20. package/dist/sitemap/chunk-LB33VBGK.mjs.map +7 -0
  21. package/dist/sitemap/chunk-OC3UN3OS.mjs +2 -0
  22. package/dist/sitemap/chunk-OC3UN3OS.mjs.map +7 -0
  23. package/dist/sitemap/chunk-PD2XGJQD.mjs +10 -0
  24. package/dist/sitemap/chunk-PD2XGJQD.mjs.map +7 -0
  25. package/dist/sitemap/chunk-QPD5NJHJ.mjs +2 -0
  26. package/dist/sitemap/chunk-QPD5NJHJ.mjs.map +7 -0
  27. package/dist/sitemap/chunk-REMPUQ6B.mjs +19 -0
  28. package/dist/sitemap/chunk-REMPUQ6B.mjs.map +7 -0
  29. package/dist/sitemap/chunk-SNCZ4GCT.mjs +2 -0
  30. package/dist/sitemap/chunk-SNCZ4GCT.mjs.map +7 -0
  31. package/dist/sitemap/chunk-TZ6TJSKE.mjs +10 -0
  32. package/dist/sitemap/chunk-TZ6TJSKE.mjs.map +7 -0
  33. package/dist/sitemap/chunk-YMGL4RSC.mjs +2 -0
  34. package/dist/sitemap/chunk-YMGL4RSC.mjs.map +7 -0
  35. package/dist/sitemap/chunk-YY2HYMK3.mjs +4 -0
  36. package/dist/sitemap/chunk-YY2HYMK3.mjs.map +7 -0
  37. package/dist/sitemap/client-WGCJRHWA.mjs +2 -0
  38. package/dist/sitemap/client-WGCJRHWA.mjs.map +7 -0
  39. package/dist/sitemap/dist-es-3FAKVHIH.mjs +2 -0
  40. package/dist/sitemap/dist-es-3FAKVHIH.mjs.map +7 -0
  41. package/dist/sitemap/dist-es-A36NQ5CO.mjs +2 -0
  42. package/dist/sitemap/dist-es-A36NQ5CO.mjs.map +7 -0
  43. package/dist/sitemap/dist-es-F7GXZJIC.mjs +3 -0
  44. package/dist/sitemap/dist-es-F7GXZJIC.mjs.map +7 -0
  45. package/dist/sitemap/dist-es-GRXF7RTK.mjs +2 -0
  46. package/dist/sitemap/dist-es-GRXF7RTK.mjs.map +7 -0
  47. package/dist/sitemap/dist-es-OKUHAI6O.mjs +2 -0
  48. package/dist/sitemap/dist-es-OKUHAI6O.mjs.map +7 -0
  49. package/dist/sitemap/dist-es-P7BXOYHO.mjs +2 -0
  50. package/dist/sitemap/dist-es-P7BXOYHO.mjs.map +7 -0
  51. package/dist/sitemap/dist-es-SQ53M5JX.mjs +7 -0
  52. package/dist/sitemap/dist-es-SQ53M5JX.mjs.map +7 -0
  53. package/dist/sitemap/dist-es-TCGA3UGX.mjs +2 -0
  54. package/dist/sitemap/dist-es-TCGA3UGX.mjs.map +7 -0
  55. package/dist/sitemap/dist-es-UXKF5GQY.mjs +3 -0
  56. package/dist/sitemap/dist-es-UXKF5GQY.mjs.map +7 -0
  57. package/dist/sitemap/dist-es-YJ4PQZC7.mjs +2 -0
  58. package/dist/sitemap/dist-es-YJ4PQZC7.mjs.map +7 -0
  59. package/dist/sitemap/event-streams-6V3Q6GHC.mjs +2 -0
  60. package/dist/sitemap/event-streams-6V3Q6GHC.mjs.map +7 -0
  61. package/dist/sitemap/loadCognitoIdentity-RIENBHOX.mjs +2 -0
  62. package/dist/sitemap/loadCognitoIdentity-RIENBHOX.mjs.map +7 -0
  63. package/dist/sitemap/loadSso-DTQ4R4CV.mjs +2 -0
  64. package/dist/sitemap/loadSso-DTQ4R4CV.mjs.map +7 -0
  65. package/dist/sitemap/loadSts-GZDTRQPT.mjs +2 -0
  66. package/dist/sitemap/loadSts-GZDTRQPT.mjs.map +7 -0
  67. package/dist/sitemap/signin-6D536OAO.mjs +2 -0
  68. package/dist/sitemap/signin-6D536OAO.mjs.map +7 -0
  69. package/dist/sitemap/sitemap.mjs +3 -0
  70. package/dist/sitemap/sitemap.mjs.map +7 -0
  71. package/dist/sitemap/sso-oidc-T5CK3NX3.mjs +2 -0
  72. package/dist/sitemap/sso-oidc-T5CK3NX3.mjs.map +7 -0
  73. package/dist/sitemap/sts-62ECLMPL.mjs +2 -0
  74. package/dist/sitemap/sts-62ECLMPL.mjs.map +7 -0
  75. package/package.json +2 -1
@@ -0,0 +1,3 @@
1
+ /* CommonJS polyfills */import { fileURLToPath } from 'node:url';import { createRequire } from 'node:module';const __filename = fileURLToPath(import.meta.url);const __dirname = fileURLToPath(new URL('.', import.meta.url));const require = createRequire(import.meta.url);/* end of CommonJS polyfills */
2
+ import{d as v}from"./chunk-PD2XGJQD.mjs";import"./chunk-YMGL4RSC.mjs";import{b as f,c as d,h as E,i as q,j as A,k as I,l as N}from"./chunk-KRS5YV2Z.mjs";import"./chunk-3UGRDNDZ.mjs";import"./chunk-OC3UN3OS.mjs";import{a as o}from"./chunk-CFZ5JWD3.mjs";var P=o(e=>e&&(typeof e.sso_start_url=="string"||typeof e.sso_account_id=="string"||typeof e.sso_session=="string"||typeof e.sso_region=="string"||typeof e.sso_role_name=="string"),"isSsoProfile");var _="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var W=o(async(e,s={},t)=>{let{SSOOIDCClient:n}=await import("./sso-oidc-T5CK3NX3.mjs"),i=o(p=>s.clientConfig?.[p]??s.parentClientConfig?.[p]??t?.[p],"coalesce");return new n(Object.assign({},s.clientConfig??{},{region:e??s.clientConfig?.region,logger:i("logger"),userAgentAppId:i("userAgentAppId")}))},"getSsoOidcClient");var X=o(async(e,s,t={},n)=>{let{CreateTokenCommand:i}=await import("./sso-oidc-T5CK3NX3.mjs");return(await W(s,t,n)).send(new i({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},"getNewSsoOidcToken");var F=o(e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new d(`Token is expired. ${_}`,!1)},"validateTokenExpiry");var w=o((e,s,t=!1)=>{if(typeof s>"u")throw new d(`Value not present for '${e}' in SSO Token${t?". Cannot refresh":""}. ${_}`,!1)},"validateTokenKey");import{promises as Y}from"node:fs";var{writeFile:B}=Y,z=o((e,s)=>{let t=q(e),n=JSON.stringify(s,null,2);return B(t,n)},"writeSSOTokenToFile");var J=new Map,D=o((e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let t=await N(e),n=E({profile:e.profile??s?.profile}),i=t[n];if(i){if(!i.sso_session)throw new d(`Profile '${n}' is missing required property 'sso_session'.`)}else throw new d(`Profile '${n}' could not be found in shared credentials file.`,!1);let a=i.sso_session,g=(await I(e))[a];if(!g)throw new d(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let l of["sso_start_url","sso_region"])if(!g[l])throw new d(`Sso session '${a}' is missing required property '${l}'.`,!1);let S=g.sso_start_url,O=g.sso_region,r;try{r=await A(a)}catch{throw new d(`The SSO session token associated with profile=${n} was not found or is invalid. ${_}`,!1)}w("accessToken",r.accessToken),w("expiresAt",r.expiresAt);let{accessToken:k,expiresAt:T}=r,c={token:k,expiration:new Date(T)};if(c.expiration.getTime()-Date.now()>3e5)return c;let m=J.get(a)??0;if(Date.now()-m<30*1e3)return F(c),c;w("clientId",r.clientId,!0),w("clientSecret",r.clientSecret,!0),w("refreshToken",r.refreshToken,!0);try{J.set(a,Date.now());let l=await X(r,O,e,s);w("accessToken",l.accessToken),w("expiresIn",l.expiresIn);let x=new Date(Date.now()+l.expiresIn*1e3);try{await z(a,{...r,accessToken:l.accessToken,expiresAt:x.toISOString(),refreshToken:l.refreshToken})}catch{}return{token:l.accessToken,expiration:x}}catch{return F(c),c}},"fromSso");var C=!1,$=o(async({ssoStartUrl:e,ssoSession:s,ssoAccountId:t,ssoRegion:n,ssoRoleName:i,ssoClient:a,clientConfig:p,parentClientConfig:g,callerClientConfig:S,profile:O,filepath:r,configFilepath:k,ignoreCache:T,logger:c})=>{let m,l="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{let u=await D({profile:O,filepath:r,configFilepath:k,ignoreCache:T,clientConfig:p,parentClientConfig:g,logger:c})({callerClientConfig:S});m={accessToken:u.token,expiresAt:new Date(u.expiration).toISOString()}}catch(u){throw new f(u.message,{tryNextLink:C,logger:c})}else try{m=await A(e)}catch{throw new f(`The SSO session associated with this profile is invalid. ${l}`,{tryNextLink:C,logger:c})}if(new Date(m.expiresAt).getTime()-Date.now()<=0)throw new f(`The SSO session associated with this profile has expired. ${l}`,{tryNextLink:C,logger:c});let{accessToken:x}=m,{SSOClient:h,GetRoleCredentialsCommand:y}=await import("./loadSso-DTQ4R4CV.mjs"),V=a||new h(Object.assign({},p??{},{logger:p?.logger??S?.logger??g?.logger,region:p?.region??n,userAgentAppId:p?.userAgentAppId??S?.userAgentAppId??g?.userAgentAppId})),M;try{M=await V.send(new y({accountId:t,roleName:i,accessToken:x}))}catch(u){throw new f(u,{tryNextLink:C,logger:c})}let{roleCredentials:{accessKeyId:b,secretAccessKey:G,sessionToken:K,expiration:H,credentialScope:U,accountId:j}={}}=M;if(!b||!G||!K||!H)throw new f("SSO returns an invalid temporary credential.",{tryNextLink:C,logger:c});let R={accessKeyId:b,secretAccessKey:G,sessionToken:K,expiration:new Date(H),...U&&{credentialScope:U},...j&&{accountId:j}};return s?v(R,"CREDENTIALS_SSO","s"):v(R,"CREDENTIALS_SSO_LEGACY","u"),R},"resolveSSOCredentials");var L=o((e,s)=>{let{sso_start_url:t,sso_account_id:n,sso_region:i,sso_role_name:a}=e;if(!t||!n||!i||!a)throw new f(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
3
+ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:s});return e},"validateSsoProfile");var Z=o((e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:t,ssoAccountId:n,ssoRegion:i,ssoRoleName:a,ssoSession:p}=e,{ssoClient:g}=e,S=E({profile:e.profile??s?.profile});if(!t&&!n&&!i&&!a&&!p){let r=(await N(e))[S];if(!r)throw new f(`Profile ${S} was not found.`,{logger:e.logger});if(!P(r))throw new f(`Profile ${S} is not configured with SSO credentials.`,{logger:e.logger});if(r?.sso_session){let h=(await I(e))[r.sso_session],y=` configurations in profile ${S} and sso-session ${r.sso_session}`;if(i&&i!==h.sso_region)throw new f("Conflicting SSO region"+y,{tryNextLink:!1,logger:e.logger});if(t&&t!==h.sso_start_url)throw new f("Conflicting SSO start_url"+y,{tryNextLink:!1,logger:e.logger});r.sso_region=h.sso_region,r.sso_start_url=h.sso_start_url}let{sso_start_url:k,sso_account_id:T,sso_region:c,sso_role_name:m,sso_session:l}=L(r,e.logger);return $({ssoStartUrl:k,ssoSession:l,ssoAccountId:T,ssoRegion:c,ssoRoleName:m,ssoClient:g,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:S,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else{if(!t||!n||!i||!a)throw new f('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});return $({ssoStartUrl:t,ssoSession:p,ssoAccountId:n,ssoRegion:i,ssoRoleName:a,ssoClient:g,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:S,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}},"fromSSO");export{Z as fromSSO,P as isSsoProfile,L as validateSsoProfile};
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.18/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js", "../../../../node_modules/.bun/@aws-sdk+token-providers@3.1150.0/node_modules/@aws-sdk/token-providers/dist-es/constants.js", "../../../../node_modules/.bun/@aws-sdk+token-providers@3.1150.0/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js", "../../../../node_modules/.bun/@aws-sdk+token-providers@3.1150.0/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js", "../../../../node_modules/.bun/@aws-sdk+token-providers@3.1150.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js", "../../../../node_modules/.bun/@aws-sdk+token-providers@3.1150.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js", "../../../../node_modules/.bun/@aws-sdk+token-providers@3.1150.0/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js", "../../../../node_modules/.bun/@aws-sdk+token-providers@3.1150.0/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js", "../../../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.18/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js", "../../../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.18/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js", "../../../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.18/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js"],
4
+ "sourcesContent": ["export const isSsoProfile = (arg) => arg &&\n (typeof arg.sso_start_url === \"string\" ||\n typeof arg.sso_account_id === \"string\" ||\n typeof arg.sso_session === \"string\" ||\n typeof arg.sso_region === \"string\" ||\n typeof arg.sso_role_name === \"string\");\n", "export const EXPIRE_WINDOW_MS = 5 * 60 * 1000;\nexport const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n", "export const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {\n const { SSOOIDCClient } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];\n const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {\n region: ssoRegion ?? init.clientConfig?.region,\n logger: coalesce(\"logger\"),\n userAgentAppId: coalesce(\"userAgentAppId\"),\n }));\n return ssoOidcClient;\n};\n", "import { getSsoOidcClient } from \"./getSsoOidcClient\";\nexport const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {\n const { CreateTokenCommand } = await import(\"@aws-sdk/nested-clients/sso-oidc\");\n const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);\n return ssoOidcClient.send(new CreateTokenCommand({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\",\n }));\n};\n", "import { TokenProviderError } from \"@smithy/core/config\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenExpiry = (token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n};\n", "import { TokenProviderError } from \"@smithy/core/config\";\nimport { REFRESH_MESSAGE } from \"./constants\";\nexport const validateTokenKey = (key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`, false);\n }\n};\n", "import { getSSOTokenFilepath } from \"@smithy/core/config\";\nimport { promises as fsPromises } from \"node:fs\";\nconst { writeFile } = fsPromises;\nexport const writeSSOTokenToFile = (id, ssoToken) => {\n const tokenFilepath = getSSOTokenFilepath(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n};\n", "import { getProfileName, getSSOTokenFromFile, loadSsoSessionData, parseKnownFiles, TokenProviderError, } from \"@smithy/core/config\";\nimport { EXPIRE_WINDOW_MS, REFRESH_MESSAGE } from \"./constants\";\nimport { getNewSsoOidcToken } from \"./getNewSsoOidcToken\";\nimport { validateTokenExpiry } from \"./validateTokenExpiry\";\nimport { validateTokenKey } from \"./validateTokenKey\";\nimport { writeSSOTokenToFile } from \"./writeSSOTokenToFile\";\nconst lastRefreshAttemptTimes = new Map();\nexport const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/token-providers - fromSso\");\n const profiles = await parseKnownFiles(init);\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n const profile = profiles[profileName];\n if (!profile) {\n throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n }\n else if (!profile[\"sso_session\"]) {\n throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await loadSsoSessionData(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);\n }\n }\n const ssoStartUrl = ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await getSSOTokenFromFile(ssoSessionName);\n }\n catch (e) {\n throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = {\n token: accessToken,\n expiration: new Date(expiresAt),\n };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n const lastRefreshAttemptTime = lastRefreshAttemptTimes.get(ssoSessionName) ?? 0;\n if (Date.now() - lastRefreshAttemptTime < 30 * 1000) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTimes.set(ssoSessionName, Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken,\n });\n }\n catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration,\n };\n }\n catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n};\n", "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { fromSso as getSsoTokenProvider } from \"@aws-sdk/token-providers\";\nimport { CredentialsProviderError, getSSOTokenFromFile } from \"@smithy/core/config\";\nconst SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nexport const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await getSsoTokenProvider({\n profile,\n filepath,\n configFilepath,\n ignoreCache,\n clientConfig,\n parentClientConfig,\n logger,\n })({ callerClientConfig });\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString(),\n };\n }\n catch (e) {\n throw new CredentialsProviderError(e.message, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n else {\n try {\n token = await getSSOTokenFromFile(ssoStartUrl);\n }\n catch (e) {\n throw new CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { accessToken } = token;\n const { SSOClient, GetRoleCredentialsCommand } = await import(\"./loadSso.js\");\n const sso = ssoClient ||\n new SSOClient(Object.assign({}, clientConfig ?? {}, {\n logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,\n region: clientConfig?.region ?? ssoRegion,\n userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId,\n }));\n let ssoResp;\n try {\n ssoResp = await sso.send(new GetRoleCredentialsCommand({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken,\n }));\n }\n catch (e) {\n throw new CredentialsProviderError(e, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}, } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new CredentialsProviderError(\"SSO returns an invalid temporary credential.\", {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger,\n });\n }\n const credentials = {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration: new Date(expiration),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n if (ssoSession) {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO\", \"s\");\n }\n else {\n setCredentialFeature(credentials, \"CREDENTIALS_SSO_LEGACY\", \"u\");\n }\n return credentials;\n};\n", "import { CredentialsProviderError } from \"@smithy/core/config\";\nexport const validateSsoProfile = (profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", ` +\n `\"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\", \")}\\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });\n }\n return profile;\n};\n", "import { CredentialsProviderError, getProfileName, loadSsoSessionData, parseKnownFiles } from \"@smithy/core/config\";\nimport { isSsoProfile } from \"./isSsoProfile\";\nimport { resolveSSOCredentials } from \"./resolveSSOCredentials\";\nimport { validateSsoProfile } from \"./validateSsoProfile\";\nexport const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = getProfileName({\n profile: init.profile ?? callerClientConfig?.profile,\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await parseKnownFiles(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger,\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await loadSsoSessionData(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger,\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient: ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new CredentialsProviderError(\"Incomplete configuration. The fromSSO() argument hash must include \" +\n '\"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"', { tryNextLink: false, logger: init.logger });\n }\n else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n callerClientConfig: init.callerClientConfig,\n profile: profileName,\n filepath: init.filepath,\n configFilepath: init.configFilepath,\n ignoreCache: init.ignoreCache,\n logger: init.logger,\n });\n }\n};\n"],
5
+ "mappings": ";4PAAO,IAAMA,EAAeC,EAACC,GAAQA,IAChC,OAAOA,EAAI,eAAkB,UAC1B,OAAOA,EAAI,gBAAmB,UAC9B,OAAOA,EAAI,aAAgB,UAC3B,OAAOA,EAAI,YAAe,UAC1B,OAAOA,EAAI,eAAkB,UALT,gBCCrB,IAAMC,EAAkB,kFCDxB,IAAMC,EAAmBC,EAAA,MAAOC,EAAWC,EAAO,CAAC,EAAGC,IAAuB,CAChF,GAAM,CAAE,cAAAC,CAAc,EAAI,KAAM,QAAO,yBAAkC,EACnEC,EAAWL,EAACM,GAASJ,EAAK,eAAeI,CAAI,GAAKJ,EAAK,qBAAqBI,CAAI,GAAKH,IAAqBG,CAAI,EAAnG,YAMjB,OALsB,IAAIF,EAAc,OAAO,OAAO,CAAC,EAAGF,EAAK,cAAgB,CAAC,EAAG,CAC/E,OAAQD,GAAaC,EAAK,cAAc,OACxC,OAAQG,EAAS,QAAQ,EACzB,eAAgBA,EAAS,gBAAgB,CAC7C,CAAC,CAAC,CAEN,EATgC,oBCCzB,IAAME,EAAqBC,EAAA,MAAOC,EAAUC,EAAWC,EAAO,CAAC,EAAGC,IAAuB,CAC5F,GAAM,CAAE,mBAAAC,CAAmB,EAAI,KAAM,QAAO,yBAAkC,EAE9E,OADsB,MAAMC,EAAiBJ,EAAWC,EAAMC,CAAkB,GAC3D,KAAK,IAAIC,EAAmB,CAC7C,SAAUJ,EAAS,SACnB,aAAcA,EAAS,a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CAAE,cAAAG,EAAe,eAAAC,EAAgB,WAAAC,EAAY,cAAAC,EAAe,YAAAC,CAAY,EAAIC,EAAmBZ,EAASV,EAAK,MAAM,EACzH,OAAOuB,EAAsB,CACzB,YAAaN,EACb,WAAYI,EACZ,aAAcH,EACd,UAAWC,EACX,YAAaC,EACb,UAAWb,EACX,aAAcP,EAAK,aACnB,mBAAoBA,EAAK,mBACzB,mBAAoBA,EAAK,mBACzB,QAASQ,EACT,SAAUR,EAAK,SACf,eAAgBA,EAAK,eACrB,YAAaA,EAAK,YAClB,OAAQA,EAAK,MACjB,CAAC,CACL,KACK,IAAI,CAACE,GAAe,CAACC,GAAgB,CAACC,GAAa,CAACC,EACrD,MAAM,IAAIO,EAAyB,+HAC8B,CAAE,YAAa,GAAO,OAAQZ,EAAK,MAAO,CAAC,EAG5G,OAAOuB,EAAsB,CACzB,YAAArB,EACA,WAAAI,EACA,aAAAH,EACA,UAAAC,EACA,YAAAC,EACA,UAAAE,EACA,aAAcP,EAAK,aACnB,mBAAoBA,EAAK,mBACzB,mBAAoBA,EAAK,mBACzB,QAASQ,EACT,SAAUR,EAAK,SACf,eAAgBA,EAAK,eACrB,YAAaA,EAAK,YAClB,OAAQA,EAAK,MACjB,CAAC,EAET,EA7EuB",
6
+ "names": ["isSsoProfile", "__name", "arg", "REFRESH_MESSAGE", "getSsoOidcClient", "__name", "ssoRegion", "init", "callerClientConfig", "SSOOIDCClient", "coalesce", "prop", "getNewSsoOidcToken", "__name", "ssoToken", "ssoRegion", "init", "callerClientConfig", "CreateTokenCommand", "getSsoOidcClient", "validateTokenExpiry", "__name", "token", "TokenProviderError", "REFRESH_MESSAGE", "validateTokenKey", "__name", "key", "value", "forRefresh", "TokenProviderError", "REFRESH_MESSAGE", "fsPromises", "writeFile", "fsPromises", "writeSSOTokenToFile", "__name", "id", "ssoToken", "tokenFilepath", "getSSOTokenFilepath", "tokenString", "lastRefreshAttemptTimes", "fromSso", "__name", "init", "callerClientConfig", "profiles", "parseKnownFiles", "profileName", "getProfileName", "profile", "TokenProviderError", "ssoSessionName", "ssoSession", "loadSsoSessionData", "ssoSessionRequiredKey", "ssoStartUrl", "ssoRegion", "ssoToken", "getSSOTokenFromFile", "REFRESH_MESSAGE", "validateTokenKey", "accessToken", "expiresAt", "existingToken", "lastRefreshAttemptTime", "validateTokenExpiry", "newSsoOidcToken", "getNewSsoOidcToken", "newTokenExpiration", "writeSSOTokenToFile", "SHOULD_FAIL_CREDENTIAL_CHAIN", "resolveSSOCredentials", "__name", "ssoStartUrl", "ssoSession", "ssoAccountId", "ssoRegion", "ssoRoleName", "ssoClient", "clientConfig", "parentClientConfig", "callerClientConfig", "profile", "filepath", "configFilepath", "ignoreCache", "logger", "token", "refreshMessage", "_token", "fromSso", "e", "CredentialsProviderError", "getSSOTokenFromFile", "accessToken", "SSOClient", "GetRoleCredentialsCommand", "sso", "ssoResp", "accessKeyId", "secretAccessKey", "sessionToken", "expiration", "credentialScope", "accountId", "credentials", "setCredentialFeature", "validateSsoProfile", "__name", "profile", "logger", "sso_start_url", "sso_account_id", "sso_region", "sso_role_name", "CredentialsProviderError", "fromSSO", "__name", "init", "callerClientConfig", "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName", "ssoSession", "ssoClient", "profileName", "getProfileName", "profile", "parseKnownFiles", "CredentialsProviderError", "isSsoProfile", "session", "loadSsoSessionData", "conflictMsg", "sso_start_url", "sso_account_id", "sso_region", "sso_role_name", "sso_session", "validateSsoProfile", "resolveSSOCredentials"]
7
+ }
@@ -0,0 +1,2 @@
1
+ /* CommonJS polyfills */import { fileURLToPath } from 'node:url';import { createRequire } from 'node:module';const __filename = fileURLToPath(import.meta.url);const __dirname = fileURLToPath(new URL('.', import.meta.url));const require = createRequire(import.meta.url);/* end of CommonJS polyfills */
2
+ import{d}from"./chunk-PD2XGJQD.mjs";import"./chunk-YMGL4RSC.mjs";import{b as a,m}from"./chunk-KRS5YV2Z.mjs";import"./chunk-3UGRDNDZ.mjs";import"./chunk-OC3UN3OS.mjs";import{a as t}from"./chunk-CFZ5JWD3.mjs";import{readFileSync as S}from"node:fs";var c=t(e=>async s=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:i,providerId:n,policyArns:g,policy:E,durationSeconds:p}=e,{roleAssumerWithWebIdentity:l}=e;if(!l){let{getDefaultRoleAssumerWithWebIdentity:_}=await import("./sts-62ECLMPL.mjs");l=_({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...s?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return l({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:n,PolicyArns:g,Policy:E,DurationSeconds:p})},"fromWebToken");var f="AWS_WEB_IDENTITY_TOKEN_FILE",T="AWS_ROLE_ARN",N="AWS_ROLE_SESSION_NAME",I=t((e={})=>async s=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[f],r=e?.roleArn??process.env[T],i=e?.roleSessionName??process.env[N];if(!o||!r)throw new a("Web identity configuration not specified",{logger:e.logger});let n=await c({...e,webIdentityToken:m?.getTokenRecord?.()[o]??S(o,{encoding:"ascii"}),roleArn:r,roleSessionName:i})(s);return o===process.env[f]&&d(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),n},"fromTokenFile");export{I as fromTokenFile,c as fromWebToken};
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.80/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js", "../../../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.80/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js"],
4
+ "sourcesContent": ["import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError, externalDataInterceptor } from \"@smithy/core/config\";\nimport { readFileSync } from \"node:fs\";\nimport { fromWebToken } from \"./fromWebToken\";\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nexport const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await fromWebToken({\n ...init,\n webIdentityToken: externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ??\n readFileSync(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })(awsIdentityProperties);\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\n", "export const fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await import(\"@aws-sdk/nested-clients/sts\");\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\n"],
5
+ "mappings": ";+MAEA,OAAS,gBAAAA,MAAoB,UCFtB,IAAMC,EAAeC,EAACC,GAAS,MAAOC,GAA0B,CACnED,EAAK,QAAQ,MAAM,0DAA0D,EAC7E,GAAM,CAAE,QAAAE,EAAS,gBAAAC,EAAiB,iBAAAC,EAAkB,WAAAC,EAAY,WAAAC,EAAY,OAAAC,EAAQ,gBAAAC,CAAgB,EAAIR,EACpG,CAAE,2BAAAS,CAA2B,EAAIT,EACrC,GAAI,CAACS,EAA4B,CAC7B,GAAM,CAAE,qCAAAC,CAAqC,EAAI,KAAM,QAAO,oBAA6B,EAC3FD,EAA6BC,EAAqC,CAC9D,GAAGV,EAAK,aACR,yBAA0BA,EAAK,OAC/B,mBAAoB,CAChB,GAAGC,GAAuB,mBAC1B,GAAGD,EAAK,kBACZ,CACJ,EAAGA,EAAK,aAAa,CACzB,CACA,OAAOS,EAA2B,CAC9B,QAASP,EACT,gBAAiBC,GAAmB,sBAAsB,KAAK,IAAI,CAAC,GACpE,iBAAkBC,EAClB,WAAYC,EACZ,WAAYC,EACZ,OAAQC,EACR,gBAAiBC,CACrB,CAAC,CACL,EAxB4B,gBDI5B,IAAMG,EAAiB,8BACjBC,EAAe,eACfC,EAAwB,wBACjBC,EAAgBC,EAAA,CAACC,EAAO,CAAC,IAAM,MAAOC,GAA0B,CACzED,EAAK,QAAQ,MAAM,2DAA2D,EAC9E,IAAME,EAAuBF,GAAM,sBAAwB,QAAQ,IAAIL,CAAc,EAC/EQ,EAAUH,GAAM,SAAW,QAAQ,IAAIJ,CAAY,EACnDQ,EAAkBJ,GAAM,iBAAmB,QAAQ,IAAIH,CAAqB,EAClF,GAAI,CAACK,GAAwB,CAACC,EAC1B,MAAM,IAAIE,EAAyB,2CAA4C,CAC3E,OAAQL,EAAK,MACjB,CAAC,EAEL,IAAMM,EAAc,MAAMC,EAAa,CACnC,GAAGP,EACH,iBAAkBQ,GAAyB,iBAAiB,EAAEN,CAAoB,GAC9EO,EAAaP,EAAsB,CAAE,SAAU,OAAQ,CAAC,EAC5D,QAAAC,EACA,gBAAAC,CACJ,CAAC,EAAEH,CAAqB,EACxB,OAAIC,IAAyB,QAAQ,IAAIP,CAAc,GACnDe,EAAqBJ,EAAa,wCAAyC,GAAG,EAE3EA,CACX,EArB6B",
6
+ "names": ["readFileSync", "fromWebToken", "__name", "init", "awsIdentityProperties", "roleArn", "roleSessionName", "webIdentityToken", "providerId", "policyArns", "policy", "durationSeconds", "roleAssumerWithWebIdentity", "getDefaultRoleAssumerWithWebIdentity", "ENV_TOKEN_FILE", "ENV_ROLE_ARN", "ENV_ROLE_SESSION_NAME", "fromTokenFile", "__name", "init", "awsIdentityProperties", "webIdentityTokenFile", "roleArn", "roleSessionName", "CredentialsProviderError", "credentials", "fromWebToken", "externalDataInterceptor", "readFileSync", "setCredentialFeature"]
7
+ }
@@ -0,0 +1,2 @@
1
+ /* CommonJS polyfills */import { fileURLToPath } from 'node:url';import { createRequire } from 'node:module';const __filename = fileURLToPath(import.meta.url);const __dirname = fileURLToPath(new URL('.', import.meta.url));const require = createRequire(import.meta.url);/* end of CommonJS polyfills */
2
+ import{a as A}from"./chunk-LB33VBGK.mjs";import{e as q,h as P,j as W,x as D,y as v}from"./chunk-3UGRDNDZ.mjs";import{f as B}from"./chunk-OC3UN3OS.mjs";import{a as i}from"./chunk-CFZ5JWD3.mjs";var x=class n{static{i(this,"Int64")}bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);let t=new Uint8Array(8);for(let r=7,s=Math.abs(Math.round(e));r>-1&&s>0;r--,s/=256)t[r]=s;return e<0&&J(t),new n(t)}valueOf(){let e=this.bytes.slice(0),t=e[0]&128;return t&&J(e),parseInt(v(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function J(n){for(let e=0;e<8;e++)n[e]^=255;for(let e=7;e>-1&&(n[e]++,n[e]===0);e--);}i(J,"negate");var T=class{static{i(this,"HeaderMarshaller")}toUtf8;fromUtf8;constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){let t=[];for(let a in e){if(!B(e,a))continue;let o=this.fromUtf8(a);t.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[a]))}let r=new Uint8Array(t.reduce((a,o)=>a+o.byteLength,0)),s=0;for(let a of t)r.set(a,s),s+=a.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":let r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":let s=new Uint8Array(9);return s[0]=5,s.set(e.value.bytes,1),s;case"binary":let a=new DataView(new ArrayBuffer(3+e.value.byteLength));a.setUint8(0,6),a.setUint16(1,e.value.byteLength,!1);let o=new Uint8Array(a.buffer);return o.set(e.value,3),o;case"string":let c=this.fromUtf8(e.value),l=new DataView(new ArrayBuffer(3+c.byteLength));l.setUint8(0,7),l.setUint16(1,c.byteLength,!1);let y=new Uint8Array(l.buffer);return y.set(c,3),y;case"timestamp":let d=new Uint8Array(9);return d[0]=8,d.set(x.fromNumber(e.value.valueOf()).bytes,1),d;case"uuid":if(!ae.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);let h=new Uint8Array(17);return h[0]=9,h.set(D(e.value.replace(/-/g,"")),1),h}}parse(e){let t={},r=0;for(;r<e.byteLength;){let s=e.getUint8(r++),a=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,s));switch(r+=s,e.getUint8(r++)){case 0:t[a]={type:X,value:!0};break;case 1:t[a]={type:X,value:!1};break;case 2:t[a]={type:V,value:e.getInt8(r++)};break;case 3:t[a]={type:_,value:e.getInt16(r,!1)},r+=2;break;case 4:t[a]={type:Y,value:e.getInt32(r,!1)},r+=4;break;case 5:t[a]={type:ee,value:new x(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:let o=e.getUint16(r,!1);r+=2,t[a]={type:te,value:new Uint8Array(e.buffer,e.byteOffset+r,o)},r+=o;break;case 7:let c=e.getUint16(r,!1);r+=2,t[a]={type:re,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,c))},r+=c;break;case 8:t[a]={type:ne,value:new Date(new x(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:let l=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[a]={type:se,value:`${v(l.subarray(0,4))}-${v(l.subarray(4,6))}-${v(l.subarray(6,8))}-${v(l.subarray(8,10))}-${v(l.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}},Q;(function(n){n[n.boolTrue=0]="boolTrue",n[n.boolFalse=1]="boolFalse",n[n.byte=2]="byte",n[n.short=3]="short",n[n.integer=4]="integer",n[n.long=5]="long",n[n.byteArray=6]="byteArray",n[n.string=7]="string",n[n.timestamp=8]="timestamp",n[n.uuid=9]="uuid"})(Q||(Q={}));var X="boolean",V="byte",_="short",Y="integer",ee="long",te="binary",re="string",ne="timestamp",se="uuid",ae=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var Z=4,M=Z*2,I=4,oe=M+I*2;function H({byteLength:n,byteOffset:e,buffer:t}){if(n<oe)throw new Error("Provided message too short to accommodate event stream message overhead");let r=new DataView(t,e,n),s=r.getUint32(0,!1);if(n!==s)throw new Error("Reported message length does not match received message length");let a=r.getUint32(Z,!1),o=r.getUint32(M,!1),c=r.getUint32(n-I,!1),l=new A;if(l.update(new Uint8Array(t,e,M)),o!==l.digestSync())throw new Error(`The prelude checksum specified in the message (${o}) does not match the calculated CRC32 checksum (${l.digestSync()})`);if(l.update(new Uint8Array(t,e+M,n-(M+I))),c!==l.digestSync())throw new Error(`The message checksum (${l.digestSync()}) did not match the expected value of ${c}`);return{headers:new DataView(t,e+M+I,a),body:new Uint8Array(t,e+M+I+a,s-a-(M+I+I))}}i(H,"splitMessage");var z=class{static{i(this,"EventStreamCodec")}headerMarshaller;messageBuffer;isEndOfStream;constructor(e,t){this.headerMarshaller=new T(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){let e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage(){return e},isEndOfStream(){return t}}}getAvailableMessages(){let e=this.messageBuffer;this.messageBuffer=[];let t=this.isEndOfStream;return{getMessages(){return e},isEndOfStream(){return t}}}encode({headers:e,body:t}){let r=this.headerMarshaller.format(e),s=r.byteLength+t.byteLength+16,a=new Uint8Array(s),o=new DataView(a.buffer,a.byteOffset,a.byteLength),c=new A;return o.setUint32(0,s,!1),o.setUint32(4,r.byteLength,!1),c.update(a.subarray(0,8)),o.setUint32(8,c.digestSync(),!1),a.set(r,12),a.set(t,r.byteLength+12),c.update(a.subarray(8,s-4)),o.setUint32(s-4,c.digestSync(),!1),a}decode(e){let{headers:t,body:r}=H(e);return{headers:this.headerMarshaller.parse(t),body:r}}formatHeaders(e){return this.headerMarshaller.format(e)}};var O=class{static{i(this,"MessageDecoderStream")}options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.decoder.decode(e)}};var N=class{static{i(this,"MessageEncoderStream")}options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream)yield this.options.encoder.encode(e);this.options.includeEndFrame&&(yield new Uint8Array(0))}};var $=class{static{i(this,"SmithyMessageDecoderStream")}options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream){let t=await this.options.deserializer(e);t!==void 0&&(yield t)}}};var G=class{static{i(this,"SmithyMessageEncoderStream")}options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.serializer(e)}};import{Readable as le}from"node:stream";function R(n){let e=0,t=0,r=null,s=null,a=i(c=>{if(typeof c!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+c);e=c,t=4,r=new Uint8Array(c),new DataView(r.buffer).setUint32(0,c,!1)},"allocateMessage"),o=i(async function*(){let c=n[Symbol.asyncIterator]();for(;;){let{value:l,done:y}=await c.next();if(y){if(e)if(e===t)yield r;else throw new Error("Truncated event message received.");else return;return}let d=l.length,h=0;for(;h<d;){if(!r){let u=d-h;s||(s=new Uint8Array(4));let m=Math.min(4-t,u);if(s.set(l.slice(h,h+m),t),t+=m,h+=m,t<4)break;a(new DataView(s.buffer).getUint32(0,!1)),s=null}let f=Math.min(e-t,d-h);r.set(l.slice(h,h+f),t),t+=f,h+=f,e&&e===t&&(yield r,r=null,e=0,t=0)}}},"iterator");return{[Symbol.asyncIterator]:o}}i(R,"getChunkedStream");function ie(n,e){let t=L(e.deserializer,e.toUtf8);return{[Symbol.asyncIterator]:async function*(){for await(let r of n){let s=e.eventStreamCodec.decode(r),a=await t(s);a!==void 0&&(yield a)}}}}i(ie,"getUnmarshalledStream");function L(n,e){return async function(t){let{value:r}=t.headers[":message-type"];if(r==="error"){let s=new Error(t.headers[":error-message"].value||"UnknownError");throw s.name=t.headers[":error-code"].value,s}else if(r==="exception"){let s=t.headers[":exception-type"].value,a={[s]:t},o=await n(a);if(o.$unknown){let c=new Error(e(t.body));throw c.name=s,c}throw o[s]}else if(r==="event"){let s={[t.headers[":event-type"].value]:t},a=await n(s);return a.$unknown?void 0:a}else throw Error(`Unrecognizable event type: ${t.headers[":event-type"].value}`)}}i(L,"getMessageUnmarshaller");var C=class{static{i(this,"EventStreamMarshaller")}eventStreamCodec;utfEncoder;constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new z(e,t),this.utfEncoder=e}deserialize(e,t){let r=R(e);return new $({messageStream:new O({inputStream:r,decoder:this.eventStreamCodec}),deserializer:L(t,this.utfEncoder)})}serialize(e,t){return new N({messageStream:new G({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}},ce=i(n=>new C(n),"eventStreamSerdeProvider");var F=class{static{i(this,"EventStreamMarshaller")}universalMarshaller;constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new C({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){let r=typeof e[Symbol.asyncIterator]=="function"?e:ue(e);return this.universalMarshaller.deserialize(r,t)}serialize(e,t){return le.from(this.universalMarshaller.serialize(e,t))}},fe=i(n=>new F(n),"eventStreamSerdeProvider");async function*ue(n){let e=!1,t=!1,r=new Array;for(n.on("error",s=>{if(e||(e=!0),s)throw s}),n.on("data",s=>{r.push(s)}),n.on("end",()=>{e=!0});!t;){let s=await new Promise(a=>setTimeout(()=>a(r.shift()),0));s&&(yield s),t=e&&r.length===0}}i(ue,"readableToIterable");var me=i(n=>({[Symbol.asyncIterator]:async function*(){let e=n.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)return;yield r}}finally{e.releaseLock()}}}),"readableStreamToIterable"),ye=i(n=>{let e=n[Symbol.asyncIterator]();return new ReadableStream({async pull(t){let{done:r,value:s}=await e.next();if(r)return t.close();t.enqueue(s)}})},"iterableToReadableStream");var de=i(n=>Object.assign(n,{eventStreamMarshaller:n.eventStreamSerdeProvider(n)}),"resolveEventStreamSerdeConfig");var j=class{static{i(this,"EventStreamSerde")}marshaller;serializer;deserializer;serdeContext;defaultContentType;compositeErrorRegistry;constructor({marshaller:e,serializer:t,deserializer:r,serdeContext:s,defaultContentType:a,compositeErrorRegistry:o}){this.marshaller=e,this.serializer=t,this.deserializer=r,this.serdeContext=s,this.defaultContentType=a,this.compositeErrorRegistry=o}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r,initialMessageType:s}){let a=this.marshaller,o=t.getEventStreamMember(),c=t.getMemberSchema(o),l=this.serializer,y=this.defaultContentType,d=Symbol("initialRequestMarker"),h={async*[Symbol.asyncIterator](){if(r){let f={":event-type":{type:"string",value:s??"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:y}};l.write(t,r);let u=l.flush();yield{[d]:!0,headers:f,body:u}}for await(let f of e)yield f}};return a.serialize(h,f=>{if(f[d])return{headers:f.headers,body:f.body};let u="";for(let b in f)if(B(f,b)&&b!=="__type"){u=b;break}let{additionalHeaders:m,body:S,eventType:g,explicitPayloadContentType:p}=this.writeEventBody(u,c,f);return{headers:{":event-type":{type:"string",value:g},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:p??y},...m},body:S}})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r,initialMessageType:s}){let a=this.marshaller,o=t.getEventStreamMember(),l=t.getMemberSchema(o).getMemberSchemas(),y=Symbol("initialResponseMarker"),d=a.deserialize(e.body,async u=>{let m="";for(let g in u)if(B(u,g)&&g!=="__type"){m=g;break}let S=u[m].body;if(m===(s??"initial-response")){let g=await this.deserializer.read(t,S);return delete g[o],{[y]:!0,...g}}else if(m in l){let g=l[m];if(g.isStructSchema()){let p={},w=!1;for(let[b,k]of g.structIterator()){let{eventHeader:E,eventPayload:K}=k.getMergedTraits();if(w=w||!!(E||K),K)k.isBlobSchema()?p[b]=S:k.isStringSchema()?p[b]=(this.serdeContext?.utf8Encoder??W)(S):k.isStructSchema()&&(p[b]=await this.deserializer.read(k,S));else if(E){let U=u[m].headers[b]?.value;U!=null&&(k.isNumericSchema()?U&&typeof U=="object"&&"bytes"in U?p[b]=BigInt(U.toString()):p[b]=Number(U):p[b]=U)}}return{[m]:await this.readEventMember(g,S,w,p)}}return{[m]:await this.deserializer.read(g,S)}}else return{$unknown:u}}),h=d[Symbol.asyncIterator](),f=await h.next();if(f.done)return d;if(f.value?.[y]){if(!t)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(let u in f.value)B(f.value,u)&&(r[u]=f.value[u])}return{async*[Symbol.asyncIterator](){for(f?.value?.[y]||(yield f.value);;){let{done:u,value:m}=await h.next();if(u)break;yield m}}}}async readEventMember(e,t,r,s){let a,o=e.getSchema();if(Array.isArray(o)&&o[0]===-3){let l=o[1],y=q.for(l);this.compositeErrorRegistry?.copyFrom(y),a=(this.compositeErrorRegistry??y)?.getErrorCtor(o)}let c=r?s:t.byteLength===0?{}:await this.deserializer.read(e,t);if(a){let l=c.message??c.Message??"Unknown",y={},d=e.getMergedTraits().error;return d&&(y.$fault=d),Object.assign(new a({}),y,{message:l},c)}return c}writeEventBody(e,t,r){let s=this.serializer,a=e,o=null,c,l=t.getSchema()[4].includes(e),y={};if(l){let f=t.getMemberSchema(e);if(f.isStructSchema()){for(let[u,m]of f.structIterator()){let{eventHeader:S,eventPayload:g}=m.getMergedTraits();if(g)o=u;else if(S){let p=r[e][u],w="binary";m.isNumericSchema()?(-2)**31<=p&&p<=2**31-1?w="integer":w="long":m.isTimestampSchema()?w="timestamp":m.isStringSchema()?w="string":m.isBooleanSchema()&&(w="boolean"),p!=null&&(y[u]={type:w,value:p},delete r[e][u])}}if(o!==null){let u=f.getMemberSchema(o);u.isBlobSchema()?c="application/octet-stream":u.isStringSchema()&&(c="text/plain"),s.write(u,r[e][o])}else s.write(f,r[e])}else if(f.isUnitSchema())s.write(f,{});else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{let[f,u]=r[e];a=f,s.write(15,u)}let d=s.flush()??new Uint8Array;return{body:typeof d=="string"?(this.serdeContext?.utf8Decoder??P)(d):d,eventType:a,explicitPayloadContentType:c,additionalHeaders:y}}};export{z as EventStreamCodec,F as EventStreamMarshaller,j as EventStreamSerde,T as HeaderMarshaller,x as Int64,O as MessageDecoderStream,N as MessageEncoderStream,$ as SmithyMessageDecoderStream,G as SmithyMessageEncoderStream,C as UniversalEventStreamMarshaller,fe as eventStreamSerdeProvider,R as getChunkedStream,L as getMessageUnmarshaller,ie as getUnmarshalledStream,ye as iterableToReadableStream,me as readableStreamToIterable,de as resolveEventStreamSerdeConfig,ce as universalEventStreamSerdeProvider};
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageDecoderStream.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageEncoderStream.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageEncoderStream.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getChunkedStream.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/EventStreamMarshaller.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-config-resolver/EventStreamSerdeConfig.js", "../../../../node_modules/.bun/@smithy+core@3.35.2/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js"],
4
+ "sourcesContent": ["import { toHex } from \"@smithy/core/serde\";\nexport class Int64 {\n bytes;\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static fromNumber(number) {\n if (number > 9_223_372_036_854_775_807 || number < -9_223_372_036_854_775_808) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new Int64(bytes);\n }\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 0b10000000;\n if (negative) {\n negate(bytes);\n }\n return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n}\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 0xff;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n", "import { hasOwn } from \"@smithy/core/transport\";\nimport { fromHex, toHex } from \"@smithy/core/serde\";\nimport { Int64 } from \"./Int64\";\nexport class HeaderMarshaller {\n toUtf8;\n fromUtf8;\n constructor(toUtf8, fromUtf8) {\n this.toUtf8 = toUtf8;\n this.fromUtf8 = fromUtf8;\n }\n format(headers) {\n const chunks = [];\n for (const headerName in headers) {\n if (!hasOwn(headers, headerName))\n continue;\n const bytes = this.fromUtf8(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 : 1]);\n case \"byte\":\n return Uint8Array.from([2, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = this.fromUtf8(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9;\n uuidBytes.set(fromHex(header.value.replace(/-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n parse(headers) {\n const out = {};\n let position = 0;\n while (position < headers.byteLength) {\n const nameLength = headers.getUint8(position++);\n const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));\n position += nameLength;\n switch (headers.getUint8(position++)) {\n case 0:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true,\n };\n break;\n case 1:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false,\n };\n break;\n case 2:\n out[name] = {\n type: BYTE_TAG,\n value: headers.getInt8(position++),\n };\n break;\n case 3:\n out[name] = {\n type: SHORT_TAG,\n value: headers.getInt16(position, false),\n };\n position += 2;\n break;\n case 4:\n out[name] = {\n type: INT_TAG,\n value: headers.getInt32(position, false),\n };\n position += 4;\n break;\n case 5:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)),\n };\n position += 8;\n break;\n case 6:\n const binaryLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength),\n };\n position += binaryLength;\n break;\n case 7:\n const stringLength = headers.getUint16(position, false);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)),\n };\n position += stringLength;\n break;\n case 8:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()),\n };\n position += 8;\n break;\n case 9:\n const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}`,\n };\n break;\n default:\n throw new Error(`Unrecognized header type tag`);\n }\n }\n return out;\n }\n}\nvar HEADER_VALUE_TYPE;\n(function (HEADER_VALUE_TYPE) {\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolTrue\"] = 0] = \"boolTrue\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"boolFalse\"] = 1] = \"boolFalse\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byte\"] = 2] = \"byte\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"short\"] = 3] = \"short\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"integer\"] = 4] = \"integer\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"long\"] = 5] = \"long\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"byteArray\"] = 6] = \"byteArray\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"string\"] = 7] = \"string\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"timestamp\"] = 8] = \"timestamp\";\n HEADER_VALUE_TYPE[HEADER_VALUE_TYPE[\"uuid\"] = 9] = \"uuid\";\n})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));\nconst BOOLEAN_TAG = \"boolean\";\nconst BYTE_TAG = \"byte\";\nconst SHORT_TAG = \"short\";\nconst INT_TAG = \"integer\";\nconst LONG_TAG = \"long\";\nconst BINARY_TAG = \"binary\";\nconst STRING_TAG = \"string\";\nconst TIMESTAMP_TAG = \"timestamp\";\nconst UUID_TAG = \"uuid\";\nconst UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\n", "import { Crc32 } from \"@smithy/core/checksum\";\nconst PRELUDE_MEMBER_LENGTH = 4;\nconst PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\nconst CHECKSUM_LENGTH = 4;\nconst MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\nexport function splitMessage({ byteLength, byteOffset, buffer }) {\n if (byteLength < MINIMUM_MESSAGE_LENGTH) {\n throw new Error(\"Provided message too short to accommodate event stream message overhead\");\n }\n const view = new DataView(buffer, byteOffset, byteLength);\n const messageLength = view.getUint32(0, false);\n if (byteLength !== messageLength) {\n throw new Error(\"Reported message length does not match received message length\");\n }\n const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);\n const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);\n const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);\n const checksummer = new Crc32();\n checksummer.update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));\n if (expectedPreludeChecksum !== checksummer.digestSync()) {\n throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digestSync()})`);\n }\n checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));\n if (expectedMessageChecksum !== checksummer.digestSync()) {\n throw new Error(`The message checksum (${checksummer.digestSync()}) did not match the expected value of ${expectedMessageChecksum}`);\n }\n return {\n headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),\n body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)),\n };\n}\n", "import { Crc32 } from \"@smithy/core/checksum\";\nimport { HeaderMarshaller } from \"./HeaderMarshaller\";\nimport { splitMessage } from \"./splitMessage\";\nexport class EventStreamCodec {\n headerMarshaller;\n messageBuffer;\n isEndOfStream;\n constructor(toUtf8, fromUtf8) {\n this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);\n this.messageBuffer = [];\n this.isEndOfStream = false;\n }\n feed(message) {\n this.messageBuffer.push(this.decode(message));\n }\n endOfStream() {\n this.isEndOfStream = true;\n }\n getMessage() {\n const message = this.messageBuffer.pop();\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessage() {\n return message;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n getAvailableMessages() {\n const messages = this.messageBuffer;\n this.messageBuffer = [];\n const isEndOfStream = this.isEndOfStream;\n return {\n getMessages() {\n return messages;\n },\n isEndOfStream() {\n return isEndOfStream;\n },\n };\n }\n encode({ headers: rawHeaders, body }) {\n const headers = this.headerMarshaller.format(rawHeaders);\n const length = headers.byteLength + body.byteLength + 16;\n const out = new Uint8Array(length);\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n const checksum = new Crc32();\n view.setUint32(0, length, false);\n view.setUint32(4, headers.byteLength, false);\n checksum.update(out.subarray(0, 8));\n view.setUint32(8, checksum.digestSync(), false);\n out.set(headers, 12);\n out.set(body, headers.byteLength + 12);\n checksum.update(out.subarray(8, length - 4));\n view.setUint32(length - 4, checksum.digestSync(), false);\n return out;\n }\n decode(message) {\n const { headers, body } = splitMessage(message);\n return { headers: this.headerMarshaller.parse(headers), body };\n }\n formatHeaders(rawHeaders) {\n return this.headerMarshaller.format(rawHeaders);\n }\n}\n", "export class MessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const bytes of this.options.inputStream) {\n const decoded = this.options.decoder.decode(bytes);\n yield decoded;\n }\n }\n}\n", "export class MessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const msg of this.options.messageStream) {\n const encoded = this.options.encoder.encode(msg);\n yield encoded;\n }\n if (this.options.includeEndFrame) {\n yield new Uint8Array(0);\n }\n }\n}\n", "export class SmithyMessageDecoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const message of this.options.messageStream) {\n const deserialized = await this.options.deserializer(message);\n if (deserialized === undefined)\n continue;\n yield deserialized;\n }\n }\n}\n", "export class SmithyMessageEncoderStream {\n options;\n constructor(options) {\n this.options = options;\n }\n [Symbol.asyncIterator]() {\n return this.asyncIterator();\n }\n async *asyncIterator() {\n for await (const chunk of this.options.inputStream) {\n const payloadBuf = this.options.serializer(chunk);\n yield payloadBuf;\n }\n }\n}\n", "import { Readable } from \"node:stream\";\nimport { EventStreamMarshaller as UniversalEventStreamMarshaller } from \"../eventstream-serde-universal/EventStreamMarshaller\";\nexport class EventStreamMarshaller {\n universalMarshaller;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.universalMarshaller = new UniversalEventStreamMarshaller({\n utf8Decoder,\n utf8Encoder,\n });\n }\n deserialize(body, deserializer) {\n const bodyIterable = typeof body[Symbol.asyncIterator] === \"function\" ? body : readableToIterable(body);\n return this.universalMarshaller.deserialize(bodyIterable, deserializer);\n }\n serialize(input, serializer) {\n return Readable.from(this.universalMarshaller.serialize(input, serializer));\n }\n}\nexport const eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\nexport async function* readableToIterable(readStream) {\n let streamEnded = false;\n let generationEnded = false;\n const records = new Array();\n readStream.on(\"error\", (err) => {\n if (!streamEnded) {\n streamEnded = true;\n }\n if (err) {\n throw err;\n }\n });\n readStream.on(\"data\", (data) => {\n records.push(data);\n });\n readStream.on(\"end\", () => {\n streamEnded = true;\n });\n while (!generationEnded) {\n const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0));\n if (value) {\n yield value;\n }\n generationEnded = streamEnded && records.length === 0;\n }\n}\n", "export function getChunkedStream(source) {\n let currentMessageTotalLength = 0;\n let currentMessagePendingLength = 0;\n let currentMessage = null;\n let messageLengthBuffer = null;\n const allocateMessage = (size) => {\n if (typeof size !== \"number\") {\n throw new Error(\"Attempted to allocate an event message where size was not a number: \" + size);\n }\n currentMessageTotalLength = size;\n currentMessagePendingLength = 4;\n currentMessage = new Uint8Array(size);\n const currentMessageView = new DataView(currentMessage.buffer);\n currentMessageView.setUint32(0, size, false);\n };\n const iterator = async function* () {\n const sourceIterator = source[Symbol.asyncIterator]();\n while (true) {\n const { value, done } = await sourceIterator.next();\n if (done) {\n if (!currentMessageTotalLength) {\n return;\n }\n else if (currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n }\n else {\n throw new Error(\"Truncated event message received.\");\n }\n return;\n }\n const chunkLength = value.length;\n let currentOffset = 0;\n while (currentOffset < chunkLength) {\n if (!currentMessage) {\n const bytesRemaining = chunkLength - currentOffset;\n if (!messageLengthBuffer) {\n messageLengthBuffer = new Uint8Array(4);\n }\n const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);\n messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);\n currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n if (currentMessagePendingLength < 4) {\n break;\n }\n allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));\n messageLengthBuffer = null;\n }\n const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);\n currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);\n currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {\n yield currentMessage;\n currentMessage = null;\n currentMessageTotalLength = 0;\n currentMessagePendingLength = 0;\n }\n }\n }\n };\n return {\n [Symbol.asyncIterator]: iterator,\n };\n}\n", "export function getUnmarshalledStream(source, options) {\n const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8);\n return {\n [Symbol.asyncIterator]: async function* () {\n for await (const chunk of source) {\n const message = options.eventStreamCodec.decode(chunk);\n const type = await messageUnmarshaller(message);\n if (type === undefined)\n continue;\n yield type;\n }\n },\n };\n}\nexport function getMessageUnmarshaller(deserializer, toUtf8) {\n return async function (message) {\n const { value: messageType } = message.headers[\":message-type\"];\n if (messageType === \"error\") {\n const unmodeledError = new Error(message.headers[\":error-message\"].value || \"UnknownError\");\n unmodeledError.name = message.headers[\":error-code\"].value;\n throw unmodeledError;\n }\n else if (messageType === \"exception\") {\n const code = message.headers[\":exception-type\"].value;\n const exception = { [code]: message };\n const deserializedException = await deserializer(exception);\n if (deserializedException.$unknown) {\n const error = new Error(toUtf8(message.body));\n error.name = code;\n throw error;\n }\n throw deserializedException[code];\n }\n else if (messageType === \"event\") {\n const event = {\n [message.headers[\":event-type\"].value]: message,\n };\n const deserialized = await deserializer(event);\n if (deserialized.$unknown)\n return;\n return deserialized;\n }\n else {\n throw Error(`Unrecognizable event type: ${message.headers[\":event-type\"].value}`);\n }\n };\n}\n", "import { EventStreamCodec } from \"../eventstream-codec/EventStreamCodec\";\nimport { MessageDecoderStream } from \"../eventstream-codec/MessageDecoderStream\";\nimport { MessageEncoderStream } from \"../eventstream-codec/MessageEncoderStream\";\nimport { SmithyMessageDecoderStream } from \"../eventstream-codec/SmithyMessageDecoderStream\";\nimport { SmithyMessageEncoderStream } from \"../eventstream-codec/SmithyMessageEncoderStream\";\nimport { getChunkedStream } from \"./getChunkedStream\";\nimport { getMessageUnmarshaller } from \"./getUnmarshalledStream\";\nexport class EventStreamMarshaller {\n eventStreamCodec;\n utfEncoder;\n constructor({ utf8Encoder, utf8Decoder }) {\n this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);\n this.utfEncoder = utf8Encoder;\n }\n deserialize(body, deserializer) {\n const inputStream = getChunkedStream(body);\n return new SmithyMessageDecoderStream({\n messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),\n deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder),\n });\n }\n serialize(inputStream, serializer) {\n return new MessageEncoderStream({\n messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),\n encoder: this.eventStreamCodec,\n includeEndFrame: true,\n });\n }\n}\nexport const eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);\n", "export const readableStreamToIterable = (readableStream) => ({\n [Symbol.asyncIterator]: async function* () {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n return;\n yield value;\n }\n }\n finally {\n reader.releaseLock();\n }\n },\n});\nexport const iterableToReadableStream = (asyncIterable) => {\n const iterator = asyncIterable[Symbol.asyncIterator]();\n return new ReadableStream({\n async pull(controller) {\n const { done, value } = await iterator.next();\n if (done) {\n return controller.close();\n }\n controller.enqueue(value);\n },\n });\n};\n", "export const resolveEventStreamSerdeConfig = (input) => Object.assign(input, {\n eventStreamMarshaller: input.eventStreamSerdeProvider(input),\n});\n", "import { hasOwn } from \"@smithy/core/transport\";\nimport { TypeRegistry } from \"@smithy/core/schema\";\nimport { fromUtf8, toUtf8 } from \"@smithy/core/serde\";\nexport class EventStreamSerde {\n marshaller;\n serializer;\n deserializer;\n serdeContext;\n defaultContentType;\n compositeErrorRegistry;\n constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType, compositeErrorRegistry, }) {\n this.marshaller = marshaller;\n this.serializer = serializer;\n this.deserializer = deserializer;\n this.serdeContext = serdeContext;\n this.defaultContentType = defaultContentType;\n this.compositeErrorRegistry = compositeErrorRegistry;\n }\n async serializeEventStream({ eventStream, requestSchema, initialRequest, initialMessageType, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = requestSchema.getEventStreamMember();\n const unionSchema = requestSchema.getMemberSchema(eventStreamMember);\n const serializer = this.serializer;\n const defaultContentType = this.defaultContentType;\n const initialRequestMarker = Symbol(\"initialRequestMarker\");\n const eventStreamIterable = {\n async *[Symbol.asyncIterator]() {\n if (initialRequest) {\n const headers = {\n \":event-type\": { type: \"string\", value: initialMessageType ?? \"initial-request\" },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: defaultContentType },\n };\n serializer.write(requestSchema, initialRequest);\n const body = serializer.flush();\n yield {\n [initialRequestMarker]: true,\n headers,\n body,\n };\n }\n for await (const page of eventStream) {\n yield page;\n }\n },\n };\n return marshaller.serialize(eventStreamIterable, (event) => {\n if (event[initialRequestMarker]) {\n return {\n headers: event.headers,\n body: event.body,\n };\n }\n let unionMember = \"\";\n for (const key in event) {\n if (!hasOwn(event, key))\n continue;\n if (key !== \"__type\") {\n unionMember = key;\n break;\n }\n }\n const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);\n const headers = {\n \":event-type\": { type: \"string\", value: eventType },\n \":message-type\": { type: \"string\", value: \"event\" },\n \":content-type\": { type: \"string\", value: explicitPayloadContentType ?? defaultContentType },\n ...additionalHeaders,\n };\n return {\n headers,\n body,\n };\n });\n }\n async deserializeEventStream({ response, responseSchema, initialResponseContainer, initialMessageType, }) {\n const marshaller = this.marshaller;\n const eventStreamMember = responseSchema.getEventStreamMember();\n const unionSchema = responseSchema.getMemberSchema(eventStreamMember);\n const memberSchemas = unionSchema.getMemberSchemas();\n const initialResponseMarker = Symbol(\"initialResponseMarker\");\n const asyncIterable = marshaller.deserialize(response.body, async (event) => {\n let unionMember = \"\";\n for (const key in event) {\n if (!hasOwn(event, key))\n continue;\n if (key !== \"__type\") {\n unionMember = key;\n break;\n }\n }\n const body = event[unionMember].body;\n if (unionMember === (initialMessageType ?? \"initial-response\")) {\n const dataObject = await this.deserializer.read(responseSchema, body);\n delete dataObject[eventStreamMember];\n return {\n [initialResponseMarker]: true,\n ...dataObject,\n };\n }\n else if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n if (eventStreamSchema.isStructSchema()) {\n const out = {};\n let hasBindings = false;\n for (const [name, member] of eventStreamSchema.structIterator()) {\n const { eventHeader, eventPayload } = member.getMergedTraits();\n hasBindings = hasBindings || Boolean(eventHeader || eventPayload);\n if (eventPayload) {\n if (member.isBlobSchema()) {\n out[name] = body;\n }\n else if (member.isStringSchema()) {\n out[name] = (this.serdeContext?.utf8Encoder ?? toUtf8)(body);\n }\n else if (member.isStructSchema()) {\n out[name] = await this.deserializer.read(member, body);\n }\n }\n else if (eventHeader) {\n const value = event[unionMember].headers[name]?.value;\n if (value != null) {\n if (member.isNumericSchema()) {\n if (value && typeof value === \"object\" && \"bytes\" in value) {\n out[name] = BigInt(value.toString());\n }\n else {\n out[name] = Number(value);\n }\n }\n else {\n out[name] = value;\n }\n }\n }\n }\n return {\n [unionMember]: await this.readEventMember(eventStreamSchema, body, hasBindings, out),\n };\n }\n return {\n [unionMember]: await this.deserializer.read(eventStreamSchema, body),\n };\n }\n else {\n return {\n $unknown: event,\n };\n }\n });\n const asyncIterator = asyncIterable[Symbol.asyncIterator]();\n const firstEvent = await asyncIterator.next();\n if (firstEvent.done) {\n return asyncIterable;\n }\n if (firstEvent.value?.[initialResponseMarker]) {\n if (!responseSchema) {\n throw new Error(\"@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.\");\n }\n for (const key in firstEvent.value) {\n if (!hasOwn(firstEvent.value, key))\n continue;\n initialResponseContainer[key] = firstEvent.value[key];\n }\n }\n return {\n async *[Symbol.asyncIterator]() {\n if (!firstEvent?.value?.[initialResponseMarker]) {\n yield firstEvent.value;\n }\n while (true) {\n const { done, value } = await asyncIterator.next();\n if (done) {\n break;\n }\n yield value;\n }\n },\n };\n }\n async readEventMember(eventStreamSchema, body, hasBindings, out) {\n let ErrCtor;\n const staticStructuralSchema = eventStreamSchema.getSchema();\n if (Array.isArray(staticStructuralSchema) && staticStructuralSchema[0] === -3) {\n const namespace = staticStructuralSchema[1];\n const nsRegistry = TypeRegistry.for(namespace);\n this.compositeErrorRegistry?.copyFrom(nsRegistry);\n ErrCtor = (this.compositeErrorRegistry ?? nsRegistry)?.getErrorCtor(staticStructuralSchema);\n }\n const dataObject = hasBindings\n ? out\n : body.byteLength === 0\n ? {}\n : await this.deserializer.read(eventStreamSchema, body);\n if (ErrCtor) {\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const metadata = {};\n const $fault = eventStreamSchema.getMergedTraits().error;\n if ($fault) {\n metadata.$fault = $fault;\n }\n return Object.assign(new ErrCtor({}), metadata, {\n message,\n }, dataObject);\n }\n return dataObject;\n }\n writeEventBody(unionMember, unionSchema, event) {\n const serializer = this.serializer;\n let eventType = unionMember;\n let explicitPayloadMember = null;\n let explicitPayloadContentType;\n const isKnownSchema = (() => {\n const struct = unionSchema.getSchema();\n return struct[4].includes(unionMember);\n })();\n const additionalHeaders = {};\n if (!isKnownSchema) {\n const [type, value] = event[unionMember];\n eventType = type;\n serializer.write(15, value);\n }\n else {\n const eventSchema = unionSchema.getMemberSchema(unionMember);\n if (eventSchema.isStructSchema()) {\n for (const [memberName, memberSchema] of eventSchema.structIterator()) {\n const { eventHeader, eventPayload } = memberSchema.getMergedTraits();\n if (eventPayload) {\n explicitPayloadMember = memberName;\n }\n else if (eventHeader) {\n const value = event[unionMember][memberName];\n let type = \"binary\";\n if (memberSchema.isNumericSchema()) {\n if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {\n type = \"integer\";\n }\n else {\n type = \"long\";\n }\n }\n else if (memberSchema.isTimestampSchema()) {\n type = \"timestamp\";\n }\n else if (memberSchema.isStringSchema()) {\n type = \"string\";\n }\n else if (memberSchema.isBooleanSchema()) {\n type = \"boolean\";\n }\n if (value != null) {\n additionalHeaders[memberName] = {\n type,\n value,\n };\n delete event[unionMember][memberName];\n }\n }\n }\n if (explicitPayloadMember !== null) {\n const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);\n if (payloadSchema.isBlobSchema()) {\n explicitPayloadContentType = \"application/octet-stream\";\n }\n else if (payloadSchema.isStringSchema()) {\n explicitPayloadContentType = \"text/plain\";\n }\n serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);\n }\n else {\n serializer.write(eventSchema, event[unionMember]);\n }\n }\n else if (eventSchema.isUnitSchema()) {\n serializer.write(eventSchema, {});\n }\n else {\n throw new Error(\"@smithy/core/event-streams - non-struct member not supported in event stream union.\");\n }\n }\n const messageSerialization = serializer.flush() ?? new Uint8Array();\n const body = typeof messageSerialization === \"string\"\n ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization)\n : messageSerialization;\n return {\n body,\n eventType,\n explicitPayloadContentType,\n additionalHeaders,\n };\n }\n}\n"],
5
+ "mappings": ";gMACO,IAAMA,EAAN,MAAMC,CAAM,CADnB,MACmB,CAAAC,EAAA,cACf,MACA,YAAYC,EAAO,CAEf,GADA,KAAK,MAAQA,EACTA,EAAM,aAAe,EACrB,MAAM,IAAI,MAAM,uCAAuC,CAE/D,CACA,OAAO,WAAWC,EAAQ,CACtB,GAAIA,EAAS,oBAA6BA,EAAS,oBAC/C,MAAM,IAAI,MAAM,GAAGA,CAAM,qEAAqE,EAElG,IAAMD,EAAQ,IAAI,WAAW,CAAC,EAC9B,QAASE,EAAI,EAAGC,EAAY,KAAK,IAAI,KAAK,MAAMF,CAAM,CAAC,EAAGC,EAAI,IAAMC,EAAY,EAAGD,IAAKC,GAAa,IACjGH,EAAME,CAAC,EAAIC,EAEf,OAAIF,EAAS,GACTG,EAAOJ,CAAK,EAET,IAAIF,EAAME,CAAK,CAC1B,CACA,SAAU,CACN,IAAMA,EAAQ,KAAK,MAAM,MAAM,CAAC,EAC1BK,EAAWL,EAAM,CAAC,EAAI,IAC5B,OAAIK,GACAD,EAAOJ,CAAK,EAET,SAASM,EAAMN,CAAK,EAAG,EAAE,GAAKK,EAAW,GAAK,EACzD,CACA,UAAW,CACP,OAAO,OAAO,KAAK,QAAQ,CAAC,CAChC,CACJ,EACA,SAASD,EAAOJ,EAAO,CACnB,QAASE,EAAI,EAAGA,EAAI,EAAGA,IACnBF,EAAME,CAAC,GAAK,IAEhB,QAASA,EAAI,EAAGA,EAAI,KAChBF,EAAME,CAAC,IACHF,EAAME,CA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ACjEA,EAGF,UAAApC,EACA,2BAAAC,EACA,kBAAAF,CACJ,CACJ,CACJ",
6
+ "names": ["Int64", "_Int64", "__name", "bytes", "number", "i", "remaining", "negate", "negative", "toHex", "HeaderMarshaller", "__name", "toUtf8", "fromUtf8", "headers", "chunks", "headerName", "hasOwn", "bytes", "out", "carry", "position", "chunk", "header", "shortView", "intView", "longBytes", "binView", "binBytes", "utf8Bytes", "strView", "strBytes", "tsBytes", "Int64", "UUID_PATTERN", "uuidBytes", "fromHex", "nameLength", "name", "BOOLEAN_TAG", "BYTE_TAG", "SHORT_TAG", "INT_TAG", "LONG_TAG", "binaryLength", "BINARY_TAG", "stringLength", "STRING_TAG", "TIMESTAMP_TAG", "UUID_TAG", "toHex", "HEADER_VALUE_TYPE", "PRELUDE_MEMBER_LENGTH", "PRELUDE_LENGTH", "CHECKSUM_LENGTH", "MINIMUM_MESSAGE_LENGTH", "splitMessage", "byteLength", "byteOffset", "buffer", "view", "messageLength", "headerLength", "expectedPreludeChecksum", "expectedMessageChecksum", "checksummer", "Crc32Node", "__name", "EventStreamCodec", "__name", "toUtf8", "fromUtf8", "HeaderMarshaller", "message", "isEndOfStream", "messages", "rawHeaders", "body", "headers", "length", "out", "view", "checksum", "Crc32Node", "splitMessage", "MessageDecoderStream", "__name", "options", "bytes", "MessageEncoderStream", "__name", "options", "msg", "SmithyMessageDecoderStream", "__name", "options", "message", "deserialized", "SmithyMessageEncoderStream", "__name", "options", "chunk", "Readable", "getChunkedStream", "source", "currentMessageTotalLength", "currentMessagePendingLength", "currentMessage", "messageLengthBuffer", "allocateMessage", "__name", "size", "iterator", "sourceIterator", "value", "done", "chunkLength", "currentOffset", "bytesRemaining", "numBytesForTotal", "numBytesToWrite", "getUnmarshalledStream", "source", "options", "messageUnmarshaller", "getMessageUnmarshaller", "chunk", "message", "type", "__name", "deserializer", "toUtf8", "messageType", "unmodeledError", "code", "exception", "deserializedException", "error", "event", "deserialized", "EventStreamMarshaller", "__name", "utf8Encoder", "utf8Decoder", "EventStreamCodec", "body", "deserializer", "inputStream", "getChunkedStream", "SmithyMessageDecoderStream", "MessageDecoderStream", "getMessageUnmarshaller", "serializer", "MessageEncoderStream", "SmithyMessageEncoderStream", "eventStreamSerdeProvider", "options", "EventStreamMarshaller", "__name", "utf8Encoder", "utf8Decoder", "body", "deserializer", "bodyIterable", "readableToIterable", "input", "serializer", "Readable", "eventStreamSerdeProvider", "options", "readStream", "streamEnded", "generationEnded", "records", "err", "data", "value", "resolve", "readableStreamToIterable", "__name", "readableStream", "reader", "done", "value", "iterableToReadableStream", "asyncIterable", "iterator", "controller", "resolveEventStreamSerdeConfig", "__name", "input", "EventStreamSerde", "__name", "marshaller", "serializer", "deserializer", "serdeContext", "defaultContentType", "compositeErrorRegistry", "eventStream", "requestSchema", "initialRequest", "initialMessageType", "eventStreamMember", "unionSchema", "initialRequestMarker", "eventStreamIterable", "headers", "body", "page", "event", "unionMember", "key", "hasOwn", "additionalHeaders", "eventType", "explicitPayloadContentType", "response", "responseSchema", "initialResponseContainer", "memberSchemas", "initialResponseMarker", "asyncIterable", "dataObject", "eventStreamSchema", "out", "hasBindings", "name", "member", "eventHeader", "eventPayload", "toUtf8", "value", "asyncIterator", "firstEvent", "done", "ErrCtor", "staticStructuralSchema", "namespace", "nsRegistry", "TypeRegistry", "message", "metadata", "$fault", "explicitPayloadMember", "isKnownSchema", "eventSchema", "memberName", "memberSchema", "type", "payloadSchema", "messageSerialization", "fromUtf8"]
7
+ }
@@ -0,0 +1,2 @@
1
+ /* CommonJS polyfills */import { fileURLToPath } from 'node:url';import { createRequire } from 'node:module';const __filename = fileURLToPath(import.meta.url);const __dirname = fileURLToPath(new URL('.', import.meta.url));const require = createRequire(import.meta.url);/* end of CommonJS polyfills */
2
+ import{a as Bt}from"./chunk-BH7ZEBAB.mjs";import{a as jt,c as qt,h as Kt,m as Wt}from"./chunk-REMPUQ6B.mjs";import{b as yt}from"./chunk-LB33VBGK.mjs";import{a as Vt}from"./chunk-YY2HYMK3.mjs";import{B as _t,C as Ct,D as At,E as Rt,F as wt,L as Ot,O as Nt,R as Ft,S as Dt,T as bt,W as kt,X as $t,aa as Gt,b as q,e as B,h as Y,ha as Ht,j as J,ja as Tt,k as X,l as Q,m as Z,na as zt,o as tt,p as et,r as lt,s as gt,sa as Mt,u as ft,w as ht,xa as Ut,y as Et,ya as Lt,z as xt}from"./chunk-PD2XGJQD.mjs";import{i as vt,j as St,k as Pt}from"./chunk-YMGL4RSC.mjs";import{n as l,o as at,p as ct,s as pt,t as dt,u as mt,v as ut}from"./chunk-KRS5YV2Z.mjs";import{B as It,b as W,e as H,g as ot,h as nt,i as rt,j as it,z as st}from"./chunk-3UGRDNDZ.mjs";import{e as K,k as G,l as V}from"./chunk-OC3UN3OS.mjs";import{a as o}from"./chunk-CFZ5JWD3.mjs";var Jt=o(async(t,e,r)=>({operation:K(e).operation,region:await G(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultCognitoIdentityHttpAuthSchemeParametersProvider");function Ae(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:o((e,r)=>({signingProperties:{config:e,context:r}}),"propertiesExtractor")}}o(Ae,"createAwsAuthSigv4HttpAuthOption");function Yt(t){return{schemeId:"smithy.api#noAuth"}}o(Yt,"createSmithyApiNoAuthHttpAuthOption");var Xt=o(t=>{let e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(Yt(t));break}case"GetId":{e.push(Yt(t));break}default:e.push(Ae(t))}return e},"defaultCognitoIdentityHttpAuthSchemeProvider"),Qt=o(t=>{let e=Kt(t);return Object.assign(e,{authSchemePreference:G(t.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig");var Zt=o(t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),"resolveClientEndpointParameters"),te={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var I="ref",h=-1,v=!0,ee="isSet",ie="PartitionResult",S="booleanEquals",T="getAttr",E="stringEquals",oe={[I]:"Endpoint"},z={[I]:ie},x={[I]:"Region"},p={},ne=[x],re={conditions:[[ee,[oe]],[ee,ne],["aws.partition",ne,ie],[S,[{[I]:"UseFIPS"},v]],[S,[{fn:T,argv:[z,"supportsFIPS"]},v]],[S,[{[I]:"UseDualStack"},v]],[S,[{fn:T,argv:[z,"supportsDualStack"]},v]],[E,[{fn:T,argv:[z,"name"]},"aws"]],[E,[x,"us-east-1"]],[E,[x,"us-east-2"]],[E,[x,"us-west-1"]],[E,[x,"us-west-2"]]],results:[[h],[h,"Invalid Configuration: FIPS and custom endpoint are not supported"],[h,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[oe,p],["https://cognito-identity-fips.us-east-1.amazonaws.com",p],["https://cognito-identity-fips.us-east-2.amazonaws.com",p],["https://cognito-identity-fips.us-west-1.amazonaws.com",p],["https://cognito-identity-fips.us-west-2.amazonaws.com",p],["https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",p],[h,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",p],[h,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-identity.{Region}.amazonaws.com",p],["https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",p],[h,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",p],[h,"Invalid Configuration: Missing Region"]]},Re=2,i=1e8,we=new Int32Array([-1,1,-1,0,17,3,1,4,i+16,2,5,i+16,3,9,6,5,7,i+15,6,8,i+14,7,i+12,i+13,4,11,10,5,i+9,i+11,5,12,i+10,6,13,i+9,8,i+4,14,9,i+5,15,10,i+6,16,11,i+7,i+8,3,i+1,18,5,i+2,i+3]),se=lt.from(we,Re,re.conditions,re.results);var Oe=new gt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ae=o((t,e={})=>Oe.get(t,()=>ht(se,{endpointParams:t,logger:e.logger})),"defaultEndpointResolver");ft.aws=Mt;var a=class t extends Y{static{o(this,"CognitoIdentityServiceException")}static shapeId="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity#CognitoIdentityServiceException";constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}};var P=class t extends a{static{o(this,"ExternalServiceException")}static shapeId="com.amazonaws.cognitoidentity#ExternalServiceException";name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},_=class t extends a{static{o(this,"InternalErrorException")}static shapeId="com.amazonaws.cognitoidentity#InternalErrorException";name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,t.prototype)}},C=class t extends a{static{o(this,"InvalidIdentityPoolConfigurationException")}static shapeId="com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException";name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},A=class t extends a{static{o(this,"InvalidParameterException")}static shapeId="com.amazonaws.cognitoidentity#InvalidParameterException";name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},R=class t extends a{static{o(this,"NotAuthorizedException")}static shapeId="com.amazonaws.cognitoidentity#NotAuthorizedException";name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},w=class t extends a{static{o(this,"ResourceConflictException")}static shapeId="com.amazonaws.cognitoidentity#ResourceConflictException";name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},O=class t extends a{static{o(this,"ResourceNotFoundException")}static shapeId="com.amazonaws.cognitoidentity#ResourceNotFoundException";name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},N=class t extends a{static{o(this,"TooManyRequestsException")}static shapeId="com.amazonaws.cognitoidentity#TooManyRequestsException";name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}},F=class t extends a{static{o(this,"LimitExceededException")}static shapeId="com.amazonaws.cognitoidentity#LimitExceededException";name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,t.prototype)}};var Ne="AccountId",Fe="AccessKeyId",ce="Credentials",De="CustomRoleArn",be="Expiration",ke="ExternalServiceException",$e="GetCredentialsForIdentity",Ge="GetCredentialsForIdentityInput",He="GetCredentialsForIdentityResponse",Te="GetId",ze="GetIdInput",Me="GetIdResponse",Ue="InternalErrorException",M="IdentityId",Le="InvalidIdentityPoolConfigurationException",je="InvalidParameterException",qe="IdentityPoolId",Ke="IdentityProviderToken",pe="Logins",Ve="LimitExceededException",Be="LoginsMap",We="NotAuthorizedException",Ye="ResourceConflictException",Je="ResourceNotFoundException",Xe="SecretKey",Qe="SecretKeyString",Ze="SessionToken",to="TooManyRequestsException",g="client",m="error",f="httpError",u="message",de="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",eo="server",n="com.amazonaws.cognitoidentity",me=new H(de),oo=[-3,de,"CognitoIdentityServiceException",0,[],[]];me.registerError(oo,a);var d=new H(n),no=[-3,n,ke,{[m]:g,[f]:400},[u],[0]];d.registerError(no,P);var ro=[-3,n,Ue,{[m]:eo},[u],[0]];d.registerError(ro,_);var io=[-3,n,Le,{[m]:g,[f]:400},[u],[0]];d.registerError(io,C);var so=[-3,n,je,{[m]:g,[f]:400},[u],[0]];d.registerError(so,A);var ao=[-3,n,Ve,{[m]:g,[f]:400},[u],[0]];d.registerError(ao,F);var co=[-3,n,We,{[m]:g,[f]:403},[u],[0]];d.registerError(co,R);var po=[-3,n,Ye,{[m]:g,[f]:409},[u],[0]];d.registerError(po,w);var mo=[-3,n,Je,{[m]:g,[f]:404},[u],[0]];d.registerError(mo,O);var uo=[-3,n,to,{[m]:g,[f]:429},[u],[0]];d.registerError(uo,N);var ue=[me,d],lo=[0,n,Ke,8,0],go=[0,n,Qe,8,0],fo=[3,n,ce,0,[Fe,Xe,Ze,be],[0,[()=>go,0],0,4]],ho=[3,n,Ge,0,[M,pe,De],[0,[()=>le,0],0],1],Eo=[3,n,He,0,[M,ce],[0,[()=>fo,0]]],xo=[3,n,ze,0,[qe,Ne,pe],[0,0,[()=>le,0]],1],Io=[3,n,Me,0,[M],[0]],le=[2,n,Be,0,[0,0],[()=>lo,0]],ge=[9,n,$e,0,()=>ho,()=>Eo],fe=[9,n,Te,0,()=>xo,()=>Io];var he=o(t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??ot,base64Encoder:t?.base64Encoder??rt,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??ae,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Xt,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:o(e=>e.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new jt},{schemeId:"smithy.api#noAuth",identityProvider:o(e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new $t}],logger:t?.logger??new tt,protocol:t?.protocol??Wt,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",errorTypeRegistries:ue,xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:t?.serviceId??"Cognito Identity",sha256:t?.sha256??yt,urlParser:t?.urlParser??V,utf8Decoder:t?.utf8Decoder??nt,utf8Encoder:t?.utf8Encoder??it}),"getRuntimeConfig");var Ee=o(t=>{X(process.version);let e=ut(t),r=o(()=>e().then(J),"defaultConfigProvider"),c=he(t);q(process.version);let s={profile:t?.profile,logger:c.logger};return{...c,...t,runtime:"node",defaultsMode:e,authSchemePreference:t?.authSchemePreference??l(qt,s),bodyLengthChecker:t?.bodyLengthChecker??st,defaultUserAgentProvider:t?.defaultUserAgentProvider??Tt({serviceId:c.serviceId,clientVersion:Bt.version}),maxAttempts:t?.maxAttempts??l(Ct,t),region:t?.region??l(pt,{...dt,...s}),requestHandler:Vt.create(t?.requestHandler??r),retryMode:t?.retryMode??l({...Rt,default:o(async()=>(await r()).retryMode||_t,"default")},t),streamCollector:t?.streamCollector??It,useDualstackEndpoint:t?.useDualstackEndpoint??l(at,s),useFipsEndpoint:t?.useFipsEndpoint??l(ct,s),userAgentAppId:t?.userAgentAppId??l(zt,s)}},"getRuntimeConfig");var xe=o(t=>{let e=t.httpAuthSchemes,r=t.httpAuthSchemeProvider,c=t.credentials;return{setHttpAuthScheme(s){let y=e.findIndex($=>$.schemeId===s.schemeId);y===-1?e.push(s):e.splice(y,1,s)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){c=s},credentials(){return c}}},"getHttpAuthExtensionConfiguration"),Ie=o(t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),"resolveHttpAuthRuntimeConfig");var ye=o((t,e)=>{let r=Object.assign(Ut(t),Q(t),vt(t),xe(t));return e.forEach(c=>c.configure(r)),Object.assign(t,Lt(r),Z(r),St(r),Ie(r))},"resolveRuntimeExtensions");var U=class extends B{static{o(this,"CognitoIdentityClient")}config;constructor(...[e]){let r=Ee(e||{});super(r),this.initConfig=r;let c=Zt(r),s=Gt(c),y=At(s),$=mt(y),ve=$,Se=Et(ve),Pe=Qt(Se),_e=ye(Pe,e?.extensions||[]);this.config=_e,this.middlewareStack.use(W(this.config)),this.middlewareStack.use(Ht(this.config)),this.middlewareStack.use(wt(this.config)),this.middlewareStack.use(Pt(this.config)),this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Nt(this.config)),this.middlewareStack.use(Ft(this.config)),this.middlewareStack.use(Dt(this.config,{httpAuthSchemeParametersProvider:Jt,identityProviderConfigProvider:o(async Ce=>new kt({"aws.auth#sigv4":Ce.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(bt(this.config))}destroy(){super.destroy()}};var D=et(te,"AWSCognitoIdentityService","CognitoIdentityClient",xt),b={},k=o((t,e,r,c)=>[],"_mw0");var L=class extends D(b,k,"GetCredentialsForIdentity",ge){static{o(this,"GetCredentialsForIdentityCommand")}};var j=class extends D(b,k,"GetId",fe){static{o(this,"GetIdCommand")}};export{U as CognitoIdentityClient,L as GetCredentialsForIdentityCommand,j as GetIdCommand};
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/auth/httpAuthSchemeProvider.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/EndpointParameters.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/bdd.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/endpointResolver.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/errors.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/schemas/schemas_0.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.shared.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/auth/httpAuthExtensionConfiguration.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeExtensions.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/CognitoIdentityClient.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/commandBuilder.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.js", "../../../../node_modules/.bun/@aws-sdk+nested-clients@3.997.48/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/commands/GetIdCommand.js"],
4
+ "sourcesContent": ["import { resolveAwsSdkSigV4Config, } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { getSmithyContext, normalizeProvider } from \"@smithy/core/client\";\nexport const defaultCognitoIdentityHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: getSmithyContext(context).operation,\n region: await normalizeProvider(config.region)() || (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"cognito-identity\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nexport const defaultCognitoIdentityHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetCredentialsForIdentity\":\n {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n ;\n case \"GetId\":\n {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n ;\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexport const resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = resolveAwsSdkSigV4Config(config);\n return Object.assign(config_0, {\n authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),\n });\n};\n", "export const resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"cognito-identity\",\n });\n};\nexport const commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n", "import { BinaryDecisionDiagram } from \"@smithy/core/endpoints\";\nconst m = \"ref\";\nconst a = -1, b = true, c = \"isSet\", d = \"PartitionResult\", e = \"booleanEquals\", f = \"getAttr\", g = \"stringEquals\", h = { [m]: \"Endpoint\" }, i = { [m]: d }, j = { [m]: \"Region\" }, k = {}, l = [j];\nconst _data = {\n conditions: [\n [c, [h]],\n [c, l],\n [\"aws.partition\", l, d],\n [e, [{ [m]: \"UseFIPS\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsFIPS\"] }, b]],\n [e, [{ [m]: \"UseDualStack\" }, b]],\n [e, [{ fn: f, argv: [i, \"supportsDualStack\"] }, b]],\n [g, [{ fn: f, argv: [i, \"name\"] }, \"aws\"]],\n [g, [j, \"us-east-1\"]],\n [g, [j, \"us-east-2\"]],\n [g, [j, \"us-west-1\"]],\n [g, [j, \"us-west-2\"]]\n ],\n results: [\n [a],\n [a, \"Invalid Configuration: FIPS and custom endpoint are not supported\"],\n [a, \"Invalid Configuration: Dualstack and custom endpoint are not supported\"],\n [h, k],\n [\"https://cognito-identity-fips.us-east-1.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-east-2.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-west-1.amazonaws.com\", k],\n [\"https://cognito-identity-fips.us-west-2.amazonaws.com\", k],\n [\"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"FIPS and DualStack are enabled, but this partition does not support one or both\"],\n [\"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"FIPS is enabled but this partition does not support FIPS\"],\n [\"https://cognito-identity.{Region}.amazonaws.com\", k],\n [\"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}\", k],\n [a, \"DualStack is enabled but this partition does not support DualStack\"],\n [\"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}\", k],\n [a, \"Invalid Configuration: Missing Region\"]\n ]\n};\nconst root = 2;\nconst r = 100_000_000;\nconst nodes = new Int32Array([\n -1, 1, -1,\n 0, 17, 3,\n 1, 4, r + 16,\n 2, 5, r + 16,\n 3, 9, 6,\n 5, 7, r + 15,\n 6, 8, r + 14,\n 7, r + 12, r + 13,\n 4, 11, 10,\n 5, r + 9, r + 11,\n 5, 12, r + 10,\n 6, 13, r + 9,\n 8, r + 4, 14,\n 9, r + 5, 15,\n 10, r + 6, 16,\n 11, r + 7, r + 8,\n 3, r + 1, 18,\n 5, r + 2, r + 3,\n]);\nexport const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);\n", "import { awsEndpointFunctions } from \"@aws-sdk/core/client\";\nimport { customEndpointFunctions, decideEndpoint, EndpointCache } from \"@smithy/core/endpoints\";\nimport { bdd } from \"./bdd\";\nconst cache = new EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nexport const defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => decideEndpoint(bdd, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\ncustomEndpointFunctions.aws = awsEndpointFunctions;\n", "import { ServiceException as __ServiceException, } from \"@smithy/core/client\";\nexport { __ServiceException };\nexport class CognitoIdentityServiceException extends __ServiceException {\n static shapeId = \"smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity#CognitoIdentityServiceException\";\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, CognitoIdentityServiceException.prototype);\n }\n}\n", "import { CognitoIdentityServiceException as __BaseException } from \"./CognitoIdentityServiceException\";\nexport class ExternalServiceException extends __BaseException {\n static shapeId = \"com.amazonaws.cognitoidentity#ExternalServiceException\";\n name = \"ExternalServiceException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ExternalServiceException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ExternalServiceException.prototype);\n }\n}\nexport class InternalErrorException extends __BaseException {\n static shapeId = \"com.amazonaws.cognitoidentity#InternalErrorException\";\n name = \"InternalErrorException\";\n $fault = \"server\";\n constructor(opts) {\n super({\n name: \"InternalErrorException\",\n $fault: \"server\",\n ...opts,\n });\n Object.setPrototypeOf(this, InternalErrorException.prototype);\n }\n}\nexport class InvalidIdentityPoolConfigurationException extends __BaseException {\n static shapeId = \"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException\";\n name = \"InvalidIdentityPoolConfigurationException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidIdentityPoolConfigurationException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidIdentityPoolConfigurationException.prototype);\n }\n}\nexport class InvalidParameterException extends __BaseException {\n static shapeId = \"com.amazonaws.cognitoidentity#InvalidParameterException\";\n name = \"InvalidParameterException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"InvalidParameterException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, InvalidParameterException.prototype);\n }\n}\nexport class NotAuthorizedException extends __BaseException {\n static shapeId = \"com.amazonaws.cognitoidentity#NotAuthorizedException\";\n name = \"NotAuthorizedException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"NotAuthorizedException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, NotAuthorizedException.prototype);\n }\n}\nexport class ResourceConflictException extends __BaseException {\n static shapeId = \"com.amazonaws.cognitoidentity#ResourceConflictException\";\n name = \"ResourceConflictException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceConflictException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceConflictException.prototype);\n }\n}\nexport class ResourceNotFoundException extends __BaseException {\n static shapeId = \"com.amazonaws.cognitoidentity#ResourceNotFoundException\";\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, ResourceNotFoundException.prototype);\n }\n}\nexport class TooManyRequestsException extends __BaseException {\n static shapeId = \"com.amazonaws.cognitoidentity#TooManyRequestsException\";\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, TooManyRequestsException.prototype);\n }\n}\nexport class LimitExceededException extends __BaseException {\n static shapeId = \"com.amazonaws.cognitoidentity#LimitExceededException\";\n name = \"LimitExceededException\";\n $fault = \"client\";\n constructor(opts) {\n super({\n name: \"LimitExceededException\",\n $fault: \"client\",\n ...opts,\n });\n Object.setPrototypeOf(this, LimitExceededException.prototype);\n }\n}\n", "const _AI = \"AccountId\";\nconst _AKI = \"AccessKeyId\";\nconst _C = \"Credentials\";\nconst _CRA = \"CustomRoleArn\";\nconst _E = \"Expiration\";\nconst _ESE = \"ExternalServiceException\";\nconst _GCFI = \"GetCredentialsForIdentity\";\nconst _GCFII = \"GetCredentialsForIdentityInput\";\nconst _GCFIR = \"GetCredentialsForIdentityResponse\";\nconst _GI = \"GetId\";\nconst _GII = \"GetIdInput\";\nconst _GIR = \"GetIdResponse\";\nconst _IEE = \"InternalErrorException\";\nconst _II = \"IdentityId\";\nconst _IIPCE = \"InvalidIdentityPoolConfigurationException\";\nconst _IPE = \"InvalidParameterException\";\nconst _IPI = \"IdentityPoolId\";\nconst _IPT = \"IdentityProviderToken\";\nconst _L = \"Logins\";\nconst _LEE = \"LimitExceededException\";\nconst _LM = \"LoginsMap\";\nconst _NAE = \"NotAuthorizedException\";\nconst _RCE = \"ResourceConflictException\";\nconst _RNFE = \"ResourceNotFoundException\";\nconst _SK = \"SecretKey\";\nconst _SKS = \"SecretKeyString\";\nconst _ST = \"SessionToken\";\nconst _TMRE = \"TooManyRequestsException\";\nconst _c = \"client\";\nconst _e = \"error\";\nconst _hE = \"httpError\";\nconst _m = \"message\";\nconst _s = \"smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity\";\nconst _se = \"server\";\nconst n0 = \"com.amazonaws.cognitoidentity\";\nimport { TypeRegistry } from \"@smithy/core/schema\";\nimport { CognitoIdentityServiceException } from \"../models/CognitoIdentityServiceException\";\nimport { ExternalServiceException, InternalErrorException, InvalidIdentityPoolConfigurationException, InvalidParameterException, LimitExceededException, NotAuthorizedException, ResourceConflictException, ResourceNotFoundException, TooManyRequestsException, } from \"../models/errors\";\nconst _s_registry = new TypeRegistry(_s);\nexport var CognitoIdentityServiceException$ = [-3, _s, \"CognitoIdentityServiceException\", 0, [], []];\n_s_registry.registerError(CognitoIdentityServiceException$, CognitoIdentityServiceException);\nconst n0_registry = new TypeRegistry(n0);\nexport var ExternalServiceException$ = [-3, n0, _ESE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(ExternalServiceException$, ExternalServiceException);\nexport var InternalErrorException$ = [-3, n0, _IEE,\n { [_e]: _se },\n [_m],\n [0]\n];\nn0_registry.registerError(InternalErrorException$, InternalErrorException);\nexport var InvalidIdentityPoolConfigurationException$ = [-3, n0, _IIPCE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(InvalidIdentityPoolConfigurationException$, InvalidIdentityPoolConfigurationException);\nexport var InvalidParameterException$ = [-3, n0, _IPE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(InvalidParameterException$, InvalidParameterException);\nexport var LimitExceededException$ = [-3, n0, _LEE,\n { [_e]: _c, [_hE]: 400 },\n [_m],\n [0]\n];\nn0_registry.registerError(LimitExceededException$, LimitExceededException);\nexport var NotAuthorizedException$ = [-3, n0, _NAE,\n { [_e]: _c, [_hE]: 403 },\n [_m],\n [0]\n];\nn0_registry.registerError(NotAuthorizedException$, NotAuthorizedException);\nexport var ResourceConflictException$ = [-3, n0, _RCE,\n { [_e]: _c, [_hE]: 409 },\n [_m],\n [0]\n];\nn0_registry.registerError(ResourceConflictException$, ResourceConflictException);\nexport var ResourceNotFoundException$ = [-3, n0, _RNFE,\n { [_e]: _c, [_hE]: 404 },\n [_m],\n [0]\n];\nn0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);\nexport var TooManyRequestsException$ = [-3, n0, _TMRE,\n { [_e]: _c, [_hE]: 429 },\n [_m],\n [0]\n];\nn0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);\nexport const errorTypeRegistries = [\n _s_registry,\n n0_registry,\n];\nvar IdentityProviderToken = [0, n0, _IPT, 8, 0];\nvar SecretKeyString = [0, n0, _SKS, 8, 0];\nexport var Credentials$ = [3, n0, _C,\n 0,\n [_AKI, _SK, _ST, _E],\n [0, [() => SecretKeyString, 0], 0, 4]\n];\nexport var GetCredentialsForIdentityInput$ = [3, n0, _GCFII,\n 0,\n [_II, _L, _CRA],\n [0, [() => LoginsMap, 0], 0], 1\n];\nexport var GetCredentialsForIdentityResponse$ = [3, n0, _GCFIR,\n 0,\n [_II, _C],\n [0, [() => Credentials$, 0]]\n];\nexport var GetIdInput$ = [3, n0, _GII,\n 0,\n [_IPI, _AI, _L],\n [0, 0, [() => LoginsMap, 0]], 1\n];\nexport var GetIdResponse$ = [3, n0, _GIR,\n 0,\n [_II],\n [0]\n];\nvar LoginsMap = [2, n0, _LM,\n 0, [0,\n 0],\n [() => IdentityProviderToken,\n 0]\n];\nexport var GetCredentialsForIdentity$ = [9, n0, _GCFI,\n 0, () => GetCredentialsForIdentityInput$, () => GetCredentialsForIdentityResponse$\n];\nexport var GetId$ = [9, n0, _GI,\n 0, () => GetIdInput$, () => GetIdResponse$\n];\n", "import { AwsSdkSigV4Signer } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { AwsJson1_1Protocol } from \"@aws-sdk/core/protocols\";\nimport { NoAuthSigner } from \"@smithy/core\";\nimport { Sha256 } from \"@smithy/core/checksum\";\nimport { NoOpLogger } from \"@smithy/core/client\";\nimport { parseUrl } from \"@smithy/core/protocols\";\nimport { fromBase64, fromUtf8, toBase64, toUtf8 } from \"@smithy/core/serde\";\nimport { defaultCognitoIdentityHttpAuthSchemeProvider } from \"./auth/httpAuthSchemeProvider\";\nimport { defaultEndpointResolver } from \"./endpoint/endpointResolver\";\nimport { errorTypeRegistries } from \"./schemas/schemas_0\";\nexport const getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2014-06-30\",\n base64Decoder: config?.base64Decoder ?? fromBase64,\n base64Encoder: config?.base64Encoder ?? toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultCognitoIdentityHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new NoOpLogger(),\n protocol: config?.protocol ?? AwsJson1_1Protocol,\n protocolSettings: config?.protocolSettings ?? {\n defaultNamespace: \"com.amazonaws.cognitoidentity\",\n errorTypeRegistries,\n xmlNamespace: \"http://cognito-identity.amazonaws.com/doc/2014-06-30/\",\n version: \"2014-06-30\",\n serviceTarget: \"AWSCognitoIdentityService\",\n },\n serviceId: config?.serviceId ?? \"Cognito Identity\",\n sha256: config?.sha256 ?? Sha256,\n urlParser: config?.urlParser ?? parseUrl,\n utf8Decoder: config?.utf8Decoder ?? fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? toUtf8,\n };\n};\n", "import packageInfo from \"../../../package.json\";\nimport { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS, } from \"@aws-sdk/core/client\";\nimport { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from \"@aws-sdk/core/httpAuthSchemes\";\nimport { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from \"@smithy/core/client\";\nimport { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from \"@smithy/core/config\";\nimport { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from \"@smithy/core/retry\";\nimport { calculateBodyLength } from \"@smithy/core/serde\";\nimport { NodeHttpHandler as RequestHandler, streamCollector } from \"@smithy/node-http-handler\";\nimport { getRuntimeConfig as getSharedRuntimeConfig } from \"./runtimeConfig.shared\";\nexport const getRuntimeConfig = (config) => {\n emitWarningIfUnsupportedVersion(process.version);\n const defaultsMode = resolveDefaultsModeConfig(config);\n const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);\n const clientSharedValues = getSharedRuntimeConfig(config);\n awsCheckVersion(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),\n maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n loadNodeConfig({\n ...NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,\n }, config),\n streamCollector: config?.streamCollector ?? streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\n", "export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexport const resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\n", "import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration } from \"@aws-sdk/core/client\";\nimport { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from \"@smithy/core/client\";\nimport { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from \"@smithy/core/protocols\";\nimport { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from \"./auth/httpAuthExtensionConfiguration\";\nexport const resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));\n};\n", "import { getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveHostHeaderConfig, resolveUserAgentConfig, } from \"@aws-sdk/core/client\";\nimport { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from \"@smithy/core\";\nimport { Client as __Client, } from \"@smithy/core/client\";\nimport { resolveRegionConfig } from \"@smithy/core/config\";\nimport { resolveEndpointConfig } from \"@smithy/core/endpoints\";\nimport { getContentLengthPlugin } from \"@smithy/core/protocols\";\nimport { getRetryPlugin, resolveRetryConfig, } from \"@smithy/core/retry\";\nimport { getSchemaSerdePlugin } from \"@smithy/core/schema\";\nimport { defaultCognitoIdentityHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from \"./auth/httpAuthSchemeProvider\";\nimport { resolveClientEndpointParameters, } from \"./endpoint/EndpointParameters\";\nimport { getRuntimeConfig as __getRuntimeConfig } from \"./runtimeConfig\";\nimport { resolveRuntimeExtensions } from \"./runtimeExtensions\";\nexport { __Client };\nexport class CognitoIdentityClient extends __Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = __getRuntimeConfig(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = resolveUserAgentConfig(_config_1);\n const _config_3 = resolveRetryConfig(_config_2);\n const _config_4 = resolveRegionConfig(_config_3);\n const _config_5 = resolveHostHeaderConfig(_config_4);\n const _config_6 = resolveEndpointConfig(_config_5);\n const _config_7 = resolveHttpAuthSchemeConfig(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use(getSchemaSerdePlugin(this.config));\n this.middlewareStack.use(getUserAgentPlugin(this.config));\n this.middlewareStack.use(getRetryPlugin(this.config));\n this.middlewareStack.use(getContentLengthPlugin(this.config));\n this.middlewareStack.use(getHostHeaderPlugin(this.config));\n this.middlewareStack.use(getLoggerPlugin(this.config));\n this.middlewareStack.use(getRecursionDetectionPlugin(this.config));\n this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {\n httpAuthSchemeParametersProvider: defaultCognitoIdentityHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use(getHttpSigningPlugin(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\n", "import { makeBuilder } from \"@smithy/core/client\";\nimport { getEndpointPlugin } from \"@smithy/core/endpoints\";\nimport { commonParams } from \"./endpoint/EndpointParameters\";\nexport const command = makeBuilder(commonParams, \"AWSCognitoIdentityService\", \"CognitoIdentityClient\", getEndpointPlugin);\nexport const _ep0 = {};\nexport const _mw0 = (Command, cs, config, o) => [];\n", "import { _ep0, _mw0, command } from \"../commandBuilder\";\nimport { GetCredentialsForIdentity$ } from \"../schemas/schemas_0\";\nexport class GetCredentialsForIdentityCommand extends command(_ep0, _mw0, \"GetCredentialsForIdentity\", GetCredentialsForIdentity$) {\n}\n", "import { _ep0, _mw0, command } from \"../commandBuilder\";\nimport { GetId$ } from \"../schemas/schemas_0\";\nexport class GetIdCommand extends command(_ep0, _mw0, \"GetId\", GetId$) {\n}\n"],
5
+ "mappings": ";q0BAEO,IAAMA,GAAyDC,EAAA,MAAOC,EAAQC,EAASC,KACnF,CACH,UAAWC,EAAiBF,CAAO,EAAE,UACrC,OAAQ,MAAMG,EAAkBJ,EAAO,MAAM,EAAE,IAAM,IAAM,CACvD,MAAM,IAAI,MAAM,yDAAyD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,GAAYC,GAAsBF,EAAS,EAC3CG,GAAYC,GAA4BH,EAAS,EACjDI,GAAYC,GAAyBH,GAAWd,GAAe,YAAc,CAAC,CAAC,EACrF,KAAK,OAASgB,GACd,KAAK,gBAAgB,IAAIE,EAAqB,KAAK,MAAM,CAAC,EAC1D,KAAK,gBAAgB,IAAIC,GAAmB,KAAK,MAAM,CAAC,EACxD,KAAK,gBAAgB,IAAIC,GAAe,KAAK,MAAM,CAAC,EACpD,KAAK,gBAAgB,IAAIC,GAAuB,KAAK,MAAM,CAAC,EAC5D,KAAK,gBAAgB,IAAIC,GAAoB,KAAK,MAAM,CAAC,EACzD,KAAK,gBAAgB,IAAIC,GAAgB,KAAK,MAAM,CAAC,EACrD,KAAK,gBAAgB,IAAIC,GAA4B,KAAK,MAAM,CAAC,EACjE,KAAK,gBAAgB,IAAIC,GAAuC,KAAK,OAAQ,CACzE,iCAAkCC,GAClC,+BAAgC3B,EAAA,MAAO4B,IAAW,IAAIC,GAA8B,CAChF,iBAAkBD,GAAO,WAC7B,CAAC,EAF+B,iCAGpC,CAAC,CAAC,EACF,KAAK,gBAAgB,IAAIE,GAAqB,KAAK,MAAM,CAAC,CAC9D,CACA,SAAU,CACN,MAAM,QAAQ,CAClB,CACJ,EC3CO,IAAMC,EAAUC,GAAYC,GAAc,4BAA6B,wBAAyBC,EAAiB,EAC3GC,EAAO,CAAC,EACRC,EAAOC,EAAA,CAACC,EAASC,EAAIC,EAAQC,IAAM,CAAC,EAA7B,QCHb,IAAMC,EAAN,cAA+CC,EAAQC,EAAMC,EAAM,4BAA6BC,EAA0B,CAAE,CAFnI,MAEmI,CAAAC,EAAA,yCACnI,ECDO,IAAMC,EAAN,cAA2BC,EAAQC,EAAMC,EAAM,QAASC,EAAM,CAAE,CAFvE,MAEuE,CAAAC,EAAA,qBACvE",
6
+ "names": ["defaultCognitoIdentityHttpAuthSchemeParametersProvider", "__name", "config", "context", "input", "getSmithyContext", "normalizeProvider", "createAwsAuthSigv4HttpAuthOption", "authParameters", "createSmithyApiNoAuthHttpAuthOption", "defaultCognitoIdentityHttpAuthSchemeProvider", "options", "resolveHttpAuthSchemeConfig", "config_0", "resolveAwsSdkSigV4Config", "resolveClientEndpointParameters", "__name", "options", "commonParams", "m", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "_data", "root", "r", "nodes", "bdd", "BinaryDecisionDiagram", "cache", "EndpointCache", "defaultEndpointResolver", "__name", "endpointParams", "context", "decideEndpoint", "bdd", "customEndpointFunctions", "awsEndpointFunctions", "CognitoIdentityServiceException", "_CognitoIdentityServiceException", "ServiceException", "__name", "options", "ExternalServiceException", "_ExternalServiceException", "CognitoIdentityServiceException", "__name", "opts", "InternalErrorException", "_InternalErrorException", "InvalidIdentityPoolConfigurationException", "_InvalidIdentityPoolConfigurationException", "InvalidParameterException", "_InvalidParameterException", "NotAuthorizedException", "_NotAuthorizedException", "ResourceConflictException", "_ResourceConflictException", "ResourceNotFoundException", "_ResourceNotFoundException", "TooManyRequestsException", "_TooManyRequestsException", "LimitExceededException", "_LimitExceededException", "_AI", "_AKI", "_C", "_CRA", "_E", "_ESE", "_GCFI", "_GCFII", "_GCFIR", "_GI", "_GII", "_GIR", "_IEE", "_II", "_IIPCE", "_IPE", "_IPI", "_IPT", "_L", "_LEE", "_LM", "_NAE", "_RCE", "_RNFE", "_SK", "_SKS", "_ST", "_TMRE", "_c", "_e", "_hE", "_m", "_s", "_se", "n0", "_s_registry", "TypeRegistry", "CognitoIdentityServiceException$", "CognitoIdentityServiceException", "n0_registry", "ExternalServiceException$", "ExternalServiceException", "InternalErrorException$", "InternalErrorException", "InvalidIdentityPoolConfigurationException$", "InvalidIdentityPoolConfigurationException", "InvalidParameterException$", "InvalidParameterException", "LimitExceededException$", "LimitExceededException", "NotAuthorizedException$", "NotAuthorizedException", "ResourceConflictException$", "ResourceConflictException", "ResourceNotFoundException$", "ResourceNotFoundException", "TooManyRequestsException$", "TooManyRequestsException", "errorTypeRegistries", "IdentityProviderToken", "SecretKeyString", "Credentials$", "GetCredentialsForIdentityInput$", "LoginsMap", "GetCredentialsForIdentityResponse$", "GetIdInput$", "GetIdResponse$", "GetCredentialsForIdentity$", "GetId$", "getRuntimeConfig", "__name", "config", "fromBase64", "toBase64", "defaultEndpointResolver", "defaultCognitoIdentityHttpAuthSchemeProvider", "ipc", "AwsSdkSigV4Signer", "NoAuthSigner", "NoOpLogger", "AwsJson1_1Protocol", "errorTypeRegistries", "Sha256Node", "parseUrl", "fromUtf8", "toUtf8", "getRuntimeConfig", "__name", "config", "emitWarningIfUnsupportedVersion", "defaultsMode", "resolveDefaultsModeConfig", "defaultConfigProvider", "loadConfigsForDefaultMode", "clientSharedValues", "loaderConfig", "loadConfig", "NODE_AUTH_SCHEME_PREFERENCE_OPTIONS", "calculateBodyLength", "createDefaultUserAgentProvider", "package_default", "NODE_MAX_ATTEMPT_CONFIG_OPTIONS", "NODE_REGION_CONFIG_OPTIONS", "NODE_REGION_CONFIG_FILE_OPTIONS", "NodeHttpHandler", "NODE_RETRY_MODE_CONFIG_OPTIONS", "DEFAULT_RETRY_MODE", "streamCollector", "NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS", "NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS", "NODE_APP_ID_CONFIG_OPTIONS", "getHttpAuthExtensionConfiguration", "__name", "runtimeConfig", "_httpAuthSchemes", "_httpAuthSchemeProvider", "_credentials", "httpAuthScheme", "index", "scheme", "httpAuthSchemeProvider", "credentials", "resolveHttpAuthRuntimeConfig", "config", "resolveRuntimeExtensions", "__name", "runtimeConfig", "extensions", "extensionConfiguration", "getAwsRegionExtensionConfiguration", "getDefaultExtensionConfiguration", "getHttpHandlerExtensionConfiguration", "getHttpAuthExtensionConfiguration", "extension", "resolveAwsRegionExtensionConfiguration", "resolveDefaultRuntimeConfig", "resolveHttpHandlerRuntimeConfig", "resolveHttpAuthRuntimeConfig", "CognitoIdentityClient", "Client", "__name", "configuration", "_config_0", "getRuntimeConfig", "_config_1", "resolveClientEndpointParameters", "_config_2", "resolveUserAgentConfig", "_config_3", "resolveRetryConfig", "_config_4", "resolveRegionConfig", "_config_5", "_config_6", "resolveEndpointConfig", "_config_7", "resolveHttpAuthSchemeConfig", "_config_8", "resolveRuntimeExtensions", "getSchemaSerdePlugin", "getUserAgentPlugin", "getRetryPlugin", "getContentLengthPlugin", "getHostHeaderPlugin", "getLoggerPlugin", "getRecursionDetectionPlugin", "getHttpAuthSchemeEndpointRuleSetPlugin", "defaultCognitoIdentityHttpAuthSchemeParametersProvider", "config", "DefaultIdentityProviderConfig", "getHttpSigningPlugin", "command", "makeBuilder", "commonParams", "getEndpointPlugin", "_ep0", "_mw0", "__name", "Command", "cs", "config", "o", "GetCredentialsForIdentityCommand", "command", "_ep0", "_mw0", "GetCredentialsForIdentity$", "__name", "GetIdCommand", "command", "_ep0", "_mw0", "GetId$", "__name"]
7
+ }
@@ -0,0 +1,2 @@
1
+ /* CommonJS polyfills */import { fileURLToPath } from 'node:url';import { createRequire } from 'node:module';const __filename = fileURLToPath(import.meta.url);const __dirname = fileURLToPath(new URL('.', import.meta.url));const require = createRequire(import.meta.url);/* end of CommonJS polyfills */
2
+ import{a as He}from"./chunk-BH7ZEBAB.mjs";import{a as Ne,c as De,h as ke,n as Fe}from"./chunk-REMPUQ6B.mjs";import{b as ce}from"./chunk-LB33VBGK.mjs";import{a as be}from"./chunk-YY2HYMK3.mjs";import{B as me,C as le,D as he,E as ge,F as fe,L as Se,O as Ee,R as _e,S as xe,T as ve,W as Pe,X as Re,aa as Ce,b as D,e as H,h as U,ha as Ie,j as G,ja as Ae,k as M,l as $,m as q,na as ye,o as z,p as j,r as te,s as oe,sa as Oe,u as re,w as se,xa as we,y as ne,ya as Te,z as ie}from"./chunk-PD2XGJQD.mjs";import{i as pe,j as ue,k as de}from"./chunk-YMGL4RSC.mjs";import{n as p,o as Q,p as Y,s as J,t as X,u as Z,v as ee}from"./chunk-KRS5YV2Z.mjs";import{B as ae,b as F,e as y,g as L,h as B,i as K,j as V,z as W}from"./chunk-3UGRDNDZ.mjs";import{e as k,k as A,l as b}from"./chunk-OC3UN3OS.mjs";import{a as o}from"./chunk-CFZ5JWD3.mjs";var Ue=o(async(e,t,r)=>({operation:k(t).operation,region:await A(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultSSOHttpAuthSchemeParametersProvider");function lt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:o((t,r)=>({signingProperties:{config:t,context:r}}),"propertiesExtractor")}}o(lt,"createAwsAuthSigv4HttpAuthOption");function ht(e){return{schemeId:"smithy.api#noAuth"}}o(ht,"createSmithyApiNoAuthHttpAuthOption");var Ge=o(e=>{let t=[];return e.operation==="GetRoleCredentials"?t.push(ht(e)):t.push(lt(e)),t},"defaultSSOHttpAuthSchemeProvider"),Me=o(e=>{let t=ke(e);return Object.assign(t,{authSchemePreference:A(e.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig");var $e=o(e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}),"resolveClientEndpointParameters"),qe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var m="ref",u=-1,g=!0,ze="isSet",Ke="PartitionResult",f="booleanEquals",O="getAttr",je={[m]:"Endpoint"},w={[m]:Ke},d={},Le=[{[m]:"Region"}],Be={conditions:[[ze,[je]],[ze,Le],["aws.partition",Le,Ke],[f,[{[m]:"UseFIPS"},g]],[f,[{[m]:"UseDualStack"},g]],[f,[{fn:O,argv:[w,"supportsDualStack"]},g]],[f,[{fn:O,argv:[w,"supportsFIPS"]},g]],["stringEquals",[{fn:O,argv:[w,"name"]},"aws-us-gov"]]],results:[[u],[u,"Invalid Configuration: FIPS and custom endpoint are not supported"],[u,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[je,d],["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",d],[u,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://portal.sso.{Region}.amazonaws.com",d],["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",d],[u,"FIPS is enabled but this partition does not support FIPS"],["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",d],[u,"DualStack is enabled but this partition does not support DualStack"],["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",d],[u,"Invalid Configuration: Missing Region"]]},gt=2,n=1e8,ft=new Int32Array([-1,1,-1,0,13,3,1,4,n+12,2,5,n+12,3,8,6,4,7,n+11,5,n+9,n+10,4,11,9,6,10,n+8,7,n+6,n+7,5,12,n+5,6,n+4,n+5,3,n+1,14,4,n+2,n+3]),Ve=te.from(ft,gt,Be.conditions,Be.results);var St=new oe({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),We=o((e,t={})=>St.get(e,()=>se(Ve,{endpointParams:e,logger:t.logger})),"defaultEndpointResolver");re.aws=Oe;var c=class e extends U{static{o(this,"SSOServiceException")}static shapeId="smithy.ts.sdk.synthetic.com.amazonaws.sso#SSOServiceException";constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var S=class e extends c{static{o(this,"InvalidRequestException")}static shapeId="com.amazonaws.sso#InvalidRequestException";name="InvalidRequestException";$fault="client";constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},E=class e extends c{static{o(this,"ResourceNotFoundException")}static shapeId="com.amazonaws.sso#ResourceNotFoundException";name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},_=class e extends c{static{o(this,"TooManyRequestsException")}static shapeId="com.amazonaws.sso#TooManyRequestsException";name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},x=class e extends c{static{o(this,"UnauthorizedException")}static shapeId="com.amazonaws.sso#UnauthorizedException";name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};var Et="AccessTokenType",_t="GetRoleCredentials",xt="GetRoleCredentialsRequest",vt="GetRoleCredentialsResponse",Pt="InvalidRequestException",Rt="RoleCredentials",Ct="ResourceNotFoundException",It="SecretAccessKeyType",At="SessionTokenType",yt="TooManyRequestsException",Ot="UnauthorizedException",wt="accountId",Tt="accessKeyId",Nt="accessToken",Dt="account_id",v="client",P="error",kt="expiration",bt="http",R="httpError",Ht="httpHeader",Qe="httpQuery",C="message",Ft="roleCredentials",Ut="roleName",Gt="role_name",Ye="smithy.ts.sdk.synthetic.com.amazonaws.sso",Mt="secretAccessKey",$t="sessionToken",qt="x-amz-sso_bearer_token",i="com.amazonaws.sso",Je=new y(Ye),zt=[-3,Ye,"SSOServiceException",0,[],[]];Je.registerError(zt,c);var l=new y(i),jt=[-3,i,Pt,{[P]:v,[R]:400},[C],[0]];l.registerError(jt,S);var Lt=[-3,i,Ct,{[P]:v,[R]:404},[C],[0]];l.registerError(Lt,E);var Bt=[-3,i,yt,{[P]:v,[R]:429},[C],[0]];l.registerError(Bt,_);var Kt=[-3,i,Ot,{[P]:v,[R]:401},[C],[0]];l.registerError(Kt,x);var Xe=[Je,l],Vt=[0,i,Et,8,0],Wt=[0,i,It,8,0],Qt=[0,i,At,8,0],Yt=[3,i,xt,0,[Ut,wt,Nt],[[0,{[Qe]:Gt}],[0,{[Qe]:Dt}],[()=>Vt,{[Ht]:qt}]],3],Jt=[3,i,vt,0,[Ft],[[()=>Xt,0]]],Xt=[3,i,Rt,0,[Tt,Mt,$t,kt],[0,[()=>Wt,0],[()=>Qt,0],1]],Ze=[9,i,_t,{[bt]:["GET","/federation/credentials",200]},()=>Yt,()=>Jt];var et=o(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??L,base64Encoder:e?.base64Encoder??K,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??We,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ge,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:o(t=>t.getIdentityProvider("aws.auth#sigv4"),"identityProvider"),signer:new Ne},{schemeId:"smithy.api#noAuth",identityProvider:o(t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),"identityProvider"),signer:new Re}],logger:e?.logger??new z,protocol:e?.protocol??Fe,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:Xe,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:e?.serviceId??"SSO",sha256:e?.sha256??ce,urlParser:e?.urlParser??b,utf8Decoder:e?.utf8Decoder??B,utf8Encoder:e?.utf8Encoder??V}),"getRuntimeConfig");var tt=o(e=>{M(process.version);let t=ee(e),r=o(()=>t().then(G),"defaultConfigProvider"),a=et(e);D(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??p(De,s),bodyLengthChecker:e?.bodyLengthChecker??W,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ae({serviceId:a.serviceId,clientVersion:He.version}),maxAttempts:e?.maxAttempts??p(le,e),region:e?.region??p(J,{...X,...s}),requestHandler:be.create(e?.requestHandler??r),retryMode:e?.retryMode??p({...ge,default:o(async()=>(await r()).retryMode||me,"default")},e),streamCollector:e?.streamCollector??ae,useDualstackEndpoint:e?.useDualstackEndpoint??p(Q,s),useFipsEndpoint:e?.useFipsEndpoint??p(Y,s),userAgentAppId:e?.userAgentAppId??p(ye,s)}},"getRuntimeConfig");var ot=o(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,a=e.credentials;return{setHttpAuthScheme(s){let h=t.findIndex(I=>I.schemeId===s.schemeId);h===-1?t.push(s):t.splice(h,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){a=s},credentials(){return a}}},"getHttpAuthExtensionConfiguration"),rt=o(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig");var st=o((e,t)=>{let r=Object.assign(we(e),$(e),pe(e),ot(e));return t.forEach(a=>a.configure(r)),Object.assign(e,Te(r),q(r),ue(r),rt(r))},"resolveRuntimeExtensions");var T=class extends H{static{o(this,"SSOClient")}config;constructor(...[t]){let r=tt(t||{});super(r),this.initConfig=r;let a=$e(r),s=Ce(a),h=he(s),I=Z(h),ct=I,pt=ne(ct),ut=Me(pt),dt=st(ut,t?.extensions||[]);this.config=dt,this.middlewareStack.use(F(this.config)),this.middlewareStack.use(Ie(this.config)),this.middlewareStack.use(fe(this.config)),this.middlewareStack.use(de(this.config)),this.middlewareStack.use(Se(this.config)),this.middlewareStack.use(Ee(this.config)),this.middlewareStack.use(_e(this.config)),this.middlewareStack.use(xe(this.config,{httpAuthSchemeParametersProvider:Ue,identityProviderConfigProvider:o(async mt=>new Pe({"aws.auth#sigv4":mt.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(ve(this.config))}destroy(){super.destroy()}};var nt=j(qe,"SWBPortalService","SSOClient",ie),it={},at=o((e,t,r,a)=>[],"_mw0");var N=class extends nt(it,at,"GetRoleCredentials",Ze){static{o(this,"GetRoleCredentialsCommand")}};export{N as GetRoleCredentialsCommand,T as SSOClient};