import{requireAuthMiddleware as e}from"../middlewares/auth.js";import{integrationsMiddleware as d}from"../middlewares/integrations.js";import{listApps as g,createApp as l,getApp as c,createCredential as n,updateCredential as k,deleteCredential as o,deleteApp as y,updateApp as m,getLogs as f,getLogDetails as A}from"./apps.js";import{getMeta as C}from"./meta.js";import{getApiAccessStatus as b,listApiProducts as r}from"./products.js";function w(p,a){const i=a.getConfig().developerOnboarding?.adapters||[],s=a.getConfig().access?.rbac||{},t=a.globalData.apiProducts||{};i&&(p.get("/api/api-keys/meta",e(),C(a)),p.get("/api/api-keys/apps",e(),d(i,t,s),g(a)),p.post("/api/api-keys/apps",e(),d(i,t,s),l(a)),p.get("/api/api-keys/apps/:id",e(),d(i,t,s),c(a)),p.put("/api/api-keys/apps/:id",e(),d(i,t,s),m(a)),p.delete("/api/api-keys/apps/:id",e(),d(i,t,s),y(a)),p.post("/api/api-keys/apps/:id/credentials",e(),d(i,t,s),n(a)),p.put("/api/api-keys/apps/:id/credentials/:credentialId",e(),d(i,t,s),k(a)),p.delete("/api/api-keys/apps/:id/credentials/:credentialId",e(),d(i,t,s),o(a)),p.get("/api/api-keys/apps/:id/logs/:logId",e(),d(i,t,s),A()),p.get("/api/api-keys/apps/:id/logs",e(),d(i,t,s),f()),p.get("/api/api-keys/api-products",e(),d(i,t,s),r(a)),p.get("/api/api-keys/api-products/:id/access",e(),d(i,t,s),b()))}export{w as installRoutes};
