import{M as y,P as u,O as p,eb as n,A as l}from"./index-DHiyXWqE.js";const c=l({result:JSON.parse,expectationConfig:JSON.parse,exceptionInfo:JSON.parse,meta:JSON.parse}),m=y.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=>{var r;return{...t,statistics:JSON.parse(t.statistics),results:(r=t.results)==null?void 0:r.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,useGetValidationHistoryQuery:g,useGetExpectationTemplatesQuery:f,useDeleteExpectationSuiteMutation:x,useAttachExpectationSuiteMutation:q,useUpdateExpectationSuiteMutation:E,useValidateExpectationSuiteMutation:S}=m;export{E as a,f as b,x as c,S as d,d as e,g as f,q as u};
