import{b as t}from"./CF1ujZlL.js";import{e as u}from"./92N1comP.js";async function i(e=1,a=20){const s=await t.getFullBody("/users",{page:String(e),per_page:String(a)}),n=s.data??[],r=s.meta?.pagination??{};return{users:n,total:r.total??n.length,page:r.page??e,perPage:r.per_page??a,totalPages:r.total_pages??1}}async function f(e){const{data:a,headers:s}=await t.requestRaw("GET",`/users/${e}`);return{user:a,etag:u(s)}}async function d(e){return t.post("/users",e)}async function p(e,a,s){const n={};s&&(n["If-Match"]=`"${s}"`);const r=await t.requestRaw("PATCH",`/users/${e}`,{body:a,headers:n});return{user:r.data,etag:u(r.headers)}}async function l(e){await t.delete(`/users/${e}`)}async function y(e,a){return t.uploadFile(`/users/${e}/avatar`,a,{fieldName:"avatar"})}async function g(e){return t.delete(`/users/${e}/avatar`)}async function $(e){return t.post(`/users/${e}/2fa`)}async function b(e,a){return t.post(`/users/${e}/2fa/enable`,{code:a})}async function m(e,a){const s={};return a&&(s.code=a),t.post(`/users/${e}/2fa/disable`,s)}async function w(e){return t.get(`/users/${e}/api-keys`)}async function h(e,a,s){const n={name:a};return s&&s>0&&(n.expiry_days=s),t.post(`/users/${e}/api-keys`,n)}async function A(e,a){await t.delete(`/users/${e}/api-keys/${a}`)}export{$ as a,w as b,d as c,m as d,b as e,h as f,i as g,A as h,g as i,f as j,p as k,l,y as u};
