import{dF as s}from"./strapi-ye6TfKul.js";const o=s.enhanceEndpoints({addTagTypes:["ApiToken"]}).injectEndpoints({endpoints:n=>({getAPITokens:n.query({query:()=>({url:"/admin/api-tokens",method:"GET"}),transformResponse:e=>e.data,providesTags:(e,t)=>[...e?.map(({id:a})=>({type:"ApiToken",id:a}))??[],{type:"ApiToken",id:"LIST"}]}),getAPIToken:n.query({query:e=>`/admin/api-tokens/${e}`,transformResponse:e=>e.data,providesTags:(e,t,a)=>[{type:"ApiToken",id:a}]}),createAPIToken:n.mutation({query:e=>({url:"/admin/api-tokens",method:"POST",data:e}),transformResponse:e=>e.data,invalidatesTags:[{type:"ApiToken",id:"LIST"},"HomepageKeyStatistics"]}),deleteAPIToken:n.mutation({query:e=>({url:`/admin/api-tokens/${e}`,method:"DELETE"}),transformResponse:e=>e.data,invalidatesTags:(e,t,a)=>[{type:"ApiToken",id:a},"HomepageKeyStatistics"]}),updateAPIToken:n.mutation({query:({id:e,...t})=>({url:`/admin/api-tokens/${e}`,method:"PUT",data:t}),transformResponse:e=>e.data,invalidatesTags:(e,t,{id:a})=>[{type:"ApiToken",id:a}]}),getAPITokenOwnerPermissions:n.query({query:e=>`/admin/admin-tokens/${e}/owner-permissions`,transformResponse:e=>e.data}),getAdminTokens:n.query({query:()=>({url:"/admin/admin-tokens",method:"GET"}),transformResponse:e=>e.data,providesTags:(e,t)=>[...e?.map(({id:a})=>({type:"ApiToken",id:a}))??[],{type:"ApiToken",id:"ADMIN_LIST"}]}),getAdminToken:n.query({query:e=>`/admin/admin-tokens/${e}`,transformResponse:e=>e.data,providesTags:(e,t,a)=>[{type:"ApiToken",id:a}]}),createAdminToken:n.mutation({query:e=>({url:"/admin/admin-tokens",method:"POST",data:e}),transformResponse:e=>e.data,invalidatesTags:[{type:"ApiToken",id:"ADMIN_LIST"},"HomepageKeyStatistics"]}),deleteAdminToken:n.mutation({query:e=>({url:`/admin/admin-tokens/${e}`,method:"DELETE"}),transformResponse:e=>e.data,invalidatesTags:(e,t,a)=>[{type:"ApiToken",id:a},"HomepageKeyStatistics"]}),updateAdminToken:n.mutation({query:({id:e,...t})=>({url:`/admin/admin-tokens/${e}`,method:"PUT",data:t}),transformResponse:e=>e.data,invalidatesTags:(e,t,{id:a})=>[{type:"ApiToken",id:a}]})})}),{useGetAPITokensQuery:r,useGetAPITokenQuery:d,useCreateAPITokenMutation:m,useDeleteAPITokenMutation:p,useUpdateAPITokenMutation:T,useGetAPITokenOwnerPermissionsQuery:k,useGetAdminTokensQuery:u,useGetAdminTokenQuery:y,useCreateAdminTokenMutation:A,useDeleteAdminTokenMutation:g,useUpdateAdminTokenMutation:I}=o;export{A as a,p as b,g as c,k as d,d as e,r as f,y as g,u as h,T as i,I as j,m as u};
