Files
kefu/deploy/archive-performance-fix/admin-web/apps/web-antd/dist/js/use-archive-load-IFGFIhoZ.js
T
2026-09-21 10:34:06 +08:00

1 line
2.5 KiB
JavaScript

import{ot as e,pn as t,vn as n}from"./runtime-core.esm-bundler-DkysjgTd.js";import{n as r}from"./objectWithoutProperties-BjoYlK0I.js";import{i}from"./store-B2JSspJ1.js";function a(e){let t=new URLSearchParams;Object.entries(e).forEach(([e,n])=>{n!==``&&t.set(e,String(n))});let n=t.toString();return n?`?${n}`:``}function o(e=0,t){return i.get(`/archive/stats${a({account_id:e})}`,{signal:t})}function s(e=50,t=``,n=0,r){return i.get(`/archive/conversations${a({account_id:n,cursor:t,limit:e})}`,{signal:r})}function c(e,t=100,n=``,r=0,o){return i.get(`/archive/conversations/${encodeURIComponent(e)}/messages${a({account_id:r,cursor:n,limit:t})}`,{signal:o})}function l(e,t=900,n=0,r){return i.post(`/archive/media/access-urls${a({account_id:n})}`,{expires:t,media_ids:e},{signal:r})}function u(e){return i.get(`/archive/storage`,{signal:e})}function d(e){return i.put(`/archive/storage`,e)}function f(){return i.post(`/archive/storage/test`)}function p(e=100,t=0,n){return i.get(`/archive/media${a({account_id:t,limit:e})}`,{signal:n})}function m(e=100,t=``,n=0,r){return i.get(`/archive/people${a({account_id:n,keyword:t,limit:e})}`,{signal:r})}function h(e,t=0){return i.get(`/archive/people/${encodeURIComponent(e)}${a({account_id:t})}`)}function g(e,t,n=0){return i.post(`/archive/people/${encodeURIComponent(e)}/identities${a({account_id:n})}`,t)}function _(e,t,n=1,r=20){return i.get(`/archive/patients/search${a({account_id:t,keyword:e,page_no:n,page_size:r})}`)}function v(e,t,n){return i.put(`/archive/people/${encodeURIComponent(e)}/patient-bindings${a({account_id:n})}`,t)}function y(e,t,n){return i.delete(`/archive/people/${encodeURIComponent(e)}/patient-bindings/${encodeURIComponent(t)}${a({account_id:n})}`)}function b(e,t=0){return i.post(`/archive/exports${a({account_id:t})}`,e)}function x(e=100,t=0,n){return i.get(`/archive/exports${a({account_id:t,limit:e})}`,{signal:n})}function S(e,t=0){return i.download(`/archive/export-files/${encodeURIComponent(e)}/download${a({account_id:t})}`)}function C(){let i=n(!1),a;function o(){a==null||a.abort(),a=void 0,i.value=!1}function s(e,t){return c.apply(this,arguments)}function c(){return c=r(function*(e,t){o();let n=new AbortController;a=n,i.value=!0;try{let r=yield e(n.signal);a===n&&!n.signal.aborted&&t(r)}catch(e){}finally{a===n&&(i.value=!1)}}),c.apply(this,arguments)}return e(o),t(o),{cancel:o,loading:i,run:s}}export{f as _,S as a,p as c,m as d,h as f,_ as g,d as h,b as i,l,u as m,g as n,s as o,o as p,v as r,x as s,C as t,c as u,y as v};