import{v as y,K as l,cT as n,M as u,O as p}from"./index-CK33qGU_.js";const c=y({result:JSON.parse,expectationConfig:JSON.parse,exceptionInfo:JSON.parse,meta:JSON.parse}),m=l.injectEndpoints({endpoints:o=>({getValidationReport:o.query({query:({pId:e,fgId:t,fsId:r,offset:a=0,limit:s=10,sortBy:i="validation_time:desc"})=>({url:n.stringifyUrl({url:`/project/${e}/featurestores/${r}/featuregroups/${t}/validationreport`,query:{sort_by:i,limit:s,offset:a}})}),transformResponse:e=>({reports:e.items.map(t=>({...t,statistics:JSON.parse(t.statistics),results:t.results.map(c)})),count:e.count}),providesTags:e=>u.providesList(p.ProjectTags.Expectations)(e==null?void 0:e.reports)}),getValidationResult:o.query({query:({pId:e,fsId:t,fgId:r,id:a})=>({url:`/project/${e}/featurestores/${t}/featuregroups/${r}/validationreport/${a}`}),providesTags:u.cacheByIdArgProperty(p.ProjectTags.Expectations)}),getValidationHistory:o.query({query:({pId:e,fsId:t,fgId:r,expectationId:a,params:s={}})=>{const i=n.stringify({...s,sorted_by:"validation_time:desc"});return{url:`/project/${e}/featurestores/${t}/featuregroups/${r}/validationresult/history/${a}?${i}`}},transformResponse:e=>({...e,items:e.items.map(c)})}),getExpectationTemplates:o.query({query:({id:e,fsId:t})=>({url:`/project/${e}/featurestores/${t}/greatexpectations/all`}),transformResponse:e=>e.items.sort((t,r)=>t.expectationType.localeCompare(r.expectationType)),providesTags:u.cacheByIdArgProperty(p.ProjectTags.ExpectationTemplates)}),attachExpectationSuite:o.mutation({query:({fgId:e,id:t,fsId:r,data:a})=>({url:`/project/${t}/featurestores/${r}/featuregroups/${e}/expectationsuite`,method:"post",data:a})}),updateExpectationSuite:o.mutation({query:({fgId:e,id:t,fsId:r,data:a})=>({url:`/project/${t}/featurestores/${r}/featuregroups/${e}/expectationsuite/${a.id}`,method:"put",data:a})}),deleteExpectationSuite:o.mutation({query:({fgId:e,id:t,fsId:r,esId:a})=>({url:`/project/${t}/featurestores/${r}/featuregroups/${e}/expectationsuite/${a}`,method:"delete"})}),validateExpectationSuite:o.mutation({query:({pId:e,fgId:t,fsId:r})=>({url:`/project/${e}/featurestores/${r}/featuregroups/${t}/expectationsuite/validate`,method:"post"})})})}),{useGetValidationReportQuery:d,useGetValidationResultQuery:g,useGetValidationHistoryQuery:f,useGetExpectationTemplatesQuery:x,useDeleteExpectationSuiteMutation:q,useAttachExpectationSuiteMutation:v,useUpdateExpectationSuiteMutation:E,useValidateExpectationSuiteMutation:S}=m;export{E as a,x as b,q as c,S as d,d as e,f,v as u};
