gemi 0.4.90 → 0.4.91

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 (41) hide show
  1. package/dist/app/App.d.ts.map +1 -1
  2. package/dist/app/index.js +1 -1
  3. package/dist/auth/AuthenticationServiceContainer.d.ts +7 -0
  4. package/dist/auth/AuthenticationServiceContainer.d.ts.map +1 -0
  5. package/dist/auth/AuthenticationServiceProvider.d.ts +1 -0
  6. package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
  7. package/dist/auth/adapters/types.d.ts +1 -0
  8. package/dist/auth/adapters/types.d.ts.map +1 -1
  9. package/dist/{chunk-0f500a6384fcd132.js → chunk-19790c50198f1898.js} +1 -1
  10. package/dist/{chunk-786985b106091b91.js → chunk-201d67e6e22cc14b.js} +1 -1
  11. package/dist/{chunk-73ad537019659405.js → chunk-2b9b6009ebe271d3.js} +1 -1
  12. package/dist/chunk-32d1342f9f8391c0.js +2 -0
  13. package/dist/{chunk-f28fe28ab592bd2a.js → chunk-3a6838d9e6866471.js} +1 -1
  14. package/dist/chunk-7085d9454a422181.js +2 -0
  15. package/dist/{chunk-00c56e78353444bd.js → chunk-809308720fc22418.js} +1 -1
  16. package/dist/chunk-900bf3955cb1bbab.js +2 -0
  17. package/dist/{chunk-f7a2f27070c1a0cf.js → chunk-931a005d4bb28ffe.js} +2 -2
  18. package/dist/chunk-967cb54562e3d29b.js +3 -0
  19. package/dist/{chunk-e51fe90ab8cb869b.js → chunk-b94896500a1345bf.js} +1 -1
  20. package/dist/{chunk-6b1b2297cf4e98bf.js → chunk-bce765dc10669cd0.js} +1 -1
  21. package/dist/{chunk-5bfe9d4cbecd160a.js → chunk-bdac4694bbb37064.js} +1 -1
  22. package/dist/{chunk-77f51fc60eb8f53d.js → chunk-c3c17a7115770391.js} +1 -1
  23. package/dist/chunk-d1e1b959b1124e74.js +18 -0
  24. package/dist/{chunk-ce91e437af790f62.js → chunk-f6a9cd06681eb0dc.js} +2 -2
  25. package/dist/{chunk-b033519a526dfb3f.js → chunk-fcd9eb76c67113d3.js} +1 -1
  26. package/dist/facades/Auth.d.ts.map +1 -1
  27. package/dist/facades/index.js +1 -1
  28. package/dist/http/AuthenticationMiddlware.d.ts.map +1 -1
  29. package/dist/http/index.js +1 -1
  30. package/dist/kernel/Kernel.d.ts +3 -2
  31. package/dist/kernel/Kernel.d.ts.map +1 -1
  32. package/dist/kernel/context.d.ts +2 -2
  33. package/dist/kernel/context.d.ts.map +1 -1
  34. package/dist/kernel/index.js +1 -1
  35. package/dist/services/index.js +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-1663f14acf1c15e4.js +0 -2
  38. package/dist/chunk-631b243096f99070.js +0 -2
  39. package/dist/chunk-d5f34554362c0fde.js +0 -18
  40. package/dist/chunk-d96668bed492732f.js +0 -3
  41. package/dist/chunk-da0be6c2c54903f4.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemi",
