import{p as T,d$ as y,q as i,s,dA as n,W as $,m as F,e0 as v,H as g,e1 as m,B as l,e2 as j,w as P}from"./index-ea7817a2.js";const q=T.injectEndpoints({endpoints:o=>({getFeatureViews:o.query({query:({pId:e,fsId:t,params:r={}})=>{const a=y.stringify(r);return{url:`project/${e}/featurestores/${t}/featureview?${a}`}},providesTags:i.providesListItems(s.ProjectTags.FeatureView,"name"),extraOptions:{skipError:!0}}),getFeatureViewVersions:o.query({query:({pId:e,fsId:t,id:r})=>({url:`project/${e}/featurestores/${t}/featureview/${r}`}),providesTags:i.providesListItems(s.ProjectTags.FeatureView,"name"),extraOptions:{skipError:!0}}),getFeatureView:o.query({query:({id:e,version:t,pId:r,fsId:a,params:u={}})=>{const p=y.stringify(u);return{url:`
          project/${r}/
          featurestores/${a}/
          featureview/${e}/version/${t}
          ?${p}
          `.replace(/\s/g,"")}},transformResponse:e=>n({tags:$(g([],"items"),F(v))},e),providesTags:i.cacheByIdArgProperty(s.ProjectTags.FeatureView),extraOptions:{skipError:!0}}),getFeatureViewTransformationFunctions:o.query({query:({id:e,version:t,pId:r,fsId:a})=>({url:`
          project/${r}/
          featurestores/${a}/
          featureview/${e}/version/${t}/
          transformation
          `.replace(/\s/g,"")}),providesTags:i.cacheByIdArgProperty(s.ProjectTags.FeatureViewTransformations),extraOptions:{skipError:!0}}),updateFeatureView:o.mutation({query:({id:e,version:t,pId:r,fsId:a,data:u})=>({url:`
          project/${r}/
          featurestores/${a}/
          featureview/${e}/version/${t}
          `.replace(/\s/g,""),method:"put",data:u}),invalidatesTags:i.cacheByIdArgProperty(s.ProjectTags.FeatureView)}),createFeatureView:o.mutation({query:({pId:e,fsId:t,data:r})=>({url:`project/${e}/featurestores/${t}/featureview`,method:"post",data:{...r,type:"featureViewDTO"}}),invalidatesTags:[{type:s.ProjectTags.FeatureView,id:"LIST"}]}),addFeatureViewTags:o.mutation({async queryFn({pId:e,fsId:t,tags:r,id:a,version:u},p,h,V){const f=m(r).map(w=>V({url:`
            project/${e}/
            featurestores/${t}/
            featureview/${a}/version/${u}/
            tags/${w.key}
            `.replace(/\s/g,""),method:"put",data:w.formattedArray})),c=await Promise.all(f),d=l(j(["error","response"]),c);return d?{error:n({error:$(g({data:{usrMsg:"Error while adding tags"}},"response"),n({data:P("usrMsg")}))},d)}:{data:c}},invalidatesTags:i.cacheByIdArgProperty(s.ProjectTags.FeatureView)}),addFeatureViewSingleTag:o.mutation({query:({pId:e,fsId:t,id:r,version:a,tagName:u,tagData:p})=>({url:`
            project/${e}/
            featurestores/${t}/
            featureview/${r}/version/${a}/
            tags/${u}
            `.replace(/\s/g,""),method:"put",data:p}),invalidatesTags:i.cacheByIdArgProperty(s.ProjectTags.FeatureView)}),getFeatureViewKeywords:o.query({query:({id:e,version:t,pId:r,fsId:a})=>({url:`
          project/${r}/
          featurestores/${a}/
          featureview/${e}/version/${t}/
          keywords
          `.replace(/\s/g,"")}),transformResponse:g([],"keywords"),extraOptions:{skipError:!0},providesTags:i.cacheByIdArgProperty(s.ProjectTags.FeatureView)}),addFeatureViewKeywords:o.mutation({query:({pId:e,fsId:t,data:r,id:a,version:u})=>({url:`
        project/${e}/
        featurestores/${t}/
        featureview/${a}/version/${u}/
        keywords
        `.replace(/\s/g,""),method:"post",data:r}),invalidatesTags:i.cacheByIdArgProperty(s.ProjectTags.FeatureView)}),deleteFeatureView:o.mutation({query:({pId:e,fsId:t,id:r,version:a})=>({url:`
        project/${e}/
        featurestores/${t}/
        featureview/${r}/version/${a}
        `.replace(/\s/g,""),method:"delete"}),invalidatesTags:(e,t,{id:r})=>[{type:s.ProjectTags.FeatureView,id:"LIST"},{type:s.ProjectTags.FeatureView,id:r}]})})}),{useGetFeatureViewsQuery:I,useGetFeatureViewQuery:M,useGetFeatureViewVersionsQuery:B,useGetFeatureViewTransformationFunctionsQuery:E,useGetFeatureViewKeywordsQuery:O,useUpdateFeatureViewMutation:x,useCreateFeatureViewMutation:Q,useAddFeatureViewKeywordsMutation:G,useAddFeatureViewTagsMutation:S,useAddFeatureViewSingleTagMutation:K,useDeleteFeatureViewMutation:L,endpoints:_}=q;export{O as a,K as b,S as c,I as d,G as e,B as f,E as g,L as h,Q as i,M as u};
