import{b as r}from"./router-W58Zb32N.js";import"./jwt-decode.esm-CzNJpMna.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="dc5386f7-769d-4bf6-bb4a-7d2b3bd4411c",a._sentryDebugIdIdentifier="sentry-dbid-dc5386f7-769d-4bf6-bb4a-7d2b3bd4411c")}catch{}})();class d{urlPath="api-keys";async create({projectId:t,name:e,permissions:s}){return r.post(`projects/${t}/${this.urlPath}`,{name:e,permissions:s??null})}async update(t,e,s){await r.patch(`projects/${t}/${this.urlPath}/${e}`,s)}async delete(t,e){await r.delete(`projects/${t}/${this.urlPath}/${e}`)}async list(t){return r.get(`projects/${t}/${this.urlPath}`)}}const n=new d;class i{constructor(t){this.dto=t}static async list(t){return(await n.list(t)).map(s=>new i(s))}static async create(t){const e=await n.create(t);return new i(e)}static async update(t,e,s){await n.update(t,e,s)}static async delete(t,e){await n.delete(t,e)}get id(){return this.dto.id}get name(){return this.dto.name}get createdAt(){return new Date(this.dto.createdAt)}get ownerId(){return this.dto.createdBy}get value(){return this.dto.value??null}get permissions(){return this.dto.permissions??null}}export{i as A};
//# sourceMappingURL=apiKey-DqkIrhvB.js.map
