import{M as i,P as u,O as s}from"./index-DNBEEyYo.js";const h=i.injectEndpoints({endpoints:a=>({getFSSharedWith:a.query({query:({pId:e})=>({url:`project/${e}/featurestores/share`,method:"GET"}),providesTags:u.cacheByIdArgProperty(s.ProjectTags.FeatureStoreShare,"pId"),transformResponse:e=>e.items}),shareFS:a.mutation({query:({pId:e,targetProjectId:r})=>({url:`project/${e}/featurestores/share?project=${r}`,method:"POST"}),invalidatesTags:(e,r,{pId:t,targetProjectId:o})=>[{type:s.ProjectTags.FeatureStoreShare,id:t},{type:s.ProjectTags.FeatureStores,id:o}]}),unShareFS:a.mutation({query:({pId:e,targetProjectId:r})=>({url:`project/${e}/featurestores/share?project=${r}`,method:"DELETE"}),invalidatesTags:(e,r,{pId:t,targetProjectId:o})=>[{type:s.ProjectTags.FeatureStoreShare,id:t},{type:s.ProjectTags.FeatureStores,id:o}]}),getFGSharedWith:a.query({query:({pId:e,featureGroupId:r})=>({url:`project/${e}/featurestores/share/featuregroups/${r}`,method:"GET"}),providesTags:u.cacheByIdArgProperty(s.ProjectTags.FeatureGroupShare,"featureGroupId"),transformResponse:e=>e.items}),shareFG:a.mutation({query:({pId:e,featureGroupId:r,targetProjectId:t})=>({url:`project/${e}/featurestores/share/featuregroups/${r}?project=${t}`,method:"POST"}),invalidatesTags:u.cacheByIdArgProperty(s.ProjectTags.FeatureGroupShare,"featureGroupId")}),shareFeatures:a.mutation({query:({pId:e,featureGroupId:r,targetProjectId:t,features:o})=>({url:`project/${e}/featurestores/share/featuregroups/${r}?project=${t}&${o.map(c=>`feature=${c}`).join("&")}`,method:"POST"}),invalidatesTags:(e,r,{featureGroupId:t})=>[{type:s.ProjectTags.FeatureGroupShare,id:t}]}),unShareFG:a.mutation({query:({pId:e,featureGroupId:r,targetProjectId:t})=>({url:`project/${e}/featurestores/share/featuregroups/${r}?project=${t}`,method:"DELETE"}),invalidatesTags:u.cacheByIdArgProperty(s.ProjectTags.FeatureGroupShare,"featureGroupId")}),getFGRestrictedAccess:a.query({query:({pId:e,fsId:r,featureGroupId:t})=>({url:`project/${e}/featurestores/${r}/featuregroups/${t}/restrictedaccess`,method:"GET"}),providesTags:u.cacheByIdArgProperty(s.ProjectTags.FeatureGroupRestrictedAccess,"featureGroupId"),transformResponse:e=>e.items}),grantFGRestrictedAccess:a.mutation({query:({pId:e,fsId:r,featureGroupId:t,userEmail:o,features:c})=>({url:`project/${e}/featurestores/${r}/featuregroups/${t}/restrictedaccess?user=${o}&${c.map(p=>`feature=${p}`).join("&")}`,method:"POST"}),invalidatesTags:u.cacheByIdArgProperty(s.ProjectTags.FeatureGroupRestrictedAccess,"featureGroupId")}),revokeFGRestrictedAccess:a.mutation({query:({pId:e,fsId:r,featureGroupId:t,userEmail:o})=>({url:`project/${e}/featurestores/${r}/featuregroups/${t}/restrictedaccess?user=${o}`,method:"DELETE"}),invalidatesTags:u.cacheByIdArgProperty(s.ProjectTags.FeatureGroupRestrictedAccess,"featureGroupId")})})}),{useGetFSSharedWithQuery:g,useUnShareFSMutation:n,useShareFSMutation:y,useGetFGSharedWithQuery:S,useShareFGMutation:T,useShareFeaturesMutation:F,useUnShareFGMutation:G,useGetFGRestrictedAccessQuery:$,useGrantFGRestrictedAccessMutation:f,useRevokeFGRestrictedAccessMutation:j}=h;export{$ as a,G as b,j as c,T as d,F as e,f,g,n as h,y as i,S as u};
