create-sailor 1.9.4 → 1.9.6

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 (60) hide show
  1. package/README.md +10 -8
  2. package/dist/index.js +138 -137
  3. package/package.json +17 -15
  4. package/templates/backends/gateway/package.json +1 -1
  5. package/templates/docs/docusaurus/package.json +1 -1
  6. package/templates/docs/fumadocs/package.json +1 -1
  7. package/templates/docs/mintlify/package.json +1 -1
  8. package/templates/docs/nextra/package.json +1 -1
  9. package/templates/docs/vitepress/package.json +1 -1
  10. package/templates/orm/drizzle/package.json +1 -1
  11. package/dist/aws-kms-FFRN23DK.js +0 -1
  12. package/dist/bowser-2VXD6AQS.js +0 -11
  13. package/dist/chunk-5ECPN42W.js +0 -1
  14. package/dist/chunk-6MSNEPUX.js +0 -0
  15. package/dist/chunk-A3H5SUSR.js +0 -8
  16. package/dist/chunk-AN6QWW3N.js +0 -1
  17. package/dist/chunk-CVCZBECH.js +0 -1
  18. package/dist/chunk-GA44DNS2.js +0 -1
  19. package/dist/chunk-IYWUY3VA.js +0 -1
  20. package/dist/chunk-LDZWCNWB.js +0 -0
  21. package/dist/chunk-M3NEWJ7L.js +0 -1
  22. package/dist/chunk-MGGNSWUA.js +0 -3
  23. package/dist/chunk-MYIHTCRS.js +0 -4
  24. package/dist/chunk-PA4CKDRJ.js +0 -1
  25. package/dist/chunk-QSLKOXQ6.js +0 -1
  26. package/dist/chunk-S4HCBMFP.js +0 -1
  27. package/dist/chunk-SYWJHPRX.js +0 -0
  28. package/dist/chunk-TW5BOTVX.js +0 -0
  29. package/dist/chunk-UWHWNXNX.js +0 -19
  30. package/dist/chunk-WJLTO7JW.js +0 -0
  31. package/dist/chunk-X6LE6K3W.js +0 -0
  32. package/dist/chunk-XE3I3HCZ.js +0 -40
  33. package/dist/chunk-Z4YWESTY.js +0 -2
  34. package/dist/chunk-ZIBRKYXP.js +0 -23
  35. package/dist/chunk-ZJ3BTCD6.js +0 -17
  36. package/dist/credits-UUPQKRQZ.js +0 -2802
  37. package/dist/dist-23KDUT4O.js +0 -1
  38. package/dist/dist-ZZCU5PKC.js +0 -5
  39. package/dist/dist-es-7HF5URFJ.js +0 -1
  40. package/dist/dist-es-BORZTE76.js +0 -1
  41. package/dist/dist-es-CN2GMFBK.js +0 -1
  42. package/dist/dist-es-FQ6CEUEU.js +0 -1
  43. package/dist/dist-es-FSE4MSDA.js +0 -5
  44. package/dist/dist-es-H47VUS6Q.js +0 -2
  45. package/dist/dist-es-JCIK4C4M.js +0 -2
  46. package/dist/dist-es-MFZXYPBY.js +0 -1
  47. package/dist/dist-es-PREZ4TU2.js +0 -1
  48. package/dist/dist-es-TCZQ4KMP.js +0 -2
  49. package/dist/dist-es-Y7VP7FI6.js +0 -2
  50. package/dist/dist-es-YN4LRIZR.js +0 -5
  51. package/dist/event-streams-TNY7XPBF.js +0 -1
  52. package/dist/loadSso-2XZQIDZP.js +0 -1
  53. package/dist/loadSso-FBBI5PDJ.js +0 -1
  54. package/dist/local-6WWVOMA7.js +0 -1
  55. package/dist/query_compiler_fast_bg.postgresql-JA2BFVW5.js +0 -2
  56. package/dist/query_compiler_fast_bg.postgresql.wasm-base64-URHQ2Y3Y.js +0 -1
  57. package/dist/signin-CJMG23UU.js +0 -1
  58. package/dist/sso-oidc-26OCCRMC.js +0 -1
  59. package/dist/sts-4U2U3ZK4.js +0 -1
  60. package/dist/sts-CP4OREEC.js +0 -1