3
- "version": "0.4.90",
3
+ "version": "0.4.91",
4
4
  "devDependencies": {
5
5
  "@babel/parser": "^7.25.4",
6
6
  "@repo/eslint-config": "*",
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{B as c} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-28694e5e949df0ff.js";import{$ as f,O as cs,P as Ce,Q as Le,R as Me,S as We,W as F,X as Ke,Y as G,Z as V,_ as N,aa as Qe,ba as me,ca as he,da as ue,ea as we,fa as Xe,ga as Ye,ia as rs,ja as as,ka as Ze,la as be,ma as xe,na as je,oa as ve,pa as Te,qa as x,ra as ke,sa as Re,ta as Ee,ua as qe,va as Pe,wa as Je} from"./chunk-d5f34554362c0fde.js";import{$a as D,Ea as ee,Ga as se,Ha as te,Ja as Ae,Ka as re,La as ae,Oa as ie,Pa as le,Va as ts,Wa as R,ab as Ve,bb as h,ib as He,jb as u,kb as Ne,lb as pe,mb as ye,nb as _e,ob as $e,qb as i,rb as y,tb as fe,xa as Fe,ya as Ue} from"./chunk-d96668bed492732f.js";import"./chunk-786985b106091b91.js";import{vb as l,wb as ne} from"./chunk-f7a2f27070c1a0cf.js";import"./chunk-5bfe9d4cbecd160a.js";import"./chunk-b033519a526dfb3f.js";var p=c(F(),1);var _=c(x(),1),v=c(cs(),1),is=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}},b=function(e){return{schemeId:"smithy.api#noAuth"}},$=async(e,s,t)=>{return{operation:v.getSmithyContext(s).operation,region:await v.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},P=(e)=>{const s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(is(e))}return s},J=(e)=>{return{..._.resolveAwsSdkSigV4Config(e)}};var I=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},C={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var L={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Se=c(x(),1);var de=c(x(),1),oe=c(F(),1);var M={["required"]:!1,type:"String"},W={["required"]:!0,default:!1,type:"Boolean"},A={["ref"]:"Endpoint"},j={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},K={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},H={["ref"]:"PartitionResult"},Q={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[H,"supportsDualStack"]}]},X=[j],Y=[T],Z=[{["ref"]:"Region"}],ps={version:"1.0",parameters:{Region:M,UseDualStack:W,UseFIPS:W,Endpoint:M},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[A]}],rules:[{conditions:X,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Y,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:A,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:Z}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:Z,assign:"PartitionResult"}],rules:[{conditions:[j,T],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,K]},Q],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:X,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[K,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[H,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[Q],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},O=ps;var ys=new G({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),g=(e,s={})=>{return ys.get(e,()=>N(O,{endpointParams:e,logger:s.logger}))};V.aws=f;var ce=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??re,base64Encoder:e?.base64Encoder??ae,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??g,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??P,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new de.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new oe.NoAuthSigner}],logger:e?.logger??new te,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ne,utf8Decoder:e?.utf8Decoder??ee,utf8Encoder:e?.utf8Encoder??se}};var ze=(e)=>{ye(process.version);const s=qe(e),t=()=>s().then(pe),r=ce(e);return Se.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ee,defaultUserAgentProvider:e?.defaultUserAgentProvider??ke({serviceId:r.serviceId,clientVersion:L.version}),maxAttempts:e?.maxAttempts??l(xe),region:e?.region??l(ue,we),requestHandler:ie.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ve,default:async()=>(await t()).retryMode||be}),sha256:e?.sha256??Re.bind(null,"sha256"),streamCollector:e?.streamCollector??le,useDualstackEndpoint:e?.useDualstackEndpoint??l(me),useFipsEndpoint:e?.useFipsEndpoint??l(he)}};var De=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((B)=>B.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Be=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var k=(e)=>e,Ie=(e,s)=>{const t={...k(Pe(e)),...k(_e(e)),...k(Fe(e)),...k(De(e))};return s.forEach((r)=>r.configure(t)),{...e,...Je(t),...$e(t),...Ue(t),...Be(t)}};class ms extends Ae{constructor(...[e]){const s=ze(e||{}),t=I(s),r=Ke(t),a=je(r),n=Xe(a),B=Ce(n),ns=Ze(B),ds=J(ns),U=Ie(ds,e?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Ye(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$,identityProviderConfigProvider:async(os)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":os.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends He{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class E extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class q extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class S extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}class z extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,z.prototype)}}var Oe=(e)=>({...e,...e.accessToken&&{accessToken:R}}),hs=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:R},...e.sessionToken&&{sessionToken:R}}),Ge=(e)=>({...e,...e.roleCredentials&&{roleCredentials:hs(e.roleCredentials)}});var m=c(x(),1),ge=c(F(),1);var es=async(e,s)=>{const t=ge.requestBuilder(e,s),r=i({},Rs,{[Bs]:e[qs]});t.bp("/federation/credentials");const a=i({[Ds]:[,D(e[zs],"roleName")],[Ss]:[,D(e[Es],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var ss=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return us(e,s);const t=i({$metadata:w(e)}),r=D(Ve(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:fe});return Object.assign(t,a),t};var us=async(e,s)=>{const t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await bs(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await xs(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await vs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await ks(t,s);default:const a=t.body;return ws({output:e,parsedBody:a,errorCode:r})}},ws=Ne(o),bs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},xs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},vs=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},ks=async(e,s)=>{const t=i({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new z({$metadata:w(e),...t});return u(n,e.body)},w=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var Rs=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),Es="accountId",qs="accessToken",Ss="account_id";var zs="roleName",Ds="role_name",Bs="x-amz-sso_bearer_token";class Fs extends ts.classBuilder().ep(C).m(function(e,s,t,r){return[rs(t,this.serialize,this.deserialize),as(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Oe,Ge).ser(es).de(ss).build(){}export{ms as SSOClient,Fs as GetRoleCredentialsCommand};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-0f500a6384fcd132.js";import{B as A} from"./chunk-24a86f8f5ddc0cbd.js";import"./chunk-28694e5e949df0ff.js";import{$ as Nl,O as Dw,P as k0,Q as K0,R as F0,S as B0,W as Xh,X as y0,Y as ql,Z as zl,_ as Ml,aa as Q0,ba as gl,ca as xl,da as il,ea as cl,fa as X0,ga as Y0,ia as F,ja as B,ka as Z0,la as el,ma as pl,na as $0,oa as nl,pa as V0,qa as Gh,ra as ol,sa as ul,ta as tl,ua as h0,va as J0,wa as D0} from"./chunk-d5f34554362c0fde.js";import{$a as L0,Ea as Tl,Ga as Al,Ha as Ll,Ja as U0,Ka as Rl,La as jl,Oa as bl,Pa as fl,Va as K,Wa as Hh,Xa as t0,bb as H,db as u,gb as R0,ib as P0,jb as T,kb as j0,lb as Cl,mb as Ol,nb as H0,ob as m0,pb as ph,xa as I0,ya as S0,za as A0} from"./chunk-d96668bed492732f.js";import"./chunk-786985b106091b91.js";import{vb as f,wb as al} from"./chunk-f7a2f27070c1a0cf.js";import"./chunk-5bfe9d4cbecd160a.js";import{Db as Yh} from"./chunk-ce91e437af790f62.js";import"./chunk-b033519a526dfb3f.js";var C=A(Xh(),1);var dl=A(Gh(),1),dh=A(Dw(),1);var Ew=function(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}},Gl=function(h){return{schemeId:"smithy.api#noAuth"}},Il=async(h,w,l)=>{return{operation:dh.getSmithyContext(w).operation,region:await dh.normalizeProvider(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Sl=(h)=>{const w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(Gl(h));break}case"AssumeRoleWithWebIdentity":{w.push(Gl(h));break}default:w.push(Ew(h))}return w},kw=(h)=>({...h,stsClientCtor:L}),Hl=(h)=>{const w=kw(h);return{...dl.resolveAwsSdkSigV4Config(w)}};var ml=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Jl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.654.0","@aws-sdk/core":"3.654.0","@aws-sdk/credential-provider-node":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var Ih=A(Gh(),1);var l0=A(Xh(),1);var sl=A(Gh(),1),rl=A(Xh(),1);var Dl={["required"]:!1,["type"]:"String"},Qh={["required"]:!0,default:!1,["type"]:"Boolean"},Xl={["ref"]:"Endpoint"},El={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},kl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Yl={["ref"]:"UseFIPS"},Zl={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},X={},Kl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},$l={["fn"]:"booleanEquals",["argv"]:[Yl,!0]},Vl={["fn"]:"booleanEquals",["argv"]:[Zl,!0]},Fl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Pl={["ref"]:"PartitionResult"},Bl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Pl,"supportsDualStack"]}]},Ul=[{["fn"]:"isSet",["argv"]:[Xl]}],yl=[$l],Ql=[Vl],Fw={version:"1.0",parameters:{Region:Dl,UseDualStack:Qh,UseFIPS:Qh,Endpoint:Dl,UseGlobalEndpoint:Qh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:Ul},El,kl,{["fn"]:"booleanEquals",["argv"]:[Yl,!1]},{["fn"]:"booleanEquals",["argv"]:[Zl,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},Kl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:Ul,rules:[{conditions:yl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Ql,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Xl,properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[El],rules:[{conditions:[kl],rules:[{conditions:[$l,Vl],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Fl]},Bl],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Fl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Pl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:X,headers:X},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:Ql,rules:[{conditions:[Bl],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Kl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:X,headers:X},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},vl=Fw;var Bw=new ql({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Wl=(h,w={})=>{return Bw.get(h,()=>Ml(vl,{endpointParams:h,logger:w.logger}))};zl.aws=Nl;var _l=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??Rl,base64Encoder:h?.base64Encoder??jl,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Wl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Sl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new sl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new rl.NoAuthSigner}],logger:h?.logger??new Ll,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??al,utf8Decoder:h?.utf8Decoder??Tl,utf8Encoder:h?.utf8Encoder??Al}};var w0=(h)=>{Ol(process.version);const w=h0(h),l=()=>w().then(Cl),G=_l(h);return Ih.emitWarningIfUnsupportedVersion(process.version),{...G,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??tl,credentialDefaultProvider:h?.credentialDefaultProvider??Yh,defaultUserAgentProvider:h?.defaultUserAgentProvider??ol({serviceId:G.serviceId,clientVersion:Jl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(d)=>d.getIdentityProvider("aws.auth#sigv4")||(async(S)=>await Yh(S?.__config||{})()),signer:new Ih.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(d)=>d.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new l0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(pl),region:h?.region??f(il,cl),requestHandler:bl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...nl,default:async()=>(await l()).retryMode||el}),sha256:h?.sha256??ul.bind(null,"sha256"),streamCollector:h?.streamCollector??fl,useDualstackEndpoint:h?.useDualstackEndpoint??f(gl),useFipsEndpoint:h?.useFipsEndpoint??f(xl)}};var G0=(h)=>{const w=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(d){const S=w.findIndex((I)=>I.schemeId===d.schemeId);if(S===-1)w.push(d);else w.splice(S,1,d)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(d){l=d},httpAuthSchemeProvider(){return l},setCredentials(d){G=d},credentials(){return G}}},d0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var Sh=(h)=>h,E0=(h,w)=>{const l={...Sh(J0(h)),...Sh(H0(h)),...Sh(I0(h)),...Sh(G0(h))};return w.forEach((G)=>G.configure(l)),{...h,...D0(l),...m0(l),...S0(l),...d0(l)}};class L extends U0{constructor(...[h]){const w=w0(h||{}),l=ml(w),G=y0(l),d=$0(G),S=X0(d),I=k0(S),Q=Z0(I),z=Hl(Q),v=E0(z,h?.extensions||[]);super(v);this.config=v,this.middlewareStack.use(Q0(this.config)),this.middlewareStack.use(V0(this.config)),this.middlewareStack.use(Y0(this.config)),this.middlewareStack.use(K0(this.config)),this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(B0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Il,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class Y extends P0{constructor(h){super(h);Object.setPrototypeOf(this,Y.prototype)}}class mh extends Y{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Y{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Y{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Y{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Y{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Y{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Fh extends Y{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Fh.prototype)}}class Bh extends Y{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Bh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Hh}}),v0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),q0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Hh}}),z0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),M0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Hh}}),N0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),T0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var q=A(Gh(),1);var a0=async(h,w)=>{const l=a;let G;return G=b({...Pw(h,w),[r]:lG,[_]:s}),j(w,l,"/",void 0,G)},s0=async(h,w)=>{const l=a;let G;return G=b({...vw(h,w),[r]:wG,[_]:s}),j(w,l,"/",void 0,G)},r0=async(h,w)=>{const l=a;let G;return G=b({...qw(h,w),[r]:GG,[_]:s}),j(w,l,"/",void 0,G)},_0=async(h,w)=>{const l=a;let G;return G=b({...zw(h,w),[r]:dG,[_]:s}),j(w,l,"/",void 0,G)},b0=async(h,w)=>{const l=a;let G;return G=b({...Mw(h,w),[r]:IG,[_]:s}),j(w,l,"/",void 0,G)},f0=async(h,w)=>{const l=a;let G;return G=b({...Nw(h,w),[r]:SG,[_]:s}),j(w,l,"/",void 0,G)},C0=async(h,w)=>{const l=a;let G;return G=b({...Ww(h,w),[r]:HG,[_]:s}),j(w,l,"/",void 0,G)},O0=async(h,w)=>{const l=a;let G;return G=b({...Tw(h,w),[r]:mG,[_]:s}),j(w,l,"/",void 0,G)},g0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=sw(l.AssumeRoleResult,w),{$metadata:k(h),...G}},x0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=rw(l.AssumeRoleWithSAMLResult,w),{$metadata:k(h),...G}},i0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=_w(l.AssumeRoleWithWebIdentityResult,w),{$metadata:k(h),...G}},c0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=bw(l.DecodeAuthorizationMessageResult,w),{$metadata:k(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=Ow(l.GetAccessKeyInfoResult,w),{$metadata:k(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=gw(l.GetCallerIdentityResult,w),{$metadata:k(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=xw(l.GetFederationTokenResult,w),{$metadata:k(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return R(h,w);const l=await q.parseXmlBody(h.body,w);let G={};return G=iw(l.GetSessionTokenResult,w),{$metadata:k(h),...G}},R=async(h,w)=>{const l={...h,body:await q.parseXmlErrorBody(h.body,w)},G=JG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Uw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Zw(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await $w(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Vw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Qw(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Yw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await yw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Xw(l,w);default:const d=l.body;return hG({output:h,parsedBody:d.Error,errorCode:G})}},Uw=async(h,w)=>{const l=h.body,G=fw(l.Error,w),d=new mh({$metadata:k(h),...G});return T(d,l)},yw=async(h,w)=>{const l=h.body,G=cw(l.Error,w),d=new Fh({$metadata:k(h),...G});return T(d,l)},Qw=async(h,w)=>{const l=h.body,G=ew(l.Error,w),d=new kh({$metadata:k(h),...G});return T(d,l)},Xw=async(h,w)=>{const l=h.body,G=pw(l.Error,w),d=new Bh({$metadata:k(h),...G});return T(d,l)},Yw=async(h,w)=>{const l=h.body,G=nw(l.Error,w),d=new Kh({$metadata:k(h),...G});return T(d,l)},Zw=async(h,w)=>{const l=h.body,G=ow(l.Error,w),d=new Jh({$metadata:k(h),...G});return T(d,l)},$w=async(h,w)=>{const l=h.body,G=uw(l.Error,w),d=new Dh({$metadata:k(h),...G});return T(d,l)},Vw=async(h,w)=>{const l=h.body,G=tw(l.Error,w),d=new Eh({$metadata:k(h),...G});return T(d,l)},Pw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const G=u0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([d,S])=>{const I=`Tags.${d}`;l[I]=S})}if(h[gh]!=null){const G=aw(h[gh],w);if(h[gh]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([d,S])=>{const I=`TransitiveTagKeys.${d}`;l[I]=S})}if(h[vh]!=null)l[vh]=h[vh];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[P]!=null)l[P]=h[P];if(h[jh]!=null){const G=Rw(h[jh],w);if(h[jh]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([d,S])=>{const I=`ProvidedContexts.${d}`;l[I]=S})}return l},vw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Lh]!=null)l[Lh]=h[Lh];if(h[bh]!=null)l[bh]=h[bh];if(h[$]!=null){const G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},qw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[ch]!=null)l[ch]=h[ch];if(h[ah]!=null)l[ah]=h[ah];if(h[$]!=null){const G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},zw=(h,w)=>{const l={};if(h[qh]!=null)l[qh]=h[qh];return l},Mw=(h,w)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Nw=(h,w)=>{return{}},Ww=(h,w)=>{const l={};if(h[Th]!=null)l[Th]=h[Th];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const G=Uh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([d,S])=>{const I=`PolicyArns.${d}`;l[I]=S})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const G=u0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([d,S])=>{const I=`Tags.${d}`;l[I]=S})}return l},Tw=(h,w)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Uh=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=Aw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},Aw=(h,w)=>{const l={};if(h[eh]!=null)l[eh]=h[eh];return l},Lw=(h,w)=>{const l={};if(h[Rh]!=null)l[Rh]=h[Rh];if(h[$h]!=null)l[$h]=h[$h];return l},Rw=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=Lw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},jw=(h,w)=>{const l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[ih]!=null)l[ih]=h[ih];return l},aw=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;l[`member.${G}`]=d,G++}return l},u0=(h,w)=>{const l={};let G=1;for(let d of h){if(d===null)continue;const S=jw(d,w);Object.entries(S).forEach(([I,Q])=>{l[`member.${G}.${I}`]=Q}),G++}return l},nh=(h,w)=>{const l={};if(h[Zh]!=null)l[Zh]=H(h[Zh]);if(h[N]!=null)l[N]=H(h[N]);return l},sw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[M]!=null)l[M]=nh(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[P]!=null)l[P]=H(h[P]);return l},rw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[M]!=null)l[M]=nh(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[rh]!=null)l[rh]=H(h[rh]);if(h[Ch]!=null)l[Ch]=H(h[Ch]);if(h[Nh]!=null)l[Nh]=H(h[Nh]);if(h[x]!=null)l[x]=H(h[x]);if(h[Ah]!=null)l[Ah]=H(h[Ah]);if(h[P]!=null)l[P]=H(h[P]);return l},_w=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[fh]!=null)l[fh]=H(h[fh]);if(h[M]!=null)l[M]=nh(h[M],w);if(h[V]!=null)l[V]=u(h[V]);if(h[sh]!=null)l[sh]=H(h[sh]);if(h[x]!=null)l[x]=H(h[x]);if(h[P]!=null)l[P]=H(h[P]);return l},t=(h,w)=>{const l={};if(h[O]!=null)l[O]=H(h[O]);if(h[_h]!=null)l[_h]=H(h[_h]);if(h[Oh]!=null)l[Oh]=H(h[Oh]);if(h[Ph]!=null)l[Ph]=L0(R0(h[Ph]));return l},bw=(h,w)=>{const l={};if(h[Vh]!=null)l[Vh]=H(h[Vh]);return l},fw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},Cw=(h,w)=>{const l={};if(h[Mh]!=null)l[Mh]=H(h[Mh]);if(h[N]!=null)l[N]=H(h[N]);return l},Ow=(h,w)=>{const l={};if(h[g]!=null)l[g]=H(h[g]);return l},gw=(h,w)=>{const l={};if(h[xh]!=null)l[xh]=H(h[xh]);if(h[g]!=null)l[g]=H(h[g]);if(h[N]!=null)l[N]=H(h[N]);return l},xw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[zh]!=null)l[zh]=Cw(h[zh],w);if(h[V]!=null)l[V]=u(h[V]);return l},iw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);return l},cw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},ew=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},pw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},nw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},ow=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},uw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},tw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},k=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var hG=j0(Y),j=async(h,w,l,G,d)=>{const{hostname:S,protocol:I="https",port:Q,path:z}=await h.endpoint(),v={protocol:I,hostname:S,port:Q,method:"POST",path:z.endsWith("/")?z.slice(0,-1)+l:z+l,headers:w};if(G!==void 0)v.hostname=G;if(d!==void 0)v.body=d;return new A0(v)},a={"content-type":"application/x-www-form-urlencoded"},s="2011-06-15",r="Action",O="AccessKeyId",lG="AssumeRole",Zh="AssumedRoleId",M="AssumedRoleUser",wG="AssumeRoleWithSAML",GG="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",U="Credentials",$h="ContextAssertion",dG="DecodeAuthorizationMessage",Vh="DecodedMessage",y="DurationSeconds",Ph="Expiration",vh="ExternalId",qh="EncodedMessage",zh="FederatedUser",Mh="FederatedUserId",IG="GetAccessKeyInfo",SG="GetCallerIdentity",HG="GetFederationToken",mG="GetSessionToken",Nh="Issuer",Wh="Key",Th="Name",Ah="NameQualifier",Z="Policy",$="PolicyArns",Lh="PrincipalArn",Rh="ProviderArn",jh="ProvidedContexts",ah="ProviderId",V="PackedPolicySize",sh="Provider",W="RoleArn",i="RoleSessionName",rh="Subject",_h="SecretAccessKey",bh="SAMLAssertion",fh="SubjectFromWebIdentityToken",P="SourceIdentity",c="SerialNumber",Ch="SubjectType",Oh="SessionToken",e="Tags",p="TokenCode",gh="TransitiveTagKeys",xh="UserId",_="Version",ih="Value",ch="WebIdentityToken",eh="arn",m="message",b=(h)=>Object.entries(h).map(([w,l])=>ph(w)+"="+ph(l)).join("&"),JG=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,v0).ser(a0).de(g0).build(){}class oh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(q0,z0).ser(s0).de(x0).build(){}class lh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(M0,N0).ser(r0).de(i0).build(){}class uh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(_0).de(c0).build(){}class th extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(b0).de(e0).build(){}class hl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(f0).de(p0).build(){}class ll extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,W0).ser(C0).de(n0).build(){}class wl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,T0).ser(O0).de(o0).build(){}var DG={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:oh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:uh,GetAccessKeyInfoCommand:th,GetCallerIdentityCommand:hl,GetFederationTokenCommand:ll,GetSessionTokenCommand:wl};class hw extends L{}t0(DG,hw);var lw="us-east-1",ww=(h)=>{if(typeof h?.Arn==="string"){const w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},Gw=async(h,w,l)=>{const G=typeof h==="function"?await h():h,d=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${d} (parent client)`,`${lw} (STS default)`),G??d??lw},dw=(h,w)=>{let l,G;return async(d,S)=>{if(G=d,!l){const{logger:v=h?.parentClientConfig?.logger,region:n,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:yh}=h,mw=await Gw(n,h?.parentClientConfig?.region,yh),Jw=!Sw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:mw,requestHandler:Jw?wh:void 0,logger:v})}const{Credentials:I,AssumedRoleUser:Q}=await l.send(new hh(S));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${S.RoleArn}`);const z=ww(Q);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...z&&{accountId:z}}}},Iw=(h,w)=>{let l;return async(G)=>{if(!l){const{logger:Q=h?.parentClientConfig?.logger,region:z,requestHandler:v=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,wh=await Gw(z,h?.parentClientConfig?.region,n),yh=!Sw(v);l=new w({region:wh,requestHandler:yh?v:void 0,logger:Q})}const{Credentials:d,AssumedRoleUser:S}=await l.send(new lh(G));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);const I=ww(S);return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...I&&{accountId:I}}}};var Sw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var Hw=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let d of w)this.middlewareStack.use(d)}}},EG=(h={},w)=>dw(h,Hw(L,w)),kG=(h={},w)=>Iw(h,Hw(L,w)),aI=(h)=>(w)=>h({roleAssumer:EG(w),roleAssumerWithWebIdentity:kG(w),...w});export{kG as getDefaultRoleAssumerWithWebIdentity,EG as getDefaultRoleAssumer,aI as decorateDefaultCredentialProvider,U0 as __Client,Y as STSServiceException,L as STSClient,hw as STS,Eh as RegionDisabledException,Dh as PackedPolicyTooLargeException,Jh as MalformedPolicyDocumentException,Kh as InvalidIdentityTokenException,Bh as InvalidAuthorizationMessageException,kh as IDPRejectedClaimException,Fh as IDPCommunicationErrorException,T0 as GetSessionTokenResponseFilterSensitiveLog,wl as GetSessionTokenCommand,W0 as GetFederationTokenResponseFilterSensitiveLog,ll as GetFederationTokenCommand,hl as GetCallerIdentityCommand,th as GetAccessKeyInfoCommand,mh as ExpiredTokenException,uh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,N0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,M0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,z0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,q0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,oh as AssumeRoleWithSAMLCommand,v0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};