import{f as n}from"./index-DCLQfd0E.js";async function r(t=1,a=20,s){const e={page:t,page_size:a};s!==void 0&&(e.api_key_id=s);const{data:i}=await n.get("/usage",{params:e});return i}async function d(t,a={}){const{data:s}=await n.get("/usage",{...a,params:t});return s}async function g(t="today",a){const s={period:t};a!==void 0&&(s.api_key_id=a);const{data:e}=await n.get("/usage/stats",{params:s});return e}async function o(t,a,s){const e={start_date:t,end_date:a};s!==void 0&&(e.api_key_id=s);const{data:i}=await n.get("/usage/stats",{params:e});return i}async function c(t,a,s){const e={start_date:t,end_date:a,page:1,page_size:100};s!==void 0&&(e.api_key_id=s);const{data:i}=await n.get("/usage",{params:e});return i}async function u(t){const{data:a}=await n.get(`/usage/${t}`);return a}async function y(){const{data:t}=await n.get("/usage/dashboard/stats");return t}async function f(t){const{data:a}=await n.get("/usage/dashboard/trend",{params:t});return a}async function _(t){const{data:a}=await n.get("/usage/dashboard/models",{params:t});return a}async function p(t,a){const{data:s}=await n.post("/usage/dashboard/api-keys-usage",{api_key_ids:t},{signal:a==null?void 0:a.signal});return s}const b={list:r,query:d,getStats:g,getStatsByDateRange:o,getByDateRange:c,getById:u,getDashboardStats:y,getDashboardTrend:f,getDashboardModels:_,getDashboardApiKeysUsage:p};export{b as u};
