@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.1 kB
JavaScript
import{F as l,I as p,Kb as o,k as t}from"./chunk-FYA6QUPZ.js";import{a}from"./chunk-WFIHWVQO.js";var u=class e{http=p(o);discover(){return this.http.get("/api/plugins")}expiryFeed(){return this.http.get("/api/plugins/expiry")}markExpirySeen(){return this.http.post("/api/plugins/expiry/seen",{}).pipe(t(i=>i.cleared))}catalog(){return this.http.get("/api/admin/plugins")}grants(i,n){return this.http.get(this.grantsUrl(i,n))}groupAssignments(i){return this.http.get(`/api/admin/groups/${encodeURIComponent(i)}/plugin-grants`).pipe(t(n=>n.assignments))}userAccess(i){return this.http.get(`/api/admin/users/${encodeURIComponent(i)}/plugin-grants`)}assign(i,n,s,r,g){return this.http.put(this.grantsUrl(i,n),a({principal:s,permission:r},g===void 0?{}:{durationHours:g}))}revoke(i,n,s,r){return this.http.delete(this.grantsUrl(i,n),{body:{principal:s,permission:r}})}grantsUrl(i,n){return`/api/admin/plugins/${encodeURIComponent(i)}/accounts/${encodeURIComponent(n)}/grants`}static \u0275fac=function(n){return new(n||e)};static \u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"})};export{u as a};