import{A as t}from"./index-jHWjNw8g.js";async function u(){return(await t.get("/models")).data.data}async function l(e){return(await t.get(`/models/${e}`)).data.data}async function m(e){return(await t.post("/models",e)).data.data}async function f(e,s){return(await t.put(`/models/${e}`,s)).data.data}async function $(e){await t.delete(`/models/${e}`)}async function g(e){return(await t.get(`/models/${e}/versions`)).data.data}async function w(e,s){return(await t.get(`/models/${e}/versions/${s}`)).data.data}async function y(e,s){return(await t.post(`/models/${e}/versions`,s)).data.data}async function h(e,s,a){return(await t.patch(`/models/${e}/versions/${s}`,a)).data.data}async function v(e){return(await t.post("/models/detect-schema",e)).data.data}async function _(e,s,a){return(await t.put(`/models/${e}/versions/${s}/schema`,a)).data.data}async function V(e,s,a,n){await t.patch(`/models/${e}/versions/${s}/fields/${a}/threshold`,{alert_threshold:n})}async function z(e,s,a){const o={page_size:100};a&&(o.field_name=a);const r=await t.get(`/models/${e}/versions/${s}/drift-results`,{params:o});let c=r.data.data;if(r.data.meta.total>100){const d=Math.ceil(r.data.meta.total/100);for(let i=2;i<=d;i++){const p=await t.get(`/models/${e}/versions/${s}/drift-results`,{params:{...o,page:i,page_size:100}});c=c.concat(p.data.data)}}return c}async function A(e,s,a="day"){return(await t.get(`/models/${e}/versions/${s}/inference-volume`,{params:{bucket:a}})).data.data}const S={list:u,get:l,create:m,update:f,delete:$,listVersions:g,getVersion:w,createVersion:y,updateVersion:h,updateVersionSchema:_,updateFieldThreshold:V,detectSchema:v,getDriftResults:z,getInferenceVolume:A};export{S as m};
