@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.32 kB
JavaScript
import{F as i,I as a,Kb as c,k as t}from"./chunk-FYA6QUPZ.js";import{a as o}from"./chunk-WFIHWVQO.js";var p=class n{http=a(c);listReachable(){return this.http.get("/api/resources").pipe(t(e=>e.resources))}expiryFeed(){return this.http.get("/api/resources/expiry")}markExpirySeen(){return this.http.post("/api/resources/expiry/seen",{}).pipe(t(e=>e.cleared))}reconcilerStatus(){return this.http.get("/api/admin/resources/status")}listAll(){return this.http.get("/api/admin/resources").pipe(t(e=>e.resources))}create(e,r){return this.http.post("/api/admin/resources",o({accountNumber:e},r)).pipe(t(s=>s.resource))}update(e,r){return this.http.patch(`/api/admin/resources/${encodeURIComponent(e)}`,r).pipe(t(s=>s.resource))}delete(e){return this.http.delete(`/api/admin/resources/${encodeURIComponent(e)}`)}listGrantees(e){return this.http.get(`/api/admin/resources/${encodeURIComponent(e)}/grants`).pipe(t(r=>r.grantees))}grant(e,r,s){return this.http.put(`/api/admin/resources/${encodeURIComponent(e)}/grants/${encodeURIComponent(r)}`,{durationHours:s}).pipe(t(()=>{}))}revoke(e,r){return this.http.delete(`/api/admin/resources/${encodeURIComponent(e)}/grants/${encodeURIComponent(r)}`)}static \u0275fac=function(r){return new(r||n)};static \u0275prov=i({token:n,factory:n.\u0275fac,providedIn:"root"})};export{p as a};