UNPKG

@fntio/infra-client

Version:

Self-hosted AWS access portal: credential vending, target-account trust, and grant-driven private networking as CDK stacks and constructs.

2 lines (1 loc) • 1.63 kB
import{b as p}from"./chunk-KCJ5HNXP.js";import{F as i,I as a,Kb as c,k as n}from"./chunk-FYA6QUPZ.js";import{a as o}from"./chunk-WFIHWVQO.js";var l=class s{http=a(c);listAccounts(){return this.http.get("/api/accounts").pipe(n(e=>e.accounts))}listAccountNames(){return this.http.get("/api/accounts/names").pipe(n(e=>e.names))}listAccountsPage(e){return this.http.get("/api/accounts",{params:p(e)})}vendCredentials(e,t,r={}){return this.http.post("/api/credentials",o({accountNumber:e,role:t},r.background?{background:!0}:{}))}home(){return this.http.get("/api/accounts/home")}setFavorite(e,t){return this.http.put(`/api/preferences/favorites/${e}`,{favorite:t}).pipe(n(r=>r.favorite))}expiryFeed(){return this.http.get("/api/accounts/expiry")}markExpirySeen(){return this.http.post("/api/accounts/expiry/seen",{}).pipe(n(e=>e.cleared))}consoleSignIn(e,t){return this.http.post(`/api/accounts/${e}/roles/${encodeURIComponent(t)}/console`,{})}getProfileName(e,t){return this.http.get(`/api/preferences/profile-name/${e}/${encodeURIComponent(t)}`).pipe(n(r=>r.profileName))}setProfileName(e,t,r){return this.http.put(`/api/preferences/profile-name/${e}/${encodeURIComponent(t)}`,{profileName:r})}clearProfileName(e,t){return this.http.delete(`/api/preferences/profile-name/${e}/${encodeURIComponent(t)}`)}getPreferences(){return this.http.get("/api/preferences").pipe(n(e=>e.preferences))}setAutoVend(e,t,r){return this.http.put(`/api/preferences/auto-vend/${e}/${encodeURIComponent(t)}`,{autoVend:r})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=i({token:s,factory:s.\u0275fac,providedIn:"root"})};export{l as a};