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