@@ -1 +0,0 @@
1
- import{a as Ne}from"./chunk-M3NEWJ7L.js";import{a as Re,b as Oe,c as Te,d as ye,e as ke,f as we,g as He,h as Ve,i as qe}from"./chunk-GA44DNS2.js";import{A as be,D as Fe,E as Ue,F as $e,G as Me,b as me,c as ue,f as de,g as le,l as ge,m as Pe,o as ve,t as xe,u as Ie,z as De}from"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import{a as Ce}from"./chunk-MGGNSWUA.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{B as fe,E as Ee,F as Se,G as _e,H as Ae,b as V,c as L,d as j,e as B,g as G,h as z,i as K,j as X,l as Q,n as ee,o as te,p as re,r as oe,t as ne,u as se,v as he}from"./chunk-A3H5SUSR.js";import{A as M,C as q,E as T,F as W,G as Y,H as J,I as Z,R as ae,S as ce,T as pe,e as F,i as O,j as U,y as p,z as $}from"./chunk-Z4YWESTY.js";import{w as ie}from"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var Le=async(e,t,r)=>({operation:F(t).operation,region:await O(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Rt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Ot(e){return{schemeId:"smithy.api#noAuth"}}var je=e=>{let t=[];return e.operation==="CreateOAuth2Token"?t.push(Ot(e)):t.push(Rt(e)),t},Be=e=>{let t=xe(e);return Object.assign(t,{authSchemePreference:O(e.authSchemePreference??[])})};var Ge=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"}),ze={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var l="ref",d=-1,f=!0,Ke="isSet",Ye="PartitionResult",E="booleanEquals",k="getAttr",y="stringEquals",Xe={[l]:"Endpoint"},N={[l]:Ye},D={fn:k,argv:[N,"name"]},m={},Qe=[{[l]:"Region"}],We={conditions:[[Ke,[Xe]],[Ke,Qe],["aws.partition",Qe,Ye],[E,[{[l]:"UseFIPS"},f]],[E,[{[l]:"UseDualStack"},f]],[E,[{fn:k,argv:[N,"supportsDualStack"]},f]],[E,[{fn:k,argv:[N,"supportsFIPS"]},f]],[y,[D,"aws"]],[y,[D,"aws-cn"]],[y,[D,"aws-us-gov"]]],results:[[d],[d,"Invalid Configuration: FIPS and custom endpoint are not supported"],[d,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Xe,m],["https://{Region}.signin.aws.amazon.com",m],["https://{Region}.signin.amazonaws.cn",m],["https://{Region}.signin.amazonaws-us-gov.com",m],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",m],[d,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",m],[d,"FIPS is enabled but this partition does not support FIPS"],["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",m],[d,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",m],[d,"Invalid Configuration: Missing Region"]]},Tt=2,n=1e8,yt=new Int32Array([-1,1,-1,0,15,3,1,4,n+14,2,5,n+14,3,11,6,4,10,7,7,n+4,8,8,n+5,9,9,n+6,n+13,5,n+11,n+12,4,13,12,6,n+9,n+10,5,14,n+8,6,n+7,n+8,3,n+1,16,4,n+2,n+3]),Je=ee.from(yt,Tt,We.conditions,We.results);var Dt=new te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ze=(e,t={})=>Dt.get(e,()=>oe(Je,{endpointParams:e,logger:t.logger}));re.aws=ge;var c=class e extends B{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var S=class e extends c{name="AccessDeniedException";$fault="client";error;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},_=class e extends c{name="InternalServerException";$fault="server";error;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},A=class e extends c{name="TooManyRequestsError";$fault="client";error;constructor(t){super({name:"TooManyRequestsError",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},P=class e extends c{name="ValidationException";$fault="client";error;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}};var kt="AccessDeniedException",Nt="AccessToken",wt="CreateOAuth2Token",Ht="CreateOAuth2TokenRequest",bt="CreateOAuth2TokenRequestBody",Ft="CreateOAuth2TokenResponseBody",Ut="CreateOAuth2TokenResponse",$t="InternalServerException",Mt="RefreshToken",Vt="TooManyRequestsError",qt="ValidationException",et="accessKeyId",tt="accessToken",w="client",rt="clientId",ot="codeVerifier",Lt="code",u="error",nt="expiresIn",st="grantType",jt="http",H="httpError",it="idToken",s="jsonName",x="message",v="refreshToken",at="redirectUri",ut="smithy.ts.sdk.synthetic.com.amazonaws.signin",ct="secretAccessKey",pt="sessionToken",Bt="server",Gt="tokenInput",zt="tokenOutput",mt="tokenType",a="com.amazonaws.signin",dt=T.for(ut),Kt=[-3,ut,"SigninServiceException",0,[],[]];dt.registerError(Kt,c);var g=T.for(a),Xt=[-3,a,kt,{[u]:w},[u,x],[0,0],2];g.registerError(Xt,S);var Qt=[-3,a,$t,{[u]:Bt,[H]:500},[u,x],[0,0],2];g.registerError(Qt,_);var Wt=[-3,a,Vt,{[u]:w,[H]:429},[u,x],[0,0],2];g.registerError(Wt,A);var Yt=[-3,a,qt,{[u]:w,[H]:400},[u,x],[0,0],2];g.registerError(Yt,P);var lt=[dt,g],gt=[0,a,Mt,8,0],Jt=[3,a,Nt,8,[et,ct,pt],[[0,{[s]:et}],[0,{[s]:ct}],[0,{[s]:pt}]],3],Zt=[3,a,Ht,0,[Gt],[[()=>er,16]],1],er=[3,a,bt,0,[rt,st,Lt,at,ot,v],[[0,{[s]:rt}],[0,{[s]:st}],0,[0,{[s]:at}],[0,{[s]:ot}],[()=>gt,{[s]:v}]],2],tr=[3,a,Ut,0,[zt],[[()=>rr,16]],1],rr=[3,a,Ft,0,[tt,mt,nt,v,it],[[()=>Jt,{[s]:tt}],[0,{[s]:mt}],[1,{[s]:nt}],[()=>gt,{[s]:v}],[0,{[s]:it}]],4],ht=[9,a,wt,{[jt]:["POST","/v1/token",200]},()=>Zt,()=>tr];var ft=e=>({apiVersion:"2023-01-01",base64Decoder:e?.base64Decoder??Fe,base64Encoder:e?.base64Encoder??Me,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ze,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??je,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Pe},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new le}],logger:e?.logger??new Q,protocol:e?.protocol??Ie,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:lt,version:"2023-01-01",serviceTarget:"Signin"},serviceId:e?.serviceId??"Signin",urlParser:e?.urlParser??U,utf8Decoder:e?.utf8Decoder??Ue,utf8Encoder:e?.utf8Encoder??$e});var Et=e=>{z(process.version);let t=Z(e),r=()=>t().then(G),i=ft(e);he(process.version);let o={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??p(ve,o),bodyLengthChecker:e?.bodyLengthChecker??be,defaultUserAgentProvider:e?.defaultUserAgentProvider??we({serviceId:i.serviceId,clientVersion:Ne.version}),maxAttempts:e?.maxAttempts??p(Ee,e),region:e?.region??p(W,{...Y,...o}),requestHandler:Ce.create(e?.requestHandler??r),retryMode:e?.retryMode??p({..._e,default:async()=>(await r()).retryMode||fe},e),sha256:e?.sha256??ie.bind(null,"sha256"),streamCollector:e?.streamCollector??Re,useDualstackEndpoint:e?.useDualstackEndpoint??p($,o),useFipsEndpoint:e?.useFipsEndpoint??p(M,o),userAgentAppId:e?.userAgentAppId??p(He,o)}};var St=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(o){let h=t.findIndex(R=>R.schemeId===o.schemeId);h===-1?t.push(o):t.splice(h,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){i=o},credentials(){return i}}},_t=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var At=(e,t)=>{let r=Object.assign(Ve(e),K(e),ae(e),St(e));return t.forEach(i=>i.configure(r)),Object.assign(e,qe(r),X(r),ce(r),_t(r))};var I=class extends V{config;constructor(...[t]){let r=Et(t||{});super(r),this.initConfig=r;let i=Ge(r),o=De(i),h=Se(o),R=J(h),Pt=R,vt=ne(Pt),xt=Be(vt),It=At(xt,t?.extensions||[]);this.config=It,this.middlewareStack.use(q(this.config)),this.middlewareStack.use(ke(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(pe(this.config)),this.middlewareStack.use(Oe(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(ye(this.config)),this.middlewareStack.use(me(this.config,{httpAuthSchemeParametersProvider:Le,identityProviderConfigProvider:async Ct=>new de({"aws.auth#sigv4":Ct.credentials})})),this.middlewareStack.use(ue(this.config))}destroy(){super.destroy()}};var C=class extends L.classBuilder().ep(ze).m(function(t,r,i,o){return[se(i,t.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(ht).build(){};var or={CreateOAuth2TokenCommand:C},b=class extends I{};j(or,b);var Oo={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};export{L as $Command,S as AccessDeniedException,Xt as AccessDeniedException$,Jt as AccessToken$,ht as CreateOAuth2Token$,C as CreateOAuth2TokenCommand,Zt as CreateOAuth2TokenRequest$,er as CreateOAuth2TokenRequestBody$,tr as CreateOAuth2TokenResponse$,rr as CreateOAuth2TokenResponseBody$,_ as InternalServerException,Qt as InternalServerException$,Oo as OAuth2ErrorCode,b as Signin,I as SigninClient,c as SigninServiceException,Kt as SigninServiceException$,A as TooManyRequestsError,Wt as TooManyRequestsError$,P as ValidationException,Yt as ValidationException$,V as __Client,lt as errorTypeRegistries};
@@ -1 +0,0 @@
1
- import{a as $e}from"./chunk-M3NEWJ7L.js";import{a as Te,b as Re,c as ke,d as we,e as Ne,f as Ue,g as He,h as Ve,i as ze}from"./chunk-GA44DNS2.js";import{A as Fe,D as Me,E as Ge,F as je,G as Ke,b as le,c as he,f as fe,g as ge,l as Ee,m as Ce,o as Oe,t as Ae,u as De,z as be}from"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import{a as ye}from"./chunk-MGGNSWUA.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{B as Se,E as _e,F as ve,G as Ie,H as Pe,b as V,c as q,d as L,e as B,g as Y,h as W,i as J,j as X,l as Q,n as oe,o as ne,p as ie,r as se,t as ce,u as ae,v as xe}from"./chunk-A3H5SUSR.js";import{A as K,C as z,E as $,F as Z,G as ee,H as te,I as re,R as de,S as ue,T as me,e as M,i as N,j as G,y as l,z as j}from"./chunk-Z4YWESTY.js";import{w as pe}from"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var qe=async(e,t,n)=>({operation:M(t).operation,region:await N(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function _t(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function vt(e){return{schemeId:"smithy.api#noAuth"}}var Le=e=>{let t=[];return e.operation==="CreateToken"?t.push(vt(e)):t.push(_t(e)),t},Be=e=>{let t=Ae(e);return Object.assign(t,{authSchemePreference:N(e.authSchemePreference??[])})};var Ye=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),We={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var g="ref",h=-1,x=!0,Je="isSet",et="PartitionResult",S="booleanEquals",U="getAttr",Xe={[g]:"Endpoint"},H={[g]:et},f={},Qe=[{[g]:"Region"}],Ze={conditions:[[Je,[Xe]],[Je,Qe],["aws.partition",Qe,et],[S,[{[g]:"UseFIPS"},x]],[S,[{[g]:"UseDualStack"},x]],[S,[{fn:U,argv:[H,"supportsDualStack"]},x]],[S,[{fn:U,argv:[H,"supportsFIPS"]},x]],["stringEquals",[{fn:U,argv:[H,"name"]},"aws-us-gov"]]],results:[[h],[h,"Invalid Configuration: FIPS and custom endpoint are not supported"],[h,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Xe,f],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",f],[h,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",f],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",f],[h,"FIPS is enabled but this partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",f],[h,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",f],[h,"Invalid Configuration: Missing Region"]]},It=2,c=1e8,Pt=new Int32Array([-1,1,-1,0,13,3,1,4,c+12,2,5,c+12,3,8,6,4,7,c+11,5,c+9,c+10,4,11,9,6,10,c+8,7,c+6,c+7,5,12,c+5,6,c+4,c+5,3,c+1,14,4,c+2,c+3]),tt=oe.from(Pt,It,Ze.conditions,Ze.results);var Ct=new ne({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),rt=(e,t={})=>Ct.get(e,()=>se(tt,{endpointParams:e,logger:t.logger}));ie.aws=Ee;var i=class e extends B{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var _=class e extends i{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},v=class e extends i{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(t){super({name:"AuthorizationPendingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},I=class e extends i{name="ExpiredTokenException";$fault="client";error;error_description;constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},P=class e extends i{name="InternalServerException";$fault="server";error;error_description;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},C=class e extends i{name="InvalidClientException";$fault="client";error;error_description;constructor(t){super({name:"InvalidClientException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},O=class e extends i{name="InvalidGrantException";$fault="client";error;error_description;constructor(t){super({name:"InvalidGrantException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},A=class e extends i{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},D=class e extends i{name="InvalidScopeException";$fault="client";error;error_description;constructor(t){super({name:"InvalidScopeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},y=class e extends i{name="SlowDownException";$fault="client";error;error_description;constructor(t){super({name:"SlowDownException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},T=class e extends i{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(t){super({name:"UnauthorizedClientException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},R=class e extends i{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(t){super({name:"UnsupportedGrantTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}};var Ot="AccessDeniedException",At="AuthorizationPendingException",Dt="AccessToken",yt="ClientSecret",Tt="CreateToken",Rt="CreateTokenRequest",kt="CreateTokenResponse",wt="CodeVerifier",bt="ExpiredTokenException",Nt="InvalidClientException",$t="InvalidGrantException",Ut="InvalidRequestException",Ht="InternalServerException",Ft="InvalidScopeException",Mt="IdToken",Gt="RefreshToken",jt="SlowDownException",Kt="UnauthorizedClientException",Vt="UnsupportedGrantTypeException",zt="accessToken",m="client",qt="clientId",Lt="clientSecret",Bt="codeVerifier",Yt="code",Wt="deviceCode",r="error",Jt="expiresIn",d="error_description",Xt="grantType",Qt="http",u="httpError",Zt="idToken",ot="reason",nt="refreshToken",er="redirectUri",it="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",tr="scope",rr="server",or="tokenType",o="com.amazonaws.ssooidc",st=$.for(it),nr=[-3,it,"SSOOIDCServiceException",0,[],[]];st.registerError(nr,i);var p=$.for(o),ir=[-3,o,Ot,{[r]:m,[u]:400},[r,ot,d],[0,0,0]];p.registerError(ir,_);var sr=[-3,o,At,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(sr,v);var cr=[-3,o,bt,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(cr,I);var ar=[-3,o,Ht,{[r]:rr,[u]:500},[r,d],[0,0]];p.registerError(ar,P);var pr=[-3,o,Nt,{[r]:m,[u]:401},[r,d],[0,0]];p.registerError(pr,C);var dr=[-3,o,$t,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(dr,O);var ur=[-3,o,Ut,{[r]:m,[u]:400},[r,ot,d],[0,0,0]];p.registerError(ur,A);var mr=[-3,o,Ft,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(mr,D);var lr=[-3,o,jt,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(lr,y);var hr=[-3,o,Kt,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(hr,T);var fr=[-3,o,Vt,{[r]:m,[u]:400},[r,d],[0,0]];p.registerError(fr,R);var ct=[st,p],gr=[0,o,Dt,8,0],Er=[0,o,yt,8,0],xr=[0,o,wt,8,0],Sr=[0,o,Mt,8,0],at=[0,o,Gt,8,0],_r=[3,o,Rt,0,[qt,Lt,Xt,Wt,Yt,nt,tr,er,Bt],[0,[()=>Er,0],0,0,0,[()=>at,0],64,0,[()=>xr,0]],3],vr=[3,o,kt,0,[zt,or,Jt,nt,Zt],[[()=>gr,0],0,1,[()=>at,0],[()=>Sr,0]]];var pt=[9,o,Tt,{[Qt]:["POST","/token",200]},()=>_r,()=>vr];var dt=e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Me,base64Encoder:e?.base64Encoder??Ke,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??rt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Ce},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ge}],logger:e?.logger??new Q,protocol:e?.protocol??De,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:ct,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??G,utf8Decoder:e?.utf8Decoder??Ge,utf8Encoder:e?.utf8Encoder??je});var ut=e=>{W(process.version);let t=re(e),n=()=>t().then(Y),a=dt(e);xe(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??l(Oe,s),bodyLengthChecker:e?.bodyLengthChecker??Fe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ue({serviceId:a.serviceId,clientVersion:$e.version}),maxAttempts:e?.maxAttempts??l(_e,e),region:e?.region??l(Z,{...ee,...s}),requestHandler:ye.create(e?.requestHandler??n),retryMode:e?.retryMode??l({...Ie,default:async()=>(await n()).retryMode||Se},e),sha256:e?.sha256??pe.bind(null,"sha256"),streamCollector:e?.streamCollector??Te,useDualstackEndpoint:e?.useDualstackEndpoint??l(j,s),useFipsEndpoint:e?.useFipsEndpoint??l(K,s),userAgentAppId:e?.userAgentAppId??l(He,s)}};var mt=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,a=e.credentials;return{setHttpAuthScheme(s){let E=t.findIndex(b=>b.schemeId===s.schemeId);E===-1?t.push(s):t.splice(E,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){n=s},httpAuthSchemeProvider(){return n},setCredentials(s){a=s},credentials(){return a}}},lt=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var ht=(e,t)=>{let n=Object.assign(Ve(e),J(e),de(e),mt(e));return t.forEach(a=>a.configure(n)),Object.assign(e,ze(n),X(n),ue(n),lt(n))};var k=class extends V{config;constructor(...[t]){let n=ut(t||{});super(n),this.initConfig=n;let a=Ye(n),s=be(a),E=ve(s),b=te(E),ft=b,gt=ce(ft),Et=Be(gt),xt=ht(Et,t?.extensions||[]);this.config=xt,this.middlewareStack.use(z(this.config)),this.middlewareStack.use(Ne(this.config)),this.middlewareStack.use(Pe(this.config)),this.middlewareStack.use(me(this.config)),this.middlewareStack.use(Re(this.config)),this.middlewareStack.use(ke(this.config)),this.middlewareStack.use(we(this.config)),this.middlewareStack.use(le(this.config,{httpAuthSchemeParametersProvider:qe,identityProviderConfigProvider:async St=>new fe({"aws.auth#sigv4":St.credentials})})),this.middlewareStack.use(he(this.config))}destroy(){super.destroy()}};var w=class extends q.classBuilder().ep(We).m(function(t,n,a,s){return[ae(a,t.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(pt).build(){};var Ir={CreateTokenCommand:w},F=class extends k{};L(Ir,F);var Lo={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},Bo={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"};export{q as $Command,_ as AccessDeniedException,ir as AccessDeniedException$,Lo as AccessDeniedExceptionReason,v as AuthorizationPendingException,sr as AuthorizationPendingException$,pt as CreateToken$,w as CreateTokenCommand,_r as CreateTokenRequest$,vr as CreateTokenResponse$,I as ExpiredTokenException,cr as ExpiredTokenException$,P as InternalServerException,ar as InternalServerException$,C as InvalidClientException,pr as InvalidClientException$,O as InvalidGrantException,dr as InvalidGrantException$,A as InvalidRequestException,ur as InvalidRequestException$,Bo as InvalidRequestExceptionReason,D as InvalidScopeException,mr as InvalidScopeException$,F as SSOOIDC,k as SSOOIDCClient,i as SSOOIDCServiceException,nr as SSOOIDCServiceException$,y as SlowDownException,lr as SlowDownException$,T as UnauthorizedClientException,hr as UnauthorizedClientException$,R as UnsupportedGrantTypeException,fr as UnsupportedGrantTypeException$,V as __Client,ct as errorTypeRegistries};
@@ -1 +0,0 @@
1
- import{a as At}from"./chunk-AN6QWW3N.js";import{a as ut}from"./chunk-M3NEWJ7L.js";import{a as st,b as it,c as at,d as ct,e as lt,f as dt,g as mt,h as vt,i as Pt}from"./chunk-GA44DNS2.js";import{A as gt,D as ht,E as St,F as ft,G as Et,b as Ke,c as Me,f as je,g as L,l as qe,m as M,n as j,o as Je,p as Ze,q as et,r as tt,s as ie,t as rt,v as ot,z as pt}from"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import{a as nt}from"./chunk-MGGNSWUA.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{B as Be,E as ze,F as Xe,G as Ye,H as Qe,b as ve,c as U,d as Ae,e as ye,g as xe,h as Ce,i as _e,j as Ie,l as Re,m as be,n as Oe,o as Ne,p as We,r as He,t as $e,u as F,v as Ge,w as K}from"./chunk-A3H5SUSR.js";import{A as Ee,C as Pe,E as se,F as we,G as Te,H as De,I as ke,R as Ue,S as Fe,T as Le,e as oe,i as ne,j as Se,y as E,z as fe}from"./chunk-Z4YWESTY.js";import{w as Ve}from"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var q="X-Amz-S3session-Token",ae=q.toLowerCase();var W=class extends tt{async signWithCredentials(t,r,n){let o=yt(r);t.headers[ae]=r.sessionToken;let i=this;return xt(i,o),i.signRequest(t,n??{})}async presignWithCredentials(t,r,n){let o=yt(r);return delete t.headers[ae],t.headers[q]=r.sessionToken,t.query=t.query??{},t.query[q]=r.sessionToken,xt(this,o),this.presign(t,n)}};function yt(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function xt(e,t){let r=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),n=e.credentialProvider,o=()=>(clearTimeout(r),e.credentialProvider=n,Promise.resolve(t));e.credentialProvider=o}var H={CrtSignerV4:null};var D=class{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return typeof H.CrtSignerV4=="function"?"crt":typeof ie.SignatureV4a=="function"?"js":"none"}constructor(t){this.sigv4Signer=new W(t),this.signerOptions=t}async sign(t,r={}){return r.signingRegion==="*"?this.getSigv4aSigner().sign(t,r):this.sigv4Signer.sign(t,r)}async signWithCredentials(t,r,n={}){if(n.signingRegion==="*"){let o=this.getSigv4aSigner(),i=H.CrtSignerV4;if(i&&o instanceof i)return o.signWithCredentials(t,r,n);throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(t,r,n)}async presign(t,r={}){if(r.signingRegion==="*"){let n=this.getSigv4aSigner(),o=H.CrtSignerV4;if(o&&n instanceof o)return n.presign(t,r);throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(t,r)}async presignWithCredentials(t,r,n={}){if(n.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,r,n)}getSigv4aSigner(){if(!this.sigv4aSigner){let t=H.CrtSignerV4,r=ie.SignatureV4a;if(this.signerOptions.runtime==="node"){if(!t&&!r)throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");if(t&&typeof t=="function")this.sigv4aSigner=new t({...this.signerOptions,signingAlgorithm:1});else if(r&&typeof r=="function")this.sigv4aSigner=new r({...this.signerOptions});else throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt")}else{if(!r||typeof r!="function")throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");this.sigv4aSigner=new r({...this.signerOptions})}}return this.sigv4aSigner}};var b="ref",x=-1,$=!0,Ct="isSet",bt="PartitionResult",V="booleanEquals",p="stringEquals",ce="getAttr",_t="us-east-1",It="sigv4",Rt="sts",wt="https://sts.{Region}.{PartitionResult#dnsSuffix}",Tt={[b]:"Endpoint"},l={[b]:"Region"},pe={[b]:bt},k={},Dt=[l],kt={conditions:[[Ct,[Tt]],[Ct,Dt],["aws.partition",Dt,bt],[V,[{[b]:"UseFIPS"},$]],[V,[{[b]:"UseDualStack"},$]],[p,[l,"aws-global"]],[V,[{[b]:"UseGlobalEndpoint"},$]],[p,[l,"eu-central-1"]],[V,[{fn:ce,argv:[pe,"supportsDualStack"]},$]],[V,[{fn:ce,argv:[pe,"supportsFIPS"]},$]],[p,[l,"ap-south-1"]],[p,[l,"eu-north-1"]],[p,[l,"eu-west-1"]],[p,[l,"eu-west-2"]],[p,[l,"eu-west-3"]],[p,[l,"sa-east-1"]],[p,[l,_t]],[p,[l,"us-east-2"]],[p,[l,"us-west-2"]],[p,[l,"us-west-1"]],[p,[l,"ca-central-1"]],[p,[l,"ap-southeast-1"]],[p,[l,"ap-northeast-1"]],[p,[l,"ap-southeast-2"]],[p,[{fn:ce,argv:[pe,"name"]},"aws-us-gov"]]],results:[[x],["https://sts.amazonaws.com",{authSchemes:[{name:It,signingName:Rt,signingRegion:_t}]}],[wt,{authSchemes:[{name:It,signingName:Rt,signingRegion:"{Region}"}]}],[x,"Invalid Configuration: FIPS and custom endpoint are not supported"],[x,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Tt,k],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",k],[x,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://sts.{Region}.amazonaws.com",k],["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",k],[x,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",k],[x,"DualStack is enabled but this partition does not support DualStack"],[wt,k],[x,"Invalid Configuration: Missing Region"]]},ur=2,s=1e8,dr=new Int32Array([-1,1,-1,0,30,3,1,4,s+14,2,5,s+14,3,25,6,4,24,7,5,s+1,8,6,9,s+13,7,s+1,10,10,s+1,11,11,s+1,12,12,s+1,13,13,s+1,14,14,s+1,15,15,s+1,16,16,s+1,17,17,s+1,18,18,s+1,19,19,s+1,20,20,s+1,21,21,s+1,22,22,s+1,23,23,s+1,s+2,8,s+11,s+12,4,28,26,9,27,s+10,24,s+8,s+9,8,29,s+7,9,s+6,s+7,3,s+3,31,4,s+4,s+5]),Ot=Oe.from(dr,ur,kt.conditions,kt.results);var mr=new Ne({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),G=(e,t={})=>mr.get(e,()=>He(Ot,{endpointParams:e,logger:t.logger}));We.aws=qe;var gr=e=>async(t,r,n)=>{if(!n)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let o=await e(t,r,n),i=oe(r)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!i)throw new Error(`getEndpointParameterInstructions() is not defined on '${r.commandName}'`);let a=await be(n,{getEndpointParameterInstructions:i},t);return Object.assign(o,a)},hr=async(e,t,r)=>({operation:oe(t).operation,region:await ne(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Nt=gr(hr);function Wt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function le(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Ht(e){return{schemeId:"smithy.api#noAuth"}}var Sr=(e,t,r)=>o=>{let a=e(o).properties?.authSchemes;if(!a)return t(o);let d=[];for(let S of a){let{name:m,properties:P={},...g}=S,f=m.toLowerCase();m!==f&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${m}' to '${f}'`);let h;if(f==="sigv4a"){h="aws.auth#sigv4a";let te=a.find(re=>{let he=re.name.toLowerCase();return he!=="sigv4a"&&he.startsWith("sigv4")});if(D.sigv4aDependency()==="none"&&te)continue}else if(f.startsWith("sigv4"))h="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${f}'`);let T=r[h];if(!T)throw new Error(`Could not find HttpAuthOption create function for '${h}'`);let A=T(o);A.schemeId=h,A.signingProperties={...A.signingProperties||{},...g,...P},d.push(A)}return d},fr=e=>{let t=[];return e.operation==="AssumeRoleWithWebIdentity"?(t.push(Ht(e)),t.push(le(e))):(t.push(Wt(e)),t.push(le(e))),t},$t=Sr(G,fr,{"aws.auth#sigv4":Wt,"aws.auth#sigv4a":le,"smithy.api#noAuth":Ht}),Er=e=>Object.assign(e,{stsClientCtor:v}),Vt=e=>{let t=Er(e),r=rt(t),n=Ze(r);return Object.assign(n,{authSchemePreference:ne(e.authSchemePreference??[])})};var Ut=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),B={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 u=class e extends ye{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var z=class e extends u{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},X=class e extends u{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Y=class e extends u{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Q=class e extends u{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},J=class e extends u{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Z=class e extends u{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},ee=class e extends u{name="IDPCommunicationErrorException";$fault="client";$retryable={};constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};var vr="Arn",Pr="AccessKeyId",Ar="AssumeRole",yr="AssumedRoleId",xr="AssumeRoleRequest",Cr="AssumeRoleResponse",ue="AssumedRoleUser",_r="AssumeRoleWithWebIdentity",Ir="AssumeRoleWithWebIdentityRequest",Rr="AssumeRoleWithWebIdentityResponse",wr="Audience",de="Credentials",Tr="ContextAssertion",Ft="DurationSeconds",Dr="Expiration",kr="ExternalId",br="ExpiredTokenException",Or="IDPCommunicationErrorException",Nr="IDPRejectedClaimException",Wr="InvalidIdentityTokenException",Hr="Key",$r="MalformedPolicyDocumentException",Lt="Policy",Kt="PolicyArns",Vr="ProviderArn",Ur="ProvidedContexts",Fr="ProvidedContextsListType",Lr="ProvidedContext",Kr="PolicyDescriptorType",Mr="ProviderId",Mt="PackedPolicySize",jr="PackedPolicyTooLargeException",qr="Provider",jt="RoleArn",Gr="RegionDisabledException",qt="RoleSessionName",Br="SecretAccessKey",zr="SubjectFromWebIdentityToken",me="SourceIdentity",Xr="SerialNumber",Yr="SessionToken",Qr="Tags",Jr="TokenCode",Zr="TransitiveTagKeys",eo="Tag",to="Value",ro="WebIdentityToken",oo="arn",no="accessKeySecretType",C="awsQueryError",_="client",so="clientTokenType",I="error",R="httpError",w="message",io="policyDescriptorListType",Gt="smithy.ts.sdk.synthetic.com.amazonaws.sts",ao="tagListType",c="com.amazonaws.sts",Bt=se.for(Gt),co=[-3,Gt,"STSServiceException",0,[],[]];Bt.registerError(co,u);var y=se.for(c),po=[-3,c,br,{[C]:["ExpiredTokenException",400],[I]:_,[R]:400},[w],[0]];y.registerError(po,z);var lo=[-3,c,Or,{[C]:["IDPCommunicationError",400],[I]:_,[R]:400},[w],[0]];y.registerError(lo,ee);var uo=[-3,c,Nr,{[C]:["IDPRejectedClaim",403],[I]:_,[R]:403},[w],[0]];y.registerError(uo,J);var mo=[-3,c,Wr,{[C]:["InvalidIdentityToken",400],[I]:_,[R]:400},[w],[0]];y.registerError(mo,Z);var go=[-3,c,$r,{[C]:["MalformedPolicyDocument",400],[I]:_,[R]:400},[w],[0]];y.registerError(go,X);var ho=[-3,c,jr,{[C]:["PackedPolicyTooLarge",400],[I]:_,[R]:400},[w],[0]];y.registerError(ho,Y);var So=[-3,c,Gr,{[C]:["RegionDisabledException",403],[I]:_,[R]:403},[w],[0]];y.registerError(So,Q);var zt=[Bt,y],fo=[0,c,no,8,0],Eo=[0,c,so,8,0],Xt=[3,c,ue,0,[yr,vr],[0,0],2],vo=[3,c,xr,0,[jt,qt,Kt,Lt,Ft,Qr,Zr,kr,Xr,Jr,me,Ur],[0,0,()=>Qt,0,1,()=>Ro,64,0,0,0,0,()=>Io],2],Po=[3,c,Cr,0,[de,ue,Mt,me],[[()=>Yt,0],()=>Xt,1,0]],Ao=[3,c,Ir,0,[jt,qt,ro,Mr,Kt,Lt,Ft],[0,0,[()=>Eo,0],0,()=>Qt,0,1],3],yo=[3,c,Rr,0,[de,zr,ue,Mt,qr,wr,me],[[()=>Yt,0],0,()=>Xt,1,0,0,0]],Yt=[3,c,de,0,[Pr,Br,Yr,Dr],[0,[()=>fo,0],0,4],4],xo=[3,c,Kr,0,[oo],[0]],Co=[3,c,Lr,0,[Vr,Tr],[0,0]],_o=[3,c,eo,0,[Hr,to],[0,0],2],Qt=[1,c,io,0,()=>xo],Io=[1,c,Fr,0,()=>Co];var Ro=[1,c,ao,0,()=>_o],Jt=[9,c,Ar,0,()=>vo,()=>Po],Zt=[9,c,_r,0,()=>Ao,()=>yo];var er=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??ht,base64Encoder:e?.base64Encoder??Et,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??G,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??$t,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new M},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new j},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new L}],logger:e?.logger??new Re,protocol:e?.protocol??ot,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:zt,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",signerConstructor:e?.signerConstructor??D,urlParser:e?.urlParser??Se,utf8Decoder:e?.utf8Decoder??St,utf8Encoder:e?.utf8Encoder??ft});var tr=e=>{Ce(process.version);let t=ke(e),r=()=>t().then(xe),n=er(e);Ge(process.version);let o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??E(Je,o),bodyLengthChecker:e?.bodyLengthChecker??gt,defaultUserAgentProvider:e?.defaultUserAgentProvider??dt({serviceId:n.serviceId,clientVersion:ut.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:i=>i.getIdentityProvider("aws.auth#sigv4")||(async a=>await e.credentialDefaultProvider(a?.__config||{})()),signer:new M},{schemeId:"aws.auth#sigv4a",identityProvider:i=>i.getIdentityProvider("aws.auth#sigv4a"),signer:new j},{schemeId:"smithy.api#noAuth",identityProvider:i=>i.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new L}],maxAttempts:e?.maxAttempts??E(ze,e),region:e?.region??E(we,{...Te,...o}),requestHandler:nt.create(e?.requestHandler??r),retryMode:e?.retryMode??E({...Ye,default:async()=>(await r()).retryMode||Be},e),sha256:e?.sha256??Ve.bind(null,"sha256"),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??E(et,o),streamCollector:e?.streamCollector??st,useDualstackEndpoint:e?.useDualstackEndpoint??E(fe,o),useFipsEndpoint:e?.useFipsEndpoint??E(Ee,o),userAgentAppId:e?.userAgentAppId??E(mt,o)}};var rr=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let i=t.findIndex(a=>a.schemeId===o.schemeId);i===-1?t.push(o):t.splice(i,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},or=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var nr=(e,t)=>{let r=Object.assign(vt(e),_e(e),Ue(e),rr(e));return t.forEach(n=>n.configure(r)),Object.assign(e,Pt(r),Ie(r),Fe(r),or(r))};var v=class extends ve{config;constructor(...[t]){let r=tr(t||{});super(r),this.initConfig=r;let n=Ut(r),o=pt(n),i=Xe(o),a=De(i),d=a,S=$e(d),m=Vt(S),P=nr(m,t?.extensions||[]);this.config=P,this.middlewareStack.use(Pe(this.config)),this.middlewareStack.use(lt(this.config)),this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(it(this.config)),this.middlewareStack.use(at(this.config)),this.middlewareStack.use(ct(this.config)),this.middlewareStack.use(Ke(this.config,{httpAuthSchemeParametersProvider:Nt,identityProviderConfigProvider:async g=>new je({"aws.auth#sigv4":g.credentials,"aws.auth#sigv4a":g.credentials})})),this.middlewareStack.use(Me(this.config))}destroy(){super.destroy()}};var O=class extends U.classBuilder().ep(B).m(function(t,r,n,o){return[F(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Jt).build(){};var N=class extends U.classBuilder().ep(B).m(function(t,r,n,o){return[F(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(Zt).build(){};var wo={AssumeRoleCommand:O,AssumeRoleWithWebIdentityCommand:N},ge=class extends v{};Ae(wo,ge);var sr=e=>{if(typeof e?.Arn=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},ir=async(e,t,r,n={})=>{let o=typeof e=="function"?await e():e,i=typeof t=="function"?await t():t,a="",d=o??i??(a=await At(n)());return r?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${o} (credential provider clientConfig)`,`${i} (contextual client)`,`${a} (STS default: AWS_REGION, profile region, or us-east-1)`),d},ar=(e,t)=>{let r,n;return async(o,i)=>{if(n=o,!r){let{logger:P=e?.parentClientConfig?.logger,profile:g=e?.parentClientConfig?.profile,region:f,requestHandler:h=e?.parentClientConfig?.requestHandler,credentialProviderLogger:T,userAgentAppId:A=e?.parentClientConfig?.userAgentAppId}=e,te=await ir(f,e?.parentClientConfig?.region,T,{logger:P,profile:g}),re=!pr(h);r=new t({...e,userAgentAppId:A,profile:g,credentialDefaultProvider:()=>async()=>n,region:te,requestHandler:re?h:void 0,logger:P})}let{Credentials:a,AssumedRoleUser:d}=await r.send(new O(i));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${i.RoleArn}`);let S=sr(d),m={accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,...a.CredentialScope&&{credentialScope:a.CredentialScope},...S&&{accountId:S}};return K(m,"CREDENTIALS_STS_ASSUME_ROLE","i"),m}},cr=(e,t)=>{let r;return async n=>{if(!r){let{logger:S=e?.parentClientConfig?.logger,profile:m=e?.parentClientConfig?.profile,region:P,requestHandler:g=e?.parentClientConfig?.requestHandler,credentialProviderLogger:f,userAgentAppId:h=e?.parentClientConfig?.userAgentAppId}=e,T=await ir(P,e?.parentClientConfig?.region,f,{logger:S,profile:m}),A=!pr(g);r=new t({...e,userAgentAppId:h,profile:m,region:T,requestHandler:A?g:void 0,logger:S})}let{Credentials:o,AssumedRoleUser:i}=await r.send(new N(n));if(!o||!o.AccessKeyId||!o.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${n.RoleArn}`);let a=sr(i),d={accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration,...o.CredentialScope&&{credentialScope:o.CredentialScope},...a&&{accountId:a}};return a&&K(d,"RESOLVED_ACCOUNT_ID","T"),K(d,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),d}};var pr=e=>e?.metadata?.handlerProtocol==="h2";var lr=(e,t)=>t?class extends e{constructor(n){super(n);for(let o of t)this.middlewareStack.use(o)}}:e,To=(e={},t)=>ar(e,lr(v,t)),Do=(e={},t)=>cr(e,lr(v,t)),ks=e=>t=>e({roleAssumer:To(t),roleAssumerWithWebIdentity:Do(t),...t});export{U as $Command,Jt as AssumeRole$,O as AssumeRoleCommand,vo as AssumeRoleRequest$,Po as AssumeRoleResponse$,Zt as AssumeRoleWithWebIdentity$,N as AssumeRoleWithWebIdentityCommand,Ao as AssumeRoleWithWebIdentityRequest$,yo as AssumeRoleWithWebIdentityResponse$,Xt as AssumedRoleUser$,Yt as Credentials$,z as ExpiredTokenException,po as ExpiredTokenException$,ee as IDPCommunicationErrorException,lo as IDPCommunicationErrorException$,J as IDPRejectedClaimException,uo as IDPRejectedClaimException$,Z as InvalidIdentityTokenException,mo as InvalidIdentityTokenException$,X as MalformedPolicyDocumentException,go as MalformedPolicyDocumentException$,Y as PackedPolicyTooLargeException,ho as PackedPolicyTooLargeException$,xo as PolicyDescriptorType$,Co as ProvidedContext$,Q as RegionDisabledException,So as RegionDisabledException$,ge as STS,v as STSClient,u as STSServiceException,co as STSServiceException$,_o as Tag$,ve as __Client,ks as decorateDefaultCredentialProvider,zt as errorTypeRegistries,To as getDefaultRoleAssumer,Do as getDefaultRoleAssumerWithWebIdentity};
@@ -1 +0,0 @@
1
- import{a as st}from"./chunk-AN6QWW3N.js";import{a as it}from"./chunk-CVCZBECH.js";import{a as Me,b as qe,c as Ve,d as ze,e as Be,f as Qe,g as Ye,h as rt,i as nt}from"./chunk-GA44DNS2.js";import{A as Xe,D as Ze,E as et,F as tt,G as ot,b as be,c as He,f as we,g as $,l as ke,m as F,o as Le,t as Ke,v as je,z as Je}from"./chunk-UWHWNXNX.js";import"./chunk-6MSNEPUX.js";import{a as Ge}from"./chunk-MGGNSWUA.js";import"./chunk-WJLTO7JW.js";import"./chunk-TW5BOTVX.js";import{B as We,E as Ne,F as $e,G as Ue,H as Fe,b as pe,c as W,d as de,e as ue,g as me,h as ge,i as fe,j as he,l as Se,o as ye,p as Ce,s as Ie,t as Re,u as N,v as Oe,w as U}from"./chunk-A3H5SUSR.js";import{A as ce,C as le,E as X,F as Ee,G as Pe,H as Ae,I as xe,R as _e,S as Te,T as De,e as se,i as Y,j as ie,y as P,z as ae}from"./chunk-Z4YWESTY.js";import{w as ve}from"./chunk-MYIHTCRS.js";import"./chunk-IYWUY3VA.js";var at=async(e,t,n)=>({operation:se(t).operation,region:await Y(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function so(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function io(e){return{schemeId:"smithy.api#noAuth"}}var ct=e=>{let t=[];return e.operation==="AssumeRoleWithWebIdentity"?t.push(io(e)):t.push(so(e)),t},ao=e=>Object.assign(e,{stsClientCtor:E}),pt=e=>{let t=ao(e),n=Ke(t);return Object.assign(n,{authSchemePreference:Y(e.authSchemePreference??[])})};var lt=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),L={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 xt="required",o="type";var s="argv";var A="booleanEquals",l="stringEquals",yt="sigv4";var Ct="us-east-1",a="endpoint",dt="https://sts.{Region}.{PartitionResult#dnsSuffix}",h="tree",H="error",ee="getAttr",ut={[xt]:!1,[o]:"string"},Z={[xt]:!0,default:!1,[o]:"boolean"},It={ref:"Endpoint"},mt={fn:"isSet",[s]:[{ref:"Region"}]},d={ref:"Region"},gt={fn:"aws.partition",[s]:[d],assign:"PartitionResult"},Rt={ref:"UseFIPS"},vt={ref:"UseDualStack"},m={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:yt,signingName:"sts",signingRegion:Ct}]},headers:{}},g={},ft={conditions:[{fn:l,[s]:[d,"aws-global"]}],[a]:m,[o]:a},_t={fn:A,[s]:[Rt,!0]},Tt={fn:A,[s]:[vt,!0]},ht={fn:ee,[s]:[{ref:"PartitionResult"},"supportsFIPS"]},Dt={ref:"PartitionResult"},St={fn:A,[s]:[!0,{fn:ee,[s]:[Dt,"supportsDualStack"]}]},Et=[{fn:"isSet",[s]:[It]}],Pt=[_t],At=[Tt],co={version:"1.0",parameters:{Region:ut,UseDualStack:Z,UseFIPS:Z,Endpoint:ut,UseGlobalEndpoint:Z},rules:[{conditions:[{fn:A,[s]:[{ref:"UseGlobalEndpoint"},!0]},{fn:"not",[s]:Et},mt,gt,{fn:A,[s]:[Rt,!1]},{fn:A,[s]:[vt,!1]}],rules:[{conditions:[{fn:l,[s]:[d,"ap-northeast-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"ap-south-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"ap-southeast-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"ap-southeast-2"]}],endpoint:m,[o]:a},ft,{conditions:[{fn:l,[s]:[d,"ca-central-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"eu-central-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"eu-north-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"eu-west-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"eu-west-2"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"eu-west-3"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"sa-east-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,Ct]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"us-east-2"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"us-west-1"]}],endpoint:m,[o]:a},{conditions:[{fn:l,[s]:[d,"us-west-2"]}],endpoint:m,[o]:a},{endpoint:{url:dt,properties:{authSchemes:[{name:yt,signingName:"sts",signingRegion:"{Region}"}]},headers:g},[o]:a}],[o]:h},{conditions:Et,rules:[{conditions:Pt,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[o]:H},{conditions:At,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[o]:H},{endpoint:{url:It,properties:g,headers:g},[o]:a}],[o]:h},{conditions:[mt],rules:[{conditions:[gt],rules:[{conditions:[_t,Tt],rules:[{conditions:[{fn:A,[s]:[!0,ht]},St],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},[o]:a}],[o]:h},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[o]:H}],[o]:h},{conditions:Pt,rules:[{conditions:[{fn:A,[s]:[ht,!0]}],rules:[{conditions:[{fn:l,[s]:[{fn:ee,[s]:[Dt,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:g,headers:g},[o]:a},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:g,headers:g},[o]:a}],[o]:h},{error:"FIPS is enabled but this partition does not support FIPS",[o]:H}],[o]:h},{conditions:At,rules:[{conditions:[St],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:g,headers:g},[o]:a}],[o]:h},{error:"DualStack is enabled but this partition does not support DualStack",[o]:H}],[o]:h},ft,{endpoint:{url:dt,properties:g,headers:g},[o]:a}],[o]:h}],[o]:h},{error:"Invalid Configuration: Missing Region",[o]:H}]},bt=co;var po=new ye({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Ht=(e,t={})=>po.get(e,()=>Ie(bt,{endpointParams:e,logger:t.logger}));Ce.aws=ke;var f=class e extends ue{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};var K=class e extends f{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},j=class e extends f{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},G=class e extends f{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},M=class e extends f{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},q=class e extends f{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},V=class e extends f{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},z=class e extends f{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};var lo="Arn",uo="AccessKeyId",mo="AssumeRole",go="AssumedRoleId",fo="AssumeRoleRequest",ho="AssumeRoleResponse",te="AssumedRoleUser",So="AssumeRoleWithWebIdentity",Eo="AssumeRoleWithWebIdentityRequest",Po="AssumeRoleWithWebIdentityResponse",Ao="Audience",oe="Credentials",xo="ContextAssertion",wt="DurationSeconds",yo="Expiration",Co="ExternalId",Io="ExpiredTokenException",Ro="IDPCommunicationErrorException",vo="IDPRejectedClaimException",_o="InvalidIdentityTokenException",To="Key",Do="MalformedPolicyDocumentException",kt="Policy",Ot="PolicyArns",bo="ProviderArn",Ho="ProvidedContexts",wo="ProvidedContextsListType",ko="ProvidedContext",Oo="PolicyDescriptorType",Wo="ProviderId",Wt="PackedPolicySize",No="PackedPolicyTooLargeException",$o="Provider",Nt="RoleArn",Uo="RegionDisabledException",$t="RoleSessionName",Fo="SecretAccessKey",Lo="SubjectFromWebIdentityToken",re="SourceIdentity",Ko="SerialNumber",jo="SessionToken",Go="Tags",Mo="TokenCode",qo="TransitiveTagKeys",Vo="Tag",zo="Value",Jo="WebIdentityToken",Bo="arn",Qo="accessKeySecretType",R="awsQueryError",v="client",Yo="clientTokenType",_="error",T="httpError",D="message",Xo="policyDescriptorListType",Ut="smithy.ts.sdk.synthetic.com.amazonaws.sts",Zo="tagListType",c="com.amazonaws.sts",Ft=X.for(Ut),er=[-3,Ut,"STSServiceException",0,[],[]];Ft.registerError(er,f);var x=X.for(c),tr=[-3,c,Io,{[R]:["ExpiredTokenException",400],[_]:v,[T]:400},[D],[0]];x.registerError(tr,K);var or=[-3,c,Ro,{[R]:["IDPCommunicationError",400],[_]:v,[T]:400},[D],[0]];x.registerError(or,z);var rr=[-3,c,vo,{[R]:["IDPRejectedClaim",403],[_]:v,[T]:403},[D],[0]];x.registerError(rr,q);var nr=[-3,c,_o,{[R]:["InvalidIdentityToken",400],[_]:v,[T]:400},[D],[0]];x.registerError(nr,V);var sr=[-3,c,Do,{[R]:["MalformedPolicyDocument",400],[_]:v,[T]:400},[D],[0]];x.registerError(sr,j);var ir=[-3,c,No,{[R]:["PackedPolicyTooLarge",400],[_]:v,[T]:400},[D],[0]];x.registerError(ir,G);var ar=[-3,c,Uo,{[R]:["RegionDisabledException",403],[_]:v,[T]:403},[D],[0]];x.registerError(ar,M);var Lt=[Ft,x],cr=[0,c,Qo,8,0],pr=[0,c,Yo,8,0],Kt=[3,c,te,0,[go,lo],[0,0],2],lr=[3,c,fo,0,[Nt,$t,Ot,kt,wt,Go,qo,Co,Ko,Mo,re,Ho],[0,0,()=>Gt,0,1,()=>Er,64,0,0,0,0,()=>Sr],2],dr=[3,c,ho,0,[oe,te,Wt,re],[[()=>jt,0],()=>Kt,1,0]],ur=[3,c,Eo,0,[Nt,$t,Jo,Wo,Ot,kt,wt],[0,0,[()=>pr,0],0,()=>Gt,0,1],3],mr=[3,c,Po,0,[oe,Lo,te,Wt,$o,Ao,re],[[()=>jt,0],0,()=>Kt,1,0,0,0]],jt=[3,c,oe,0,[uo,Fo,jo,yo],[0,[()=>cr,0],0,4],4],gr=[3,c,Oo,0,[Bo],[0]],fr=[3,c,ko,0,[bo,xo],[0,0]],hr=[3,c,Vo,0,[To,zo],[0,0],2],Gt=[1,c,Xo,0,()=>gr],Sr=[1,c,wo,0,()=>fr];var Er=[1,c,Zo,0,()=>hr],Mt=[9,c,mo,0,()=>lr,()=>dr],qt=[9,c,So,0,()=>ur,()=>mr];var Vt=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??Ze,base64Encoder:e?.base64Encoder??ot,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ht,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ct,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new F},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new $}],logger:e?.logger??new Se,protocol:e?.protocol??je,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:Lt,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??ie,utf8Decoder:e?.utf8Decoder??et,utf8Encoder:e?.utf8Encoder??tt});var zt=e=>{ge(process.version);let t=xe(e),n=()=>t().then(me),i=Vt(e);Oe(process.version);let r={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??P(Le,r),bodyLengthChecker:e?.bodyLengthChecker??Xe,defaultUserAgentProvider:e?.defaultUserAgentProvider??Qe({serviceId:i.serviceId,clientVersion:it.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:u=>u.getIdentityProvider("aws.auth#sigv4")||(async p=>await e.credentialDefaultProvider(p?.__config||{})()),signer:new F},{schemeId:"smithy.api#noAuth",identityProvider:u=>u.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new $}],maxAttempts:e?.maxAttempts??P(Ne,e),region:e?.region??P(Ee,{...Pe,...r}),requestHandler:Ge.create(e?.requestHandler??n),retryMode:e?.retryMode??P({...Ue,default:async()=>(await n()).retryMode||We},e),sha256:e?.sha256??ve.bind(null,"sha256"),streamCollector:e?.streamCollector??Me,useDualstackEndpoint:e?.useDualstackEndpoint??P(ae,r),useFipsEndpoint:e?.useFipsEndpoint??P(ce,r),userAgentAppId:e?.userAgentAppId??P(Ye,r)}};var Jt=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(r){let u=t.findIndex(p=>p.schemeId===r.schemeId);u===-1?t.push(r):t.splice(u,1,r)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(r){n=r},httpAuthSchemeProvider(){return n},setCredentials(r){i=r},credentials(){return i}}},Bt=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});var Qt=(e,t)=>{let n=Object.assign(rt(e),fe(e),_e(e),Jt(e));return t.forEach(i=>i.configure(n)),Object.assign(e,nt(n),he(n),Te(n),Bt(n))};var E=class extends pe{config;constructor(...[t]){let n=zt(t||{});super(n),this.initConfig=n;let i=lt(n),r=Je(i),u=$e(r),p=Ae(u),S=p,y=Re(S),C=pt(y),b=Qt(C,t?.extensions||[]);this.config=b,this.middlewareStack.use(le(this.config)),this.middlewareStack.use(Be(this.config)),this.middlewareStack.use(Fe(this.config)),this.middlewareStack.use(De(this.config)),this.middlewareStack.use(qe(this.config)),this.middlewareStack.use(Ve(this.config)),this.middlewareStack.use(ze(this.config)),this.middlewareStack.use(be(this.config,{httpAuthSchemeParametersProvider:at,identityProviderConfigProvider:async I=>new we({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(He(this.config))}destroy(){super.destroy()}};var w=class extends W.classBuilder().ep(L).m(function(t,n,i,r){return[N(i,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Mt).build(){};var k=class extends W.classBuilder().ep(L).m(function(t,n,i,r){return[N(i,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(qt).build(){};var Pr={AssumeRoleCommand:w,AssumeRoleWithWebIdentityCommand:k},ne=class extends E{};de(Pr,ne);var Yt=e=>{if(typeof e?.Arn=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},Xt=async(e,t,n,i={})=>{let r=typeof e=="function"?await e():e,u=typeof t=="function"?await t():t,p="",S=r??u??(p=await st(i)());return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${r} (credential provider clientConfig)`,`${u} (contextual client)`,`${p} (STS default: AWS_REGION, profile region, or us-east-1)`),S},Zt=(e,t)=>{let n,i;return async(r,u)=>{if(i=r,!n){let{logger:b=e?.parentClientConfig?.logger,profile:I=e?.parentClientConfig?.profile,region:J,requestHandler:O=e?.parentClientConfig?.requestHandler,credentialProviderLogger:B,userAgentAppId:Q=e?.parentClientConfig?.userAgentAppId}=e,ro=await Xt(J,e?.parentClientConfig?.region,B,{logger:b,profile:I}),no=!to(O);n=new t({...e,userAgentAppId:Q,profile:I,credentialDefaultProvider:()=>async()=>i,region:ro,requestHandler:no?O:void 0,logger:b})}let{Credentials:p,AssumedRoleUser:S}=await n.send(new w(u));if(!p||!p.AccessKeyId||!p.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${u.RoleArn}`);let y=Yt(S),C={accessKeyId:p.AccessKeyId,secretAccessKey:p.SecretAccessKey,sessionToken:p.SessionToken,expiration:p.Expiration,...p.CredentialScope&&{credentialScope:p.CredentialScope},...y&&{accountId:y}};return U(C,"CREDENTIALS_STS_ASSUME_ROLE","i"),C}},eo=(e,t)=>{let n;return async i=>{if(!n){let{logger:y=e?.parentClientConfig?.logger,profile:C=e?.parentClientConfig?.profile,region:b,requestHandler:I=e?.parentClientConfig?.requestHandler,credentialProviderLogger:J,userAgentAppId:O=e?.parentClientConfig?.userAgentAppId}=e,B=await Xt(b,e?.parentClientConfig?.region,J,{logger:y,profile:C}),Q=!to(I);n=new t({...e,userAgentAppId:O,profile:C,region:B,requestHandler:Q?I:void 0,logger:y})}let{Credentials:r,AssumedRoleUser:u}=await n.send(new k(i));if(!r||!r.AccessKeyId||!r.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${i.RoleArn}`);let p=Yt(u),S={accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.SessionToken,expiration:r.Expiration,...r.CredentialScope&&{credentialScope:r.CredentialScope},...p&&{accountId:p}};return p&&U(S,"RESOLVED_ACCOUNT_ID","T"),U(S,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),S}};var to=e=>e?.metadata?.handlerProtocol==="h2";var oo=(e,t)=>t?class extends e{constructor(i){super(i);for(let r of t)this.middlewareStack.use(r)}}:e,Ar=(e={},t)=>Zt(e,oo(E,t)),xr=(e={},t)=>eo(e,oo(E,t)),is=e=>t=>e({roleAssumer:Ar(t),roleAssumerWithWebIdentity:xr(t),...t});export{W as $Command,Mt as AssumeRole$,w as AssumeRoleCommand,lr as AssumeRoleRequest$,dr as AssumeRoleResponse$,qt as AssumeRoleWithWebIdentity$,k as AssumeRoleWithWebIdentityCommand,ur as AssumeRoleWithWebIdentityRequest$,mr as AssumeRoleWithWebIdentityResponse$,Kt as AssumedRoleUser$,jt as Credentials$,K as ExpiredTokenException,tr as ExpiredTokenException$,z as IDPCommunicationErrorException,or as IDPCommunicationErrorException$,q as IDPRejectedClaimException,rr as IDPRejectedClaimException$,V as InvalidIdentityTokenException,nr as InvalidIdentityTokenException$,j as MalformedPolicyDocumentException,sr as MalformedPolicyDocumentException$,G as PackedPolicyTooLargeException,ir as PackedPolicyTooLargeException$,gr as PolicyDescriptorType$,fr as ProvidedContext$,M as RegionDisabledException,ar as RegionDisabledException$,ne as STS,E as STSClient,f as STSServiceException,er as STSServiceException$,hr as Tag$,pe as __Client,is as decorateDefaultCredentialProvider,Lt as errorTypeRegistries,Ar as getDefaultRoleAssumer,xr as getDefaultRoleAssumerWithWebIdentity};