import{addProject as e,deleteProject as t,getCIConfiguration as n,getProjects as r,pushCIConfiguration as i,pushProjectConfiguration as a,selectProject as o,triggerBuild as s,triggerWebhook as c,unselectProject as l,updateProject as u,updateProjectMembers as d}from"../controllers/project.controller.mjs";import{addNewAccessKey as f,deleteAccessKey as p,refreshAccessKey as m}from"../controllers/projectAccessKey.controller.mjs";const h=`/api/project`,g=()=>`${process.env.BACKEND_URL}${h}`,_=()=>({getProjects:{urlModel:`/`,url:g(),method:`GET`},addProject:{urlModel:`/`,url:g(),method:`POST`},updateProject:{urlModel:`/`,url:g(),method:`PUT`},updateProjectMembers:{urlModel:`/members`,url:`${g()}/members`,method:`PUT`},pushProjectConfiguration:{urlModel:`/configuration`,url:`${g()}/configuration`,method:`PUT`},deleteProject:{urlModel:`/`,url:g(),method:`DELETE`},selectProject:{urlModel:`/:projectId`,url:({projectId:e})=>`${g()}/${e}`,method:`PUT`},unselectProject:{urlModel:`/logout`,url:`${g()}/logout`,method:`POST`},addNewAccessKey:{urlModel:`/access_key`,url:`${g()}/access_key`,method:`POST`},refreshAccessKey:{urlModel:`/access_key`,url:`${g()}/access_key`,method:`PATCH`},deleteAccessKey:{urlModel:`/access_key`,url:`${g()}/access_key`,method:`DELETE`},triggerBuild:{urlModel:`/build`,url:`${g()}/build`,method:`POST`},triggerWebhook:{urlModel:`/webhook`,url:`${g()}/webhook`,method:`POST`},getCIConfiguration:{urlModel:`/ci`,url:`${g()}/ci`,method:`GET`},pushCIConfiguration:{urlModel:`/ci`,url:`${g()}/ci`,method:`POST`}}),v=async h=>{h.get(_().getProjects.urlModel,r),h.post(_().addProject.urlModel,e),h.put(_().updateProject.urlModel,u),h.put(_().updateProjectMembers.urlModel,d),h.put(_().pushProjectConfiguration.urlModel,a),h.delete(_().deleteProject.urlModel,t),h.post(_().addNewAccessKey.urlModel,f),h.patch(_().refreshAccessKey.urlModel,m),h.delete(_().deleteAccessKey.urlModel,p),h.post(_().unselectProject.urlModel,l),h.put(_().selectProject.urlModel,o),h.post(_().triggerBuild.urlModel,s),h.post(_().triggerWebhook.urlModel,c),h.get(_().getCIConfiguration.urlModel,n),h.post(_().pushCIConfiguration.urlModel,i)};export{_ as getProjectRoutes,h as projectRoute,v as projectRouter};
//# sourceMappingURL=project.routes.mjs.map