import{T as w,A as l,U as i,W as u,y,eE as g}from"./index-dP1W1_bd.js";const m=w.injectEndpoints({endpoints:o=>({getFeatureViewAlerts:o.query({query:({id:e,version:r,pId:t,fsId:a})=>({url:`
          project/${t}/
          featurestores/${a}/
          featureview/${e}/version/${r}/
          alerts
          `.replace(/\s/g,"")}),transformResponse:l([],"items"),extraOptions:{skipError:!0},providesTags:i.cacheByIdArgProperty(u.ProjectTags.FeatureViewAlert)}),addFeatureViewAlerts:o.mutation({async queryFn({pId:e,fsId:r,alerts:t=[],id:a,version:s},n,f,$){const d=t.map(A=>$({url:`
            project/${e}/
            featurestores/${r}/
            featureview/${a}/version/${s}/
            alerts
            `.replace(/\s/g,""),method:"post",data:A})),p=await Promise.all(d),c=y(g(["error","response"]),p);return c||{data:p}},invalidatesTags:i.cacheByIdArgProperty(u.ProjectTags.FeatureViewAlert)}),testFeatureViewAlert:o.mutation({query:({id:e,version:r,pId:t,fsId:a,alertId:s})=>({url:`
          project/${t}/
          featurestores/${a}/
          featureview/${e}/version/${r}/
          alerts/${s}/test
          `.replace(/\s/g,""),method:"POST"}),transformResponse:l([],"items")}),updateFeatureViewAlert:o.mutation({query:({id:e,version:r,pId:t,fsId:a,alertId:s,alert:n})=>({url:`
          project/${t}/
          featurestores/${a}/
          featureview/${e}/version/${r}/
          alerts/${s}
          `.replace(/\s/g,""),method:"PUT",data:n}),invalidatesTags:i.cacheByIdArgProperty(u.ProjectTags.FeatureViewAlert)}),deleteFeatureViewAlert:o.mutation({query:({id:e,version:r,pId:t,fsId:a,alertId:s})=>({url:`
          project/${t}/
          featurestores/${a}/
          featureview/${e}/version/${r}/
          alerts/${s}
          `.replace(/\s/g,""),method:"DELETE"}),invalidatesTags:i.cacheByIdArgProperty(u.ProjectTags.FeatureViewAlert)})})}),{useGetFeatureViewAlertsQuery:T,useAddFeatureViewAlertsMutation:v,useTestFeatureViewAlertMutation:V,useUpdateFeatureViewAlertMutation:P,useDeleteFeatureViewAlertMutation:h}=m;export{P as a,V as b,h as c,T as d,v as u};
