@quan-erp/shared-backend-core 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/0d45f5fd/5KlFrPzh.js +1 -0
- package/dist/0d45f5fd/B39PJnPI.js +1 -0
- package/dist/0d45f5fd/B9PiPcem.js +1 -0
- package/dist/0d45f5fd/B9n9G1yv.js +1 -0
- package/dist/0d45f5fd/BG4uzJH8.js +1 -0
- package/dist/0d45f5fd/BSYoBKie.js +1 -0
- package/dist/0d45f5fd/BSoQlFtK.js +1 -0
- package/dist/0d45f5fd/BdIoxvqZ.js +1 -0
- package/dist/0d45f5fd/Bjtfltpk.js +1 -0
- package/dist/0d45f5fd/BnAtyUlK.js +1 -0
- package/dist/0d45f5fd/BnVVAcqU.js +1 -0
- package/dist/0d45f5fd/BpygDVVM.js +1 -0
- package/dist/0d45f5fd/BtsQx3aY.js +1 -0
- package/dist/0d45f5fd/CCA7LWmS.js +1 -0
- package/dist/0d45f5fd/CKB1ifMq.js +1 -0
- package/dist/0d45f5fd/CRwWF7UI.js +1 -0
- package/dist/0d45f5fd/CXJRBJWG.js +1 -0
- package/dist/0d45f5fd/CXtVchjo.js +1 -0
- package/dist/0d45f5fd/Cai5KXIT.js +1 -0
- package/dist/0d45f5fd/Cg31gF4E.js +1 -0
- package/dist/0d45f5fd/Cq4RSZy9.js +1 -0
- package/dist/0d45f5fd/DC3PtGPu.js +1 -0
- package/dist/0d45f5fd/DIFFnF56.js +1 -0
- package/dist/0d45f5fd/DOcmAiwD.js +1 -0
- package/dist/0d45f5fd/Da8GroSP.js +1 -0
- package/dist/0d45f5fd/Di60wa_E.js +1 -0
- package/dist/0d45f5fd/DvG5qFao.js +1 -0
- package/dist/0d45f5fd/DyEymKEk.js +1 -0
- package/dist/0d45f5fd/UGXY0ODE.js +1 -0
- package/dist/0d45f5fd/__eOk8J6.js +1 -0
- package/dist/0d45f5fd/asmaHIQv.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/25p0Miq_.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/5s8pBnVf.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/BE5KBeOK.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/BEPU-S6o.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/BWziVYGZ.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/BmoqY6qK.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/BoAUIetu.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/BwEGj0SR.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/C1HmfU8l.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/CcS-MRSy.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/CtrMkht2.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/CvvA02Hw.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/Cyqt_ETc.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/DGkvCdvx.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/DScQTTOQ.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/DZmJZNCG.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/DfpMAyYK.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/DoVADpy9.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/GwLgwN_L.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/U9R2mFhp.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/oLO9WiPq.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/wumOP7IP.js +1 -0
- package/dist/0d45f5fd/da7f739f/06cc432b/xadXToXe.js +1 -0
- package/dist/0d45f5fd/da7f739f/BmmPTjeD.js +1 -0
- package/dist/0d45f5fd/da7f739f/CvY_IQUA.js +1 -0
- package/dist/0d45f5fd/da7f739f/CzJW4exV.js +1 -0
- package/dist/0d45f5fd/da7f739f/Db3MBFjV.js +1 -0
- package/dist/0d45f5fd/da7f739f/DtAPNglw.js +1 -0
- package/dist/0d45f5fd/da7f739f/fr7kJRNu.js +1 -0
- package/dist/0d45f5fd/evrUwPJ-.js +1 -0
- package/dist/0d45f5fd/o9g8wBjh.js +1 -0
- package/dist/2ad56231/01dcea55/AwPsPqwP.js +1 -0
- package/dist/2ad56231/01dcea55/Cz1YOfmh.js +1 -0
- package/dist/2ad56231/01dcea55/DbyYeAcK.js +1 -0
- package/dist/2ad56231/1242ab99/BA2IW6c-.js +1 -0
- package/dist/2ad56231/1242ab99/CsEQAHhz.js +1 -0
- package/dist/2ad56231/1242ab99/Dw013QG2.js +1 -0
- package/dist/2ad56231/258b1873/DJawI8Tt.js +1 -0
- package/dist/2ad56231/258b1873/DzDc9Y5O.js +1 -0
- package/dist/2ad56231/2c0a4857/BwRIrBb3.js +1 -0
- package/dist/2ad56231/2d464c7d/83Yc1Hce.js +1 -0
- package/dist/2ad56231/2d464c7d/B9IugnhI.js +1 -0
- package/dist/2ad56231/3549b002/B4AKkY6Y.js +1 -0
- package/dist/2ad56231/3549b002/BwXRw8qz.js +1 -0
- package/dist/2ad56231/3b9c358f/B9TqbaT4.js +1 -0
- package/dist/2ad56231/3b9c358f/NMwzw7gO.js +1 -0
- package/dist/2ad56231/466e5b9c/Buwsv_7w.js +1 -0
- package/dist/2ad56231/466e5b9c/CeA-GNfe.js +1 -0
- package/dist/2ad56231/54246ca2/BH4qJOxT.js +1 -0
- package/dist/2ad56231/54246ca2/BLxcE0jr.js +1 -0
- package/dist/2ad56231/54246ca2/CLTAEbdq.js +1 -0
- package/dist/2ad56231/60be9861/D_PpGELJ.js +1 -0
- package/dist/2ad56231/618b8c8d/CVcmoBY3.js +1 -0
- package/dist/2ad56231/618b8c8d/xJCbY_5T.js +1 -0
- package/dist/2ad56231/7f3fa48c/Dj2y3_YR.js +1 -0
- package/dist/2ad56231/7f3fa48c/uFEX-gjF.js +1 -0
- package/dist/2ad56231/7f9ba364/Czs1Ohri.js +1 -0
- package/dist/2ad56231/7f9ba364/DiH_Qe6t.js +1 -0
- package/dist/2ad56231/83b99aea/CKYFeURr.js +1 -0
- package/dist/2ad56231/83b99aea/NkYh5QNp.js +1 -0
- package/dist/2ad56231/85000c0b/CT5JfXDU.js +1 -0
- package/dist/2ad56231/9983e5f2/B-nEfBPG.js +1 -0
- package/dist/2ad56231/9983e5f2/CsSmIxA6.js +1 -0
- package/dist/2ad56231/9d263798/4EVoBbMS.js +1 -0
- package/dist/2ad56231/Cb2X6t1P.js +1 -0
- package/dist/2ad56231/DvZRtj63.js +1 -0
- package/dist/2ad56231/a7b85550/D-_A5y4Y.js +1 -0
- package/dist/2ad56231/a7b85550/bLwrG6oQ.js +1 -0
- package/dist/2ad56231/e6eaea18/7517017f/fOK4Yqwl.js +1 -0
- package/dist/2ad56231/e6eaea18/DH0d9qaL.js +1 -0
- package/dist/2ad56231/e6eaea18/sVUlA6tr.js +1 -0
- package/dist/2ad56231/e938ace2/DW_NuK5v.js +1 -0
- package/dist/2ad56231/e938ace2/De4S4dnC.js +1 -0
- package/dist/2ad56231/ec72b956/ClRr2YrL.js +1 -0
- package/dist/2ad56231/ec72b956/Ctb6muYY.js +1 -0
- package/dist/2ad56231/vRD99Hpr.js +1 -0
- package/dist/2cc49785/5sVGLc0F.js +1 -0
- package/dist/2cc49785/B5fBjtkr.js +1 -0
- package/dist/2cc49785/BAffXqRd.js +1 -0
- package/dist/2cc49785/BCYnJvIR.js +1 -0
- package/dist/2cc49785/BIOKfeGU.js +1 -0
- package/dist/2cc49785/BKJkVgsW.js +1 -0
- package/dist/2cc49785/Bd1ydJag.js +1 -0
- package/dist/2cc49785/C4OM0mLw.js +1 -0
- package/dist/2cc49785/CL8e3nzY.js +1 -0
- package/dist/2cc49785/CLlWYd0R.js +1 -0
- package/dist/2cc49785/ClYe_VwO.js +1 -0
- package/dist/2cc49785/Cu5EkDoB.js +1 -0
- package/dist/2cc49785/XvEhrcTr.js +1 -0
- package/dist/2cc49785/_aC-WIP1.js +1 -0
- package/dist/2cc49785/a57L0oEj.js +1 -0
- package/dist/2cc49785/e6eaea18/Cjqk0vWG.js +1 -0
- package/dist/2cc49785/e6eaea18/D0fNkjon.js +1 -0
- package/dist/2cc49785/e6eaea18/D3Dn1MIt.js +1 -0
- package/dist/2cc49785/e6eaea18/yhPGRXBG.js +1 -0
- package/dist/2cc49785/hhsuZ2nK.js +1 -0
- package/dist/2cc49785/jng0g1H1.js +1 -0
- package/dist/2cc49785/k2901Fu3.js +1 -0
- package/dist/46b42b42/CEmdabCT.js +1 -0
- package/dist/6610c73e/04f8996d/BWF6rOkR.js +1 -0
- package/dist/6610c73e/04f8996d/CaXcz_i7.js +1 -0
- package/dist/6610c73e/04f8996d/CmjhNO_P.js +1 -0
- package/dist/6610c73e/04f8996d/DKxCvRhP.js +1 -0
- package/dist/6610c73e/04f8996d/DtGMr0d5.js +1 -0
- package/dist/6610c73e/04f8996d/Z48L3dXG.js +1 -0
- package/dist/6610c73e/09355034/CODWyl4K.js +1 -0
- package/dist/6610c73e/09355034/gHwDpi39.js +1 -0
- package/dist/6610c73e/108201be/CXkV9Wml.js +1 -0
- package/dist/6610c73e/108201be/Cu4DoJ6P.js +1 -0
- package/dist/6610c73e/108201be/DTOIXs__.js +1 -0
- package/dist/6610c73e/2882bf13/DrsfObL3.js +1 -0
- package/dist/6610c73e/2882bf13/bCn1uuNp.js +1 -0
- package/dist/6610c73e/2a1073a6/B_5Deuzb.js +1 -0
- package/dist/6610c73e/2a1073a6/CkBoFImc.js +1 -0
- package/dist/6610c73e/340a3320/DMu-yu6w.js +1 -0
- package/dist/6610c73e/340a3320/WtvAQ1Zk.js +1 -0
- package/dist/6610c73e/3cae9be6/DZFOH9Z2.js +1 -0
- package/dist/6610c73e/3cae9be6/lxWv5dai.js +1 -0
- package/dist/6610c73e/48e13c1e/BaWTxVuk.js +1 -0
- package/dist/6610c73e/48e13c1e/DC8jiBLc.js +1 -0
- package/dist/6610c73e/4b168d88/CBc-ilUo.js +1 -0
- package/dist/6610c73e/4b168d88/Dk7iGuFo.js +1 -0
- package/dist/6610c73e/4b168d88/NIu8TJUV.js +1 -0
- package/dist/6610c73e/5e1ecee0/CuVdoLW5.js +1 -0
- package/dist/6610c73e/5e689e2b/BBEFD0MJ.js +1 -0
- package/dist/6610c73e/5e689e2b/D63jRed3.js +1 -0
- package/dist/6610c73e/5e689e2b/si0E7vy4.js +1 -0
- package/dist/6610c73e/6e1815de/DAEjspug.js +1 -0
- package/dist/6610c73e/82de49c1/CsBZXKps.js +1 -0
- package/dist/6610c73e/87f29211/00282ba1/BKMWpuIK.js +1 -0
- package/dist/6610c73e/87f29211/00282ba1/Cz6fk5Wc.js +1 -0
- package/dist/6610c73e/87f29211/00282ba1/UFVg93nd.js +1 -0
- package/dist/6610c73e/87f29211/0f8de574/CpohrteO.js +1 -0
- package/dist/6610c73e/87f29211/3681c247/CS5g0xlW.js +1 -0
- package/dist/6610c73e/87f29211/3681c247/D3o0RqEX.js +1 -0
- package/dist/6610c73e/87f29211/6fd89734/9YxHEjDK.js +1 -0
- package/dist/6610c73e/87f29211/87f29211/C6uLcJPv.js +1 -0
- package/dist/6610c73e/87f29211/a9d0df18/B72PlhwA.js +1 -0
- package/dist/6610c73e/87f29211/a9d0df18/BCYE1vDG.js +1 -0
- package/dist/6610c73e/87f29211/a9d0df18/BSCkvdZ1.js +1 -0
- package/dist/6610c73e/87f29211/a9d0df18/BVg40SgX.js +1 -0
- package/dist/6610c73e/87f29211/a9d0df18/CMGCNHO4.js +1 -0
- package/dist/6610c73e/87f29211/b10ca3c4/BOLYM85y.js +1 -0
- package/dist/6610c73e/87f29211/b10ca3c4/D24x_3dy.js +1 -0
- package/dist/6610c73e/87f29211/b10ca3c4/DE25xVRs.js +1 -0
- package/dist/6610c73e/87f29211/fc973325/BAl3nDHD.js +1 -0
- package/dist/6610c73e/87f29211/fc973325/C64aaE_N.js +1 -0
- package/dist/6610c73e/87f29211/fc973325/DfF3lHvu.js +1 -0
- package/dist/6610c73e/8a6cead4/HoQvvqKQ.js +1 -0
- package/dist/6610c73e/D9H-YP7D.js +1 -0
- package/dist/6610c73e/b77349bf/BMAKW8m1.js +1 -0
- package/dist/6610c73e/b77349bf/D6WADvlw.js +1 -0
- package/dist/6610c73e/bbc5e661/hSkxlapS.js +1 -0
- package/dist/6610c73e/bbc5e661/tRmwB0Ab.js +1 -0
- package/dist/6610c73e/bd5c70f7/mOPMbxOa.js +1 -0
- package/dist/6610c73e/c374eea5/C_oo4cXt.js +1 -0
- package/dist/6610c73e/c374eea5/DAMptVg5.js +1 -0
- package/dist/6610c73e/da7f739f/BYicXwEj.js +1 -0
- package/dist/6610c73e/da7f739f/s2U4XeTc.js +1 -0
- package/dist/6610c73e/f38c764c/ClTmuz3f.js +1 -0
- package/dist/6610c73e/f38c764c/FzrDaVim.js +1 -0
- package/dist/6610c73e/f38c764c/qDdEVNYd.js +1 -0
- package/dist/6610c73e/fdeb3389/BR9K3ZBb.js +1 -0
- package/dist/6610c73e/fdeb3389/BW0M26Pt.js +1 -0
- package/dist/871f3f39/3-RV1Nvh.js +1 -0
- package/dist/871f3f39/B0WsLvd-.js +1 -0
- package/dist/871f3f39/B46GW4Vh.js +1 -0
- package/dist/871f3f39/BGoChp9H.js +1 -0
- package/dist/871f3f39/BHmcll93.js +1 -0
- package/dist/871f3f39/BY-kbHqP.js +1 -0
- package/dist/871f3f39/Bbr4nitJ.js +1 -0
- package/dist/871f3f39/Bc6LGIQu.js +1 -0
- package/dist/871f3f39/BdXXlrKL.js +1 -0
- package/dist/871f3f39/BoqeRGCn.js +1 -0
- package/dist/871f3f39/Bu9hWZCD.js +1 -0
- package/dist/871f3f39/C2m7j5qh.js +1 -0
- package/dist/871f3f39/CFN-fsiD.js +1 -0
- package/dist/871f3f39/CUS6_AMK.js +1 -0
- package/dist/871f3f39/Cmsu5KK7.js +1 -0
- package/dist/871f3f39/Cx5X1Vvz.js +1 -0
- package/dist/871f3f39/D1xWpNbO.js +1 -0
- package/dist/871f3f39/D3YMKsRk.js +1 -0
- package/dist/871f3f39/D6g3V5OE.js +1 -0
- package/dist/871f3f39/DcqjrN7k.js +1 -0
- package/dist/871f3f39/QBqrZxtz.js +1 -0
- package/dist/871f3f39/kgYqEVK1.js +1 -0
- package/dist/871f3f39/lTtOC6ek.js +1 -0
- package/dist/871f3f39/po68uTxW.js +1 -0
- package/dist/9477dda6/CFyCv-GB.js +1 -0
- package/dist/9477dda6/DIoDs5M_.js +1 -0
- package/dist/9f80922e/5XFiGZsG.js +1 -0
- package/dist/BWkMrHuo.js +1 -0
- package/dist/DJSe7osj.js +1 -0
- package/dist/abe2c417/B1Ewpect.js +1 -0
- package/dist/abe2c417/BqnwMeCy.js +1 -0
- package/dist/abe2c417/C0G57Pwe.js +1 -0
- package/dist/abe2c417/CEB_j614.js +1 -0
- package/dist/abe2c417/CLABtmwy.js +1 -0
- package/dist/abe2c417/CNiL-ChU.js +1 -0
- package/dist/abe2c417/CV67ztVb.js +1 -0
- package/dist/abe2c417/CaWcWRhY.js +1 -0
- package/dist/abe2c417/CoVXKJh5.js +1 -0
- package/dist/abe2c417/DBb4G-HP.js +1 -0
- package/dist/abe2c417/DCY3ehAH.js +1 -0
- package/dist/abe2c417/DKWvNL0q.js +1 -0
- package/dist/abe2c417/DT_whRfi.js +1 -0
- package/dist/abe2c417/LXm3t009.js +1 -0
- package/dist/abe2c417/Lvd3rf8x.js +1 -0
- package/dist/abe2c417/kEG-y8qb.js +1 -0
- package/dist/abe2c417/ugzW3tmu.js +1 -0
- package/dist/abe2c417/yBBNgsRd.js +1 -0
- package/dist/d58efc4e/DtLRjtgg.js +1 -0
- package/dist/fbc6c1d4/D5cBvB9j.js +1 -0
- package/dist/fd7f274b/BG5oN9EM.js +1 -0
- package/dist/fd7f274b/BobTe5_-.js +1 -0
- package/dist/fd7f274b/Bq2MX2tN.js +1 -0
- package/dist/fd7f274b/C0kwc9km.js +1 -0
- package/dist/fd7f274b/CpGOV-2E.js +1 -0
- package/dist/fd7f274b/CsgOaYTS.js +1 -0
- package/dist/fd7f274b/D24GT5y1.js +1 -0
- package/dist/fd7f274b/ST9KOcsE.js +1 -0
- package/dist/fd7f274b/npvNsAoI.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/0274021b/47a09c7e.d.ts +4 -0
- package/dist/types/0d45f5fd/000288c6.d.ts +22 -0
- package/dist/types/0d45f5fd/02800656.d.ts +17 -0
- package/dist/types/0d45f5fd/0fb8754a.d.ts +77 -0
- package/dist/types/0d45f5fd/13052334.d.ts +62 -0
- package/dist/types/0d45f5fd/1428ba3f.d.ts +3 -0
- package/dist/types/0d45f5fd/1c59aca9.d.ts +302 -0
- package/dist/types/0d45f5fd/262b0493.d.ts +21 -0
- package/dist/types/0d45f5fd/2881a088.d.ts +26 -0
- package/dist/types/0d45f5fd/496c2854.d.ts +14 -0
- package/dist/types/0d45f5fd/4b41f653.d.ts +15 -0
- package/dist/types/0d45f5fd/4ced2577.d.ts +28 -0
- package/dist/types/0d45f5fd/4db5cc33.d.ts +165 -0
- package/dist/types/0d45f5fd/4dd6b41d.d.ts +80 -0
- package/dist/types/0d45f5fd/5c6ee442.d.ts +24 -0
- package/dist/types/0d45f5fd/60dffdb5.d.ts +57 -0
- package/dist/types/0d45f5fd/6559a8c1.d.ts +104 -0
- package/dist/types/0d45f5fd/6d626690.d.ts +66 -0
- package/dist/types/0d45f5fd/78464d38.d.ts +189 -0
- package/dist/types/0d45f5fd/7932a0bf.d.ts +28 -0
- package/dist/types/0d45f5fd/7ec9eec1.d.ts +28 -0
- package/dist/types/0d45f5fd/885b723d.d.ts +59 -0
- package/dist/types/0d45f5fd/8e161648.d.ts +67 -0
- package/dist/types/0d45f5fd/8e609bb7.d.ts +1 -0
- package/dist/types/0d45f5fd/93c2615f.d.ts +27 -0
- package/dist/types/0d45f5fd/96fd122b.d.ts +24 -0
- package/dist/types/0d45f5fd/9a2c73cf.d.ts +365 -0
- package/dist/types/0d45f5fd/a1a2ec11.d.ts +142 -0
- package/dist/types/0d45f5fd/a45e63d6.d.ts +4 -0
- package/dist/types/0d45f5fd/a73ae28b.d.ts +48 -0
- package/dist/types/0d45f5fd/b5020a96.d.ts +36 -0
- package/dist/types/0d45f5fd/b528e7a2.d.ts +81 -0
- package/dist/types/0d45f5fd/ba35bfca.d.ts +36 -0
- package/dist/types/0d45f5fd/d453df06.d.ts +34 -0
- package/dist/types/0d45f5fd/d9b4a449.d.ts +316 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/06650bfd.d.ts +13 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/228cff9f.d.ts +13 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/2a8ae20e.d.ts +13 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/3110d02c.d.ts +13 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/3d168b1c.d.ts +22 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/4650afb2.d.ts +13 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/483335d4.d.ts +37 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/5173b4f0.d.ts +26 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/539f31f2.d.ts +25 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/546ed991.d.ts +43 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/5f1c4d9b.d.ts +48 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/8db0fea5.d.ts +15 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/a10395b5.d.ts +13 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/aabb6337.d.ts +13 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/b16083fb.d.ts +29 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/b5784cae.d.ts +38 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/b69d1169.d.ts +13 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/b9a7f4ad.d.ts +20 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/c794fb87.d.ts +27 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/d1eb6a2a.d.ts +40 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/d5ee1c94.d.ts +36 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/d6e89c7c.d.ts +13 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/d8b70efb.d.ts +13 -0
- package/dist/types/0d45f5fd/da7f739f/06cc432b/e2a08a0c.d.ts +27 -0
- package/dist/types/0d45f5fd/da7f739f/079fe83d.d.ts +14 -0
- package/dist/types/0d45f5fd/da7f739f/2a1fe862.d.ts +26 -0
- package/dist/types/0d45f5fd/da7f739f/2d25ebcf.d.ts +8 -0
- package/dist/types/0d45f5fd/da7f739f/3e71dc06.d.ts +4 -0
- package/dist/types/0d45f5fd/da7f739f/597ef69e.d.ts +90 -0
- package/dist/types/0d45f5fd/da7f739f/a588a26e.d.ts +80 -0
- package/dist/types/0d45f5fd/da7f739f/f7427a8d.d.ts +33 -0
- package/dist/types/0d45f5fd/da7f739f/fb5fafa3.d.ts +12 -0
- package/dist/types/0d45f5fd/ec0a65fc.d.ts +32 -0
- package/dist/types/0d45f5fd/ed08a5cd.d.ts +17 -0
- package/dist/types/0d45f5fd/ee447758.d.ts +3 -0
- package/dist/types/0d45f5fd/f7da2669.d.ts +6 -0
- package/dist/types/2ad56231/01dcea55/0a5f3cca.d.ts +26 -0
- package/dist/types/2ad56231/01dcea55/1cdf989f.d.ts +13 -0
- package/dist/types/2ad56231/01dcea55/344c0cbf.d.ts +12 -0
- package/dist/types/2ad56231/01dcea55/3a555783.d.ts +17 -0
- package/dist/types/2ad56231/1242ab99/21beedc5.d.ts +53 -0
- package/dist/types/2ad56231/1242ab99/7b7754ee.d.ts +12 -0
- package/dist/types/2ad56231/1242ab99/abc978a7.d.ts +32 -0
- package/dist/types/2ad56231/1242ab99/e5ff734c.d.ts +6 -0
- package/dist/types/2ad56231/258b1873/2f33bb8d.d.ts +10 -0
- package/dist/types/2ad56231/258b1873/418b84b4.d.ts +5 -0
- package/dist/types/2ad56231/258b1873/f476762d.d.ts +56 -0
- package/dist/types/2ad56231/2c0a4857/2b466258.d.ts +11 -0
- package/dist/types/2ad56231/2d464c7d/55d4f50c.d.ts +8 -0
- package/dist/types/2ad56231/2d464c7d/e9a5b7d1.d.ts +4 -0
- package/dist/types/2ad56231/3549b002/8f6249d6.d.ts +7 -0
- package/dist/types/2ad56231/3549b002/9a52fb7c.d.ts +10 -0
- package/dist/types/2ad56231/3b9c358f/00c829a8.d.ts +12 -0
- package/dist/types/2ad56231/3b9c358f/298aef08.d.ts +93 -0
- package/dist/types/2ad56231/3b9c358f/8e609bb7.d.ts +1 -0
- package/dist/types/2ad56231/466e5b9c/b9f2cf40.d.ts +12 -0
- package/dist/types/2ad56231/466e5b9c/ba999e69.d.ts +63 -0
- package/dist/types/2ad56231/466e5b9c/cf4df18c.d.ts +19 -0
- package/dist/types/2ad56231/517bc292.d.ts +4 -0
- package/dist/types/2ad56231/54246ca2/ba53415c.d.ts +43 -0
- package/dist/types/2ad56231/54246ca2/c766feba.d.ts +38 -0
- package/dist/types/2ad56231/54246ca2/ddde299e.d.ts +10 -0
- package/dist/types/2ad56231/60be9861/b353ab56.d.ts +6 -0
- package/dist/types/2ad56231/618b8c8d/328b7669.d.ts +29 -0
- package/dist/types/2ad56231/618b8c8d/f362ec51.d.ts +11 -0
- package/dist/types/2ad56231/618b8c8d/febc0d90.d.ts +9 -0
- package/dist/types/2ad56231/7f3fa48c/33ac582f.d.ts +14 -0
- package/dist/types/2ad56231/7f3fa48c/5319afba.d.ts +93 -0
- package/dist/types/2ad56231/7f3fa48c/66bbc22d.d.ts +40 -0
- package/dist/types/2ad56231/7f9ba364/09265e63.d.ts +19 -0
- package/dist/types/2ad56231/7f9ba364/0ac71637.d.ts +27 -0
- package/dist/types/2ad56231/7f9ba364/e4ec6555.d.ts +45 -0
- package/dist/types/2ad56231/83b99aea/14bdfadf.d.ts +10 -0
- package/dist/types/2ad56231/83b99aea/6244682b.d.ts +4 -0
- package/dist/types/2ad56231/83b99aea/fc1f5daa.d.ts +10 -0
- package/dist/types/2ad56231/85000c0b/4024111d.d.ts +34 -0
- package/dist/types/2ad56231/85000c0b/632c90fb.d.ts +8 -0
- package/dist/types/2ad56231/9983e5f2/16ee99b3.d.ts +58 -0
- package/dist/types/2ad56231/9983e5f2/587bf67d.d.ts +21 -0
- package/dist/types/2ad56231/9983e5f2/9b6e3ed3.d.ts +10 -0
- package/dist/types/2ad56231/9ab6b92e.d.ts +41 -0
- package/dist/types/2ad56231/9d263798/45449764.d.ts +18 -0
- package/dist/types/2ad56231/a7b85550/0024064d.d.ts +51 -0
- package/dist/types/2ad56231/a7b85550/656e3fe6.d.ts +5 -0
- package/dist/types/2ad56231/a7b85550/c98f53f7.d.ts +8 -0
- package/dist/types/2ad56231/ceaf7c2a.d.ts +26 -0
- package/dist/types/2ad56231/d065312a.d.ts +8 -0
- package/dist/types/2ad56231/e6eaea18/29b1bffc.d.ts +27 -0
- package/dist/types/2ad56231/e6eaea18/66d737cb.d.ts +19 -0
- package/dist/types/2ad56231/e6eaea18/6f5b7e90.d.ts +9 -0
- package/dist/types/2ad56231/e6eaea18/7517017f/7682dd42.d.ts +17 -0
- package/dist/types/2ad56231/e938ace2/2f240da4.d.ts +3 -0
- package/dist/types/2ad56231/e938ace2/4c4d66e7.d.ts +10 -0
- package/dist/types/2ad56231/e938ace2/c2e78ccc.d.ts +52 -0
- package/dist/types/2ad56231/ec72b956/d75444a8.d.ts +81 -0
- package/dist/types/2ad56231/ec72b956/d8c49f52.d.ts +22 -0
- package/dist/types/2ad56231/ec72b956/d96821de.d.ts +8 -0
- package/dist/types/2cc49785/048ca935.d.ts +10 -0
- package/dist/types/2cc49785/0f9f5cc9.d.ts +17 -0
- package/dist/types/2cc49785/1a4ff9f0.d.ts +15 -0
- package/dist/types/2cc49785/1fa712bf.d.ts +6 -0
- package/dist/types/2cc49785/265711a1.d.ts +11 -0
- package/dist/types/2cc49785/290169fd.d.ts +27 -0
- package/dist/types/2cc49785/2a1b2f6a.d.ts +25 -0
- package/dist/types/2cc49785/30e64fb4.d.ts +3 -0
- package/dist/types/2cc49785/35b9365a.d.ts +16 -0
- package/dist/types/2cc49785/46f89c68.d.ts +15 -0
- package/dist/types/2cc49785/4b7aaf01.d.ts +17 -0
- package/dist/types/2cc49785/5442f571.d.ts +20 -0
- package/dist/types/2cc49785/55670d06.d.ts +9 -0
- package/dist/types/2cc49785/56873654.d.ts +8 -0
- package/dist/types/2cc49785/5b00ec2d.d.ts +16 -0
- package/dist/types/2cc49785/75f9e41b.d.ts +13 -0
- package/dist/types/2cc49785/79c7a4c3.d.ts +9 -0
- package/dist/types/2cc49785/abb76582.d.ts +9 -0
- package/dist/types/2cc49785/e6eaea18/1228d90a.d.ts +50 -0
- package/dist/types/2cc49785/e6eaea18/17392bb9.d.ts +26 -0
- package/dist/types/2cc49785/e6eaea18/3fde60ac.d.ts +4 -0
- package/dist/types/2cc49785/e6eaea18/7dee4a42.d.ts +29 -0
- package/dist/types/2cc49785/e6eaea18/e337a2ef.d.ts +24 -0
- package/dist/types/2cc49785/e8dcc4f1.d.ts +28 -0
- package/dist/types/46b42b42/df62afb5.d.ts +43 -0
- package/dist/types/6610c73e/04f8996d/45843092.d.ts +87 -0
- package/dist/types/6610c73e/04f8996d/49f69d48.d.ts +12 -0
- package/dist/types/6610c73e/04f8996d/57b46faf.d.ts +67 -0
- package/dist/types/6610c73e/04f8996d/a671786c.d.ts +35 -0
- package/dist/types/6610c73e/04f8996d/b2dc285c.d.ts +8 -0
- package/dist/types/6610c73e/04f8996d/b9b7d6f9.d.ts +1 -0
- package/dist/types/6610c73e/09355034/5f5422ae.d.ts +22 -0
- package/dist/types/6610c73e/09355034/cec9d8a9.d.ts +6 -0
- package/dist/types/6610c73e/108201be/29b7d59c.d.ts +6 -0
- package/dist/types/6610c73e/108201be/aba2513d.d.ts +18 -0
- package/dist/types/6610c73e/108201be/c917408b.d.ts +9 -0
- package/dist/types/6610c73e/2882bf13/1b635431.d.ts +10 -0
- package/dist/types/6610c73e/2882bf13/5a5d4923.d.ts +20 -0
- package/dist/types/6610c73e/2882bf13/d0680253.d.ts +14 -0
- package/dist/types/6610c73e/2a1073a6/13feb6a7.d.ts +36 -0
- package/dist/types/6610c73e/2a1073a6/48a99f86.d.ts +6 -0
- package/dist/types/6610c73e/2a1073a6/d21224de.d.ts +10 -0
- package/dist/types/6610c73e/340a3320/7e87c266.d.ts +9 -0
- package/dist/types/6610c73e/340a3320/c0e4e1db.d.ts +13 -0
- package/dist/types/6610c73e/3cae9be6/43329c4e.d.ts +17 -0
- package/dist/types/6610c73e/3cae9be6/51c12952.d.ts +5 -0
- package/dist/types/6610c73e/48e13c1e/493a30cc.d.ts +10 -0
- package/dist/types/6610c73e/48e13c1e/62990ad1.d.ts +9 -0
- package/dist/types/6610c73e/4b168d88/08e67542.d.ts +17 -0
- package/dist/types/6610c73e/4b168d88/413ef4e3.d.ts +80 -0
- package/dist/types/6610c73e/4b168d88/d96befb1.d.ts +15 -0
- package/dist/types/6610c73e/5e1ecee0/83f47684.d.ts +6 -0
- package/dist/types/6610c73e/5e689e2b/08490b99.d.ts +37 -0
- package/dist/types/6610c73e/5e689e2b/a01d5c2f.d.ts +17 -0
- package/dist/types/6610c73e/5e689e2b/f6474de5.d.ts +13 -0
- package/dist/types/6610c73e/6e1815de/1ec1270e.d.ts +11 -0
- package/dist/types/6610c73e/6e1815de/cb4e0d9d.d.ts +10 -0
- package/dist/types/6610c73e/70e2c566.d.ts +14 -0
- package/dist/types/6610c73e/82de49c1/5a8e8a6f.d.ts +1 -0
- package/dist/types/6610c73e/82de49c1/a1399ef0.d.ts +17 -0
- package/dist/types/6610c73e/87f29211/00282ba1/99f0dde7.d.ts +14 -0
- package/dist/types/6610c73e/87f29211/00282ba1/cc85368e.d.ts +14 -0
- package/dist/types/6610c73e/87f29211/00282ba1/da49a2f9.d.ts +19 -0
- package/dist/types/6610c73e/87f29211/0f8de574/da48b377.d.ts +33 -0
- package/dist/types/6610c73e/87f29211/366ce10d.d.ts +1 -0
- package/dist/types/6610c73e/87f29211/3681c247/826d0be4.d.ts +25 -0
- package/dist/types/6610c73e/87f29211/3681c247/d3e02bcf.d.ts +45 -0
- package/dist/types/6610c73e/87f29211/6fd89734/7c0d7562.d.ts +3 -0
- package/dist/types/6610c73e/87f29211/87f29211/05219fd0.d.ts +4 -0
- package/dist/types/6610c73e/87f29211/87f29211/453ab4b4.d.ts +15 -0
- package/dist/types/6610c73e/87f29211/87f29211/8e609bb7.d.ts +1 -0
- package/dist/types/6610c73e/87f29211/a9d0df18/16022771.d.ts +118 -0
- package/dist/types/6610c73e/87f29211/a9d0df18/326e8c85.d.ts +18 -0
- package/dist/types/6610c73e/87f29211/a9d0df18/4ca22be8.d.ts +17 -0
- package/dist/types/6610c73e/87f29211/a9d0df18/8e25f6cf.d.ts +3 -0
- package/dist/types/6610c73e/87f29211/a9d0df18/fcfbd6d1.d.ts +5 -0
- package/dist/types/6610c73e/87f29211/b10ca3c4/805c4d09.d.ts +27 -0
- package/dist/types/6610c73e/87f29211/b10ca3c4/f5def7dc.d.ts +25 -0
- package/dist/types/6610c73e/87f29211/b10ca3c4/f6334307.d.ts +27 -0
- package/dist/types/6610c73e/87f29211/fc973325/1abe9fb9.d.ts +26 -0
- package/dist/types/6610c73e/87f29211/fc973325/60e62909.d.ts +9 -0
- package/dist/types/6610c73e/87f29211/fc973325/8e609bb7.d.ts +1 -0
- package/dist/types/6610c73e/87f29211/fc973325/9c8f6046.d.ts +23 -0
- package/dist/types/6610c73e/8a6cead4/40c4faf7.d.ts +8 -0
- package/dist/types/6610c73e/b77349bf/2349cc94.d.ts +13 -0
- package/dist/types/6610c73e/b77349bf/6d87f127.d.ts +12 -0
- package/dist/types/6610c73e/b77349bf/af3f15da.d.ts +29 -0
- package/dist/types/6610c73e/b96961ed.d.ts +31 -0
- package/dist/types/6610c73e/bbc5e661/1f1e37e4.d.ts +12 -0
- package/dist/types/6610c73e/bbc5e661/803a3b35.d.ts +6 -0
- package/dist/types/6610c73e/bbc5e661/edfe1989.d.ts +14 -0
- package/dist/types/6610c73e/bd5c70f7/cf852c15.d.ts +20 -0
- package/dist/types/6610c73e/c374eea5/4f55037c.d.ts +36 -0
- package/dist/types/6610c73e/c374eea5/8a8646a7.d.ts +9 -0
- package/dist/types/6610c73e/c374eea5/d76ffdee.d.ts +38 -0
- package/dist/types/6610c73e/da7f739f/186461ad.d.ts +20 -0
- package/dist/types/6610c73e/da7f739f/e016487a.d.ts +45 -0
- package/dist/types/6610c73e/f38c764c/4d91b5ee.d.ts +79 -0
- package/dist/types/6610c73e/f38c764c/50b90d0c.d.ts +33 -0
- package/dist/types/6610c73e/f38c764c/e1fae94b.d.ts +14 -0
- package/dist/types/6610c73e/fdeb3389/16152e20.d.ts +103 -0
- package/dist/types/6610c73e/fdeb3389/1f95de59.d.ts +19 -0
- package/dist/types/6610c73e/fdeb3389/81528d33.d.ts +8 -0
- package/dist/types/871f3f39/0de2afa3.d.ts +22 -0
- package/dist/types/871f3f39/2bfe94e3.d.ts +13 -0
- package/dist/types/871f3f39/2cd973f1.d.ts +7 -0
- package/dist/types/871f3f39/4d0fa07f.d.ts +14 -0
- package/dist/types/871f3f39/4dbaf1b6.d.ts +19 -0
- package/dist/types/871f3f39/4ec64ebc.d.ts +9 -0
- package/dist/types/871f3f39/517ae8c6.d.ts +4 -0
- package/dist/types/871f3f39/5724033a.d.ts +6 -0
- package/dist/types/871f3f39/6a0d07bb.d.ts +7 -0
- package/dist/types/871f3f39/7029faf8.d.ts +11 -0
- package/dist/types/871f3f39/708e3b90.d.ts +24 -0
- package/dist/types/871f3f39/799e57cf.d.ts +6 -0
- package/dist/types/871f3f39/7bee220c.d.ts +24 -0
- package/dist/types/871f3f39/871a1ed2.d.ts +10 -0
- package/dist/types/871f3f39/9341b4c5.d.ts +8 -0
- package/dist/types/871f3f39/a05a44ce.d.ts +42 -0
- package/dist/types/871f3f39/a1a44bf4.d.ts +18 -0
- package/dist/types/871f3f39/a225cc21.d.ts +19 -0
- package/dist/types/871f3f39/aa0f851c.d.ts +5 -0
- package/dist/types/871f3f39/ab461a4e.d.ts +7 -0
- package/dist/types/871f3f39/bdf74ccb.d.ts +23 -0
- package/dist/types/871f3f39/c6cb560c.d.ts +20 -0
- package/dist/types/871f3f39/e4e56e24.d.ts +35 -0
- package/dist/types/871f3f39/f2188d12.d.ts +9 -0
- package/dist/types/871f3f39/fd939073.d.ts +17 -0
- package/dist/types/9477dda6/6e82db8c.d.ts +19 -0
- package/dist/types/9477dda6/99edb198.d.ts +3 -0
- package/dist/types/9477dda6/a16c3886.d.ts +27 -0
- package/dist/types/9477dda6/a68fa9aa.d.ts +61 -0
- package/dist/types/9f80922e/3e32acfa.d.ts +22 -0
- package/dist/types/abe2c417/2b7d3deb.d.ts +9 -0
- package/dist/types/abe2c417/3237d5fa.d.ts +25 -0
- package/dist/types/abe2c417/55c65af8.d.ts +2 -0
- package/dist/types/abe2c417/61b22a6d.d.ts +1 -0
- package/dist/types/abe2c417/6b4e0f9e.d.ts +10 -0
- package/dist/types/abe2c417/7a260fda.d.ts +1 -0
- package/dist/types/abe2c417/7e2c18ef.d.ts +12 -0
- package/dist/types/abe2c417/84d2a9ed.d.ts +2 -0
- package/dist/types/abe2c417/8daabb83.d.ts +8 -0
- package/dist/types/abe2c417/8f79089f.d.ts +26 -0
- package/dist/types/abe2c417/a39169c6.d.ts +308 -0
- package/dist/types/abe2c417/b2732e39.d.ts +1 -0
- package/dist/types/abe2c417/dc04a1bd.d.ts +10 -0
- package/dist/types/abe2c417/e2fcc201.d.ts +17 -0
- package/dist/types/abe2c417/e7055140.d.ts +1 -0
- package/dist/types/abe2c417/ee24e24a.d.ts +1 -0
- package/dist/types/abe2c417/ef5d95cf.d.ts +44 -0
- package/dist/types/abe2c417/f7f8ce4e.d.ts +9 -0
- package/dist/types/abe2c417/f9ceab53.d.ts +50 -0
- package/dist/types/b7ca7461.d.ts +18 -0
- package/dist/types/d58efc4e/0bb17e35.d.ts +2 -0
- package/dist/types/d58efc4e/9f2ae4fe.d.ts +11 -0
- package/dist/types/d58efc4e/b8cff974.d.ts +3 -0
- package/dist/types/fbc6c1d4/80614691.d.ts +23 -0
- package/dist/types/fd7f274b/0daaeab3.d.ts +5 -0
- package/dist/types/fd7f274b/116d81bf.d.ts +1 -0
- package/dist/types/fd7f274b/272670be.d.ts +1 -0
- package/dist/types/fd7f274b/396495ab.d.ts +1 -0
- package/dist/types/fd7f274b/3c41945d.d.ts +1 -0
- package/dist/types/fd7f274b/41af1e6f.d.ts +38 -0
- package/dist/types/fd7f274b/4f9e1401.d.ts +4 -0
- package/dist/types/fd7f274b/6a4e3ffe.d.ts +9 -0
- package/dist/types/fd7f274b/6d8bea2a.d.ts +10 -0
- package/dist/types/fd7f274b/83451de8.d.ts +12 -0
- package/dist/types/fd7f274b/c5ce5c8f.d.ts +11 -0
- package/dist/types/index.d.ts +21 -0
- package/external.json +33 -0
- package/package.json +110 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import NodeCache from "node-cache";
|
|
2
|
+
import "reflect-metadata";
|
|
3
|
+
import { AppRoute } from "./1c59aca9.js";
|
|
4
|
+
import { Redis } from "ioredis";
|
|
5
|
+
import { Manager } from "./d453df06.js";
|
|
6
|
+
import { Request, Response } from 'express';
|
|
7
|
+
export declare const CACHE_METADATA_KEY = "server:cache";
|
|
8
|
+
export declare const CACHE_CLIENT_METADATA_KEY = "server:inject:cache";
|
|
9
|
+
export declare const CACHE_ROUTE_METADATA_KEY = "cache:route:create";
|
|
10
|
+
export declare const CACHE_ROUTE_DELETE_METADATA_KEY = "cache:route:delete";
|
|
11
|
+
/** Generator function that produces a single cache key from an Express request and response. */
|
|
12
|
+
type CacheKeyGenerator = (req: Request, res: Response) => string;
|
|
13
|
+
/** Generator function that produces an array of cache keys from an Express request and response. */
|
|
14
|
+
type CacheKeysGenerator = (req: Request, res: Response) => string[];
|
|
15
|
+
export declare function normalizeCacheKey(key: string | string[] | (() => string | string[]) | undefined): string[];
|
|
16
|
+
export interface CacheRouteOptions {
|
|
17
|
+
/** Time-to-live in milliseconds. Defaults to 10 seconds (10000 ms) if not provided. */
|
|
18
|
+
ttl?: number;
|
|
19
|
+
/** The plugin this cache belongs to. */
|
|
20
|
+
plugin?: string;
|
|
21
|
+
/** Optional name for the cache, can be used to group or identify caches. */
|
|
22
|
+
name?: string;
|
|
23
|
+
/** Optional custom key or key generator function to store the cached value. Defaults to method + args combination. */
|
|
24
|
+
key?: string | CacheKeyGenerator;
|
|
25
|
+
/**
|
|
26
|
+
* Indicates that this cache key depends on the keys in the `dependenciesKey` array.
|
|
27
|
+
* Dependency key deletion will work only when both `dependenciesKey` and `keyToDeletePrefix` are provided.
|
|
28
|
+
*/
|
|
29
|
+
dependenciesKey?: string | string[] | (() => string | string[]);
|
|
30
|
+
/**
|
|
31
|
+
* When a dependency key (provided in `dependenciesKey`) is deleted, it will also delete keys matching `keyToDeletePrefix`.
|
|
32
|
+
* Dependency key deletion will work only when both `dependenciesKey` and `keyToDeletePrefix` are provided.
|
|
33
|
+
*/
|
|
34
|
+
keyToDeletePrefix?: string | string[] | (() => string | string[]);
|
|
35
|
+
/** If true, parses the cached response into a ResponseDto object. Defaults to true. */
|
|
36
|
+
parseResponseDto?: boolean;
|
|
37
|
+
/** If true, caches error responses as well (e.g., responses with 4xx or 5xx status codes). Defaults to false. */
|
|
38
|
+
cacheErrorResponseDto?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Method decorator to enable caching for a specific route or method.
|
|
42
|
+
*
|
|
43
|
+
* @param options - Optional configuration for caching:
|
|
44
|
+
* - `ttl` (number): Time-to-live in milliseconds. Defaults to 10 seconds (10000 ms) if not provided.
|
|
45
|
+
* - `plugin` (string): The plugin this cache belongs to.
|
|
46
|
+
* - `name` (string): Optional name for the cache, can be used to group or identify caches.
|
|
47
|
+
* - `key` (string | CacheKeyGenerator): Optional custom key to store the cached value. Defaults to method + args combination.
|
|
48
|
+
* - `dependenciesKey` (string | string[] | Function): Cache key(s) this cache depends on.
|
|
49
|
+
* - `keyToDeletePrefix` (string | string[] | Function): Prefix for cache keys to delete when the dependencies are deleted. Both this and `dependenciesKey` must be provided.
|
|
50
|
+
* - `parseResponseDto` (boolean): If true, parses the cached response into a ResponseDto object. Defaults to true.
|
|
51
|
+
* - `cacheErrorResponseDto` (boolean): If true, caches error responses (e.g., 4xx or 5xx). Defaults to true.
|
|
52
|
+
*
|
|
53
|
+
* @returns MethodDecorator - Applies metadata to the method to enable caching behavior.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* @Controller()
|
|
58
|
+
* class MyController {
|
|
59
|
+
* @CacheRoute({ ttl: 5000, name: "userCache", key: "userData" })
|
|
60
|
+
* getUserData() {
|
|
61
|
+
* return fetchUserFromDb();
|
|
62
|
+
* }
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* Notes:
|
|
67
|
+
* - The caching metadata is stored using `Reflect.defineMetadata` with the key
|
|
68
|
+
* `CACHE_ROUTE_METADATA_KEY` on the target method.
|
|
69
|
+
* - If `options` is not provided, defaults to `{ ttl: 10000 }`.
|
|
70
|
+
*/
|
|
71
|
+
export declare function CacheRoute(options?: CacheRouteOptions): MethodDecorator;
|
|
72
|
+
export declare function getCacheRouteOptions(target: any, propertyKey: string | symbol): CacheRouteOptions | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Method decorator to mark a route or method to delete one or more cache entries.
|
|
75
|
+
*
|
|
76
|
+
* @param keys - The cache key(s) to delete when this method is called. Can be:
|
|
77
|
+
* - A single string key
|
|
78
|
+
* - An array of string keys
|
|
79
|
+
*
|
|
80
|
+
* @returns MethodDecorator - Applies metadata to the method indicating which cache entries
|
|
81
|
+
* should be removed.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* class MyController {
|
|
86
|
+
* @DeleteCache("userCache")
|
|
87
|
+
* clearUserCache() {
|
|
88
|
+
* // cache with key "userCache" will be deleted after this method executes
|
|
89
|
+
* }
|
|
90
|
+
*
|
|
91
|
+
* @DeleteCache(["userCache", "productCache"])
|
|
92
|
+
* clearMultipleCaches() {
|
|
93
|
+
* // deletes both caches
|
|
94
|
+
* }
|
|
95
|
+
* }
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* Notes:
|
|
99
|
+
* - The cache deletion metadata is stored using `Reflect.defineMetadata` with the key
|
|
100
|
+
* `CACHE_ROUTE_DELETE_METADATA_KEY` on the target method.
|
|
101
|
+
* - This decorator does not itself delete the cache; it only marks the method for
|
|
102
|
+
* cache deletion. Actual cache removal logic should read the metadata and perform deletion.
|
|
103
|
+
*/
|
|
104
|
+
interface DeleteRouteCacheOption {
|
|
105
|
+
key: string[] | string | CacheKeysGenerator;
|
|
106
|
+
plugin?: string;
|
|
107
|
+
name?: string;
|
|
108
|
+
}
|
|
109
|
+
export declare function DeleteCacheRoute(option: DeleteRouteCacheOption): MethodDecorator;
|
|
110
|
+
export declare function getDeleteCacheRouteOptions(target: any, propertyKey: string | symbol): DeleteRouteCacheOption | undefined;
|
|
111
|
+
type CacheFnOptions = {
|
|
112
|
+
/** Optional name for the cache, can be used to group or identify caches. */
|
|
113
|
+
name?: string;
|
|
114
|
+
/** The plugin this cache belongs to. */
|
|
115
|
+
plugin?: string;
|
|
116
|
+
/** Custom key or key generator function to store the cached value. */
|
|
117
|
+
key: string | ((...args: any[]) => string);
|
|
118
|
+
/**
|
|
119
|
+
* Indicates that this cache key depends on the keys in the `dependenciesKey` array.
|
|
120
|
+
* Dependency key deletion will work only when both `dependenciesKey` and `keyToDeletePrefix` are provided.
|
|
121
|
+
*/
|
|
122
|
+
dependenciesKey?: string | string[] | (() => string | string[]);
|
|
123
|
+
/**
|
|
124
|
+
* When a dependency key (provided in `dependenciesKey`) is deleted, it will also delete keys matching `keyToDeletePrefix`.
|
|
125
|
+
* Dependency key deletion will work only when both `dependenciesKey` and `keyToDeletePrefix` are provided.
|
|
126
|
+
*/
|
|
127
|
+
keyToDeletePrefix?: string | string[] | (() => string | string[]);
|
|
128
|
+
/** Time-to-live in milliseconds. Defaults to 5 minutes (300000 ms) if not provided. */
|
|
129
|
+
ttl?: number;
|
|
130
|
+
};
|
|
131
|
+
type CacheFnOptionMetadata = CacheFnOptions & {
|
|
132
|
+
handlerName: string;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Method decorator to enable caching for a specific service function.
|
|
136
|
+
*
|
|
137
|
+
* @param option - Configuration for caching:
|
|
138
|
+
* - `name` (string): Optional name for the cache, can be used to group or identify caches.
|
|
139
|
+
* - `plugin` (string): The plugin this cache belongs to.
|
|
140
|
+
* - `key` (string | Function): Custom key or generator function to store the cached value.
|
|
141
|
+
* - `dependenciesKey` (string | string[] | Function): Cache key(s) this cache depends on.
|
|
142
|
+
* - `keyToDeletePrefix` (string | string[] | Function): Prefix for cache keys to delete when dependencies are deleted. Both this and `dependenciesKey` must be provided.
|
|
143
|
+
* - `ttl` (number): Time-to-live in milliseconds. Defaults to 5 minutes (300000 ms) if not provided.
|
|
144
|
+
*
|
|
145
|
+
* @returns MethodDecorator - Applies metadata to the method to enable caching behavior.
|
|
146
|
+
*/
|
|
147
|
+
export declare function CacheFn(option: CacheFnOptions): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
148
|
+
export declare function getCacheFnConfigs(target: any): CacheFnOptionMetadata[] | undefined;
|
|
149
|
+
type DeleteCacheOptions = {
|
|
150
|
+
/** Optional name for the cache, can be used to group or identify caches. */
|
|
151
|
+
name?: string;
|
|
152
|
+
/** The plugin this cache belongs to. */
|
|
153
|
+
plugin?: string;
|
|
154
|
+
/** Array of keys or a generator function that produces keys to delete from the cache. */
|
|
155
|
+
key: string[] | ((...args: any[]) => string[]);
|
|
156
|
+
};
|
|
157
|
+
type DeleteCacheFnOptionMetadata = DeleteCacheOptions & {
|
|
158
|
+
handlerName: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Method decorator to delete specified cache keys when the decorated service function is called.
|
|
162
|
+
*
|
|
163
|
+
* @param option - Configuration for cache deletion:
|
|
164
|
+
* - `name` (string): Optional name for the cache.
|
|
165
|
+
* - `plugin` (string): The plugin this cache belongs to.
|
|
166
|
+
* - `key` (string[] | Function): Keys to delete or a generator function returning keys to delete.
|
|
167
|
+
*
|
|
168
|
+
* @returns MethodDecorator - Applies metadata to the method to enable cache deletion.
|
|
169
|
+
*/
|
|
170
|
+
export declare function DeleteCacheFn(option: DeleteCacheOptions): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
171
|
+
export declare function getDeleteCacheFnConfigs(target: any): DeleteCacheFnOptionMetadata[] | undefined;
|
|
172
|
+
/**
|
|
173
|
+
* Generates a unique cache key for a given route and HTTP request.
|
|
174
|
+
*
|
|
175
|
+
* The cache key is composed of:
|
|
176
|
+
* 1. HTTP method and route path (e.g., "GET:/users/:id")
|
|
177
|
+
* 2. URL path parameters (`req.params`) serialized as `key=value` pairs
|
|
178
|
+
* 3. Query parameters (`req.query`) serialized as `key=value` pairs
|
|
179
|
+
* 4. Request body (`req.body`) serialized to JSON for POST/PUT requests
|
|
180
|
+
*
|
|
181
|
+
* @param route - The route metadata, including method and path.
|
|
182
|
+
* @param req - The Express Request object containing params, query, and body.
|
|
183
|
+
* @returns A string that uniquely identifies the request for caching purposes.
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* const key = generateRouteCacheKey(
|
|
188
|
+
* { method: 'GET', path: '/users/:id' },
|
|
189
|
+
* req
|
|
190
|
+
* );
|
|
191
|
+
* console.log(key); // "GET:/users/:id?id=123&active=true&{}"
|
|
192
|
+
* ```
|
|
193
|
+
*
|
|
194
|
+
* Notes:
|
|
195
|
+
* - Ensures that different query parameters or path parameters produce distinct keys.
|
|
196
|
+
* - Includes request body for methods that typically carry a payload.
|
|
197
|
+
* - The generated key can be used in caching systems like Redis or in-memory caches.
|
|
198
|
+
*/
|
|
199
|
+
export declare function generateRouteCacheKey(route: AppRoute, req: Request): string;
|
|
200
|
+
export interface ICache {
|
|
201
|
+
set<T>(key: string, value: T, ttl?: number): Promise<void> | undefined | void;
|
|
202
|
+
get<T>(key: string): Promise<T>;
|
|
203
|
+
getWith<T>(key: string): Promise<T[]>;
|
|
204
|
+
delete(key: string): Promise<void> | undefined | void;
|
|
205
|
+
deleteWith(keys: string[]): Promise<string[]> | string[];
|
|
206
|
+
fluashall(): void | Promise<void>;
|
|
207
|
+
getRaw<T>(): T;
|
|
208
|
+
disconnect(): void;
|
|
209
|
+
/**
|
|
210
|
+
* Registers an event listener for cache events.
|
|
211
|
+
*
|
|
212
|
+
* @param props - The event configuration object.
|
|
213
|
+
* @param props.type - The type of event to listen for (e.g., 'delete' for cache invalidation).
|
|
214
|
+
* @param props.keys - The target cache keys that trigger this event when operated upon.
|
|
215
|
+
* @param props.keysToDelete - Additional keys (or a function returning keys) that should be automatically deleted when the event is triggered on the target `keys`.
|
|
216
|
+
*/
|
|
217
|
+
on(props: {
|
|
218
|
+
type: 'delete';
|
|
219
|
+
keys: string[];
|
|
220
|
+
keysToDelete: string[] | (() => string[]) | (() => Promise<string[]>);
|
|
221
|
+
}): void;
|
|
222
|
+
}
|
|
223
|
+
export declare class InMemoryCache implements ICache {
|
|
224
|
+
private listener;
|
|
225
|
+
cache: NodeCache;
|
|
226
|
+
constructor(options?: NodeCache.Options);
|
|
227
|
+
set<T>(key: string, value: T, ttl?: number): void;
|
|
228
|
+
get<T>(key: string): Promise<T>;
|
|
229
|
+
getWith<T>(pattern: string): Promise<T[]>;
|
|
230
|
+
private _internalDelete;
|
|
231
|
+
delete(key: string): Promise<void> | undefined | void;
|
|
232
|
+
deleteWith(patterns: string[]): string[];
|
|
233
|
+
fluashall(): void;
|
|
234
|
+
getRaw(): any;
|
|
235
|
+
disconnect(): void;
|
|
236
|
+
on(props: {
|
|
237
|
+
type: "delete";
|
|
238
|
+
keys: string[];
|
|
239
|
+
keysToDelete: string[] | (() => string[]) | (() => Promise<string[]>);
|
|
240
|
+
}): void;
|
|
241
|
+
private triggerDeleteKeyListener;
|
|
242
|
+
private isEventKeyMatched;
|
|
243
|
+
}
|
|
244
|
+
export declare class RedisCache implements ICache {
|
|
245
|
+
private readonly redis;
|
|
246
|
+
private listener;
|
|
247
|
+
constructor(redis: Redis);
|
|
248
|
+
set(key: string, value: any, ttl?: number): Promise<void>;
|
|
249
|
+
get<T>(key: string): Promise<T>;
|
|
250
|
+
getWith<T>(pattern: string): Promise<T[]>;
|
|
251
|
+
fluashall(): Promise<void>;
|
|
252
|
+
private _internalDelete;
|
|
253
|
+
delete(key: string): Promise<void>;
|
|
254
|
+
deleteWith(patterns: string[]): Promise<string[]>;
|
|
255
|
+
on(props: {
|
|
256
|
+
type: "delete";
|
|
257
|
+
keys: string[];
|
|
258
|
+
keysToDelete: string[] | (() => string[]);
|
|
259
|
+
}): void;
|
|
260
|
+
private triggerDeleteKeyListener;
|
|
261
|
+
private isEventKeyMatched;
|
|
262
|
+
subscribe(key: string, callback: () => void): void;
|
|
263
|
+
unSubscribe(callback: () => void): void;
|
|
264
|
+
onSubscribedMessage(on: string, callback: (channel: any, message: any) => void): void;
|
|
265
|
+
publish(channel: string, message: any): void;
|
|
266
|
+
getRaw<T>(): T;
|
|
267
|
+
disconnect(): void;
|
|
268
|
+
}
|
|
269
|
+
export interface BaseCacheOption {
|
|
270
|
+
name?: string;
|
|
271
|
+
type: 'redis' | 'in-memory';
|
|
272
|
+
ttl?: number;
|
|
273
|
+
plugin?: string;
|
|
274
|
+
}
|
|
275
|
+
export interface InMemoryCacheOptions extends BaseCacheOption {
|
|
276
|
+
type: 'in-memory';
|
|
277
|
+
checkperiod: number;
|
|
278
|
+
}
|
|
279
|
+
export interface RedisCacheOption extends BaseCacheOption {
|
|
280
|
+
type: 'redis';
|
|
281
|
+
host: string;
|
|
282
|
+
port?: number;
|
|
283
|
+
password?: string;
|
|
284
|
+
db?: number;
|
|
285
|
+
clientType?: 'publisher' | 'subscriber';
|
|
286
|
+
}
|
|
287
|
+
export type CacheOptions = RedisCacheOption | InMemoryCacheOptions;
|
|
288
|
+
/**
|
|
289
|
+
* Class decorator to define caching behavior for a class.
|
|
290
|
+
*
|
|
291
|
+
* Sets cache metadata on the class using `Reflect.defineMetadata`. The metadata
|
|
292
|
+
* can later be used to initialize and manage caching for the class methods or instances.
|
|
293
|
+
*
|
|
294
|
+
* @param options - Configuration options for the cache.
|
|
295
|
+
* @property name - Optional name of the cache (default: `'default'`).
|
|
296
|
+
* @property type - Cache backend type: `'in-memory'` or `'redis'`.
|
|
297
|
+
* @property ttl - Default time-to-live for cache entries in milliseconds (default: 10_000ms).
|
|
298
|
+
* @property plugin - Optional plugin identifier for multi-plugin support.
|
|
299
|
+
*
|
|
300
|
+
* In-memory cache specific:
|
|
301
|
+
* @property checkperiod - Interval in seconds to check for expired cache entries.
|
|
302
|
+
*
|
|
303
|
+
* Redis cache specific:
|
|
304
|
+
* @property host - Redis host (default: `'localhost'` if not provided).
|
|
305
|
+
* @property port - Redis port (default: 6379 if not provided).
|
|
306
|
+
* @property password - Redis password (optional).
|
|
307
|
+
* @property db - Redis database index (optional).
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```ts
|
|
311
|
+
* @Cache({ type: 'in-memory', name: 'userCache', checkperiod: 60, ttl: 60000 })
|
|
312
|
+
* class UserService { ... }
|
|
313
|
+
*
|
|
314
|
+
* @Cache({ type: 'redis', name: 'userCache', host: 'redis.local', port: 6379 })
|
|
315
|
+
* class UserService { ... }
|
|
316
|
+
* ```
|
|
317
|
+
*
|
|
318
|
+
* Notes:
|
|
319
|
+
* - Defaults for Redis host and port are applied if missing.
|
|
320
|
+
* - This decorator does not implement caching itself; it only attaches metadata for later use.
|
|
321
|
+
*/
|
|
322
|
+
export declare function Cache(options?: CacheOptions): ClassDecorator;
|
|
323
|
+
export declare function getCacheConfigs(target: any): RedisCacheOption[] | undefined;
|
|
324
|
+
type CacheClientOptions = {
|
|
325
|
+
plugin?: string;
|
|
326
|
+
name: string;
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* Property decorator to mark a property as a cache client reference.
|
|
330
|
+
*
|
|
331
|
+
* Attaches metadata to the property that can later be used to inject
|
|
332
|
+
* or retrieve a cache client instance from a cache manager.
|
|
333
|
+
*
|
|
334
|
+
* @param plugin - Optional plugin identifier to namespace the cache client.
|
|
335
|
+
* @param name - Name of the cache client (default: `CacheManager.DEFAULT_NAME`).
|
|
336
|
+
*
|
|
337
|
+
* @example
|
|
338
|
+
* ```ts
|
|
339
|
+
* class UserService {
|
|
340
|
+
* @CacheClient('user-plugin', 'userCache')
|
|
341
|
+
* cacheClient: CacheClientType;
|
|
342
|
+
* }
|
|
343
|
+
* ```
|
|
344
|
+
*/
|
|
345
|
+
export declare function CacheClient(plugin?: string, name?: string): PropertyDecorator;
|
|
346
|
+
export declare function getCacheClientMetadata(target: any, propertyKey: string | symbol): CacheClientOptions | undefined;
|
|
347
|
+
/**
|
|
348
|
+
* Central manager for cache clients within the Quan ERP kernel.
|
|
349
|
+
*
|
|
350
|
+
* Supports both high-performance in-memory caching and distributed Redis-based
|
|
351
|
+
* caching. This manager handles the lifecycle (initialization and registration)
|
|
352
|
+
* of named cache sources scoped to specific plugins.
|
|
353
|
+
*/
|
|
354
|
+
export declare class CacheManager extends Manager<ICache> {
|
|
355
|
+
/**
|
|
356
|
+
* Initializes a new cache source based on the provided configuration.
|
|
357
|
+
*
|
|
358
|
+
* @param cacheConfig - Configuration defining the cache type (redis/in-memory) and connection details.
|
|
359
|
+
* @param plugin - The name of the plugin context (defaults to 'default').
|
|
360
|
+
* @param name - Unique registration name for this source (defaults to 'default').
|
|
361
|
+
*/
|
|
362
|
+
newCacheSource(cacheConfig: CacheOptions, plugin?: string, name?: string): Promise<void>;
|
|
363
|
+
logDebugInfo(): void;
|
|
364
|
+
}
|
|
365
|
+
export {};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Manager, RegistryValue } from "./d453df06.js";
|
|
2
|
+
import WebSocket, { WebSocketServer } from "ws";
|
|
3
|
+
import http from 'http';
|
|
4
|
+
export type WebsocketOptions = {
|
|
5
|
+
ssl: boolean;
|
|
6
|
+
pingpongInterval: number;
|
|
7
|
+
path: string;
|
|
8
|
+
};
|
|
9
|
+
export type WebsocketEvents = "open" | "message" | "close" | "error" | "ping" | "pong" | "upgrade" | "redirect" | "unexpected-response";
|
|
10
|
+
export interface IWebsocket {
|
|
11
|
+
onAuthenticate(ws: WebSocket, req: http.IncomingMessage): ClientInfo | null;
|
|
12
|
+
onUpgrade(ws: WebSocket, req: http.IncomingMessage): void;
|
|
13
|
+
on(event: WebsocketEvents, client: WebsocketClient, data: any, isBinary: boolean): void;
|
|
14
|
+
onDestoryed(): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Class decorator that marks a class as a Websocket handler.
|
|
18
|
+
*
|
|
19
|
+
* Decorated classes must implement `IWebsocket`. The metadata provided
|
|
20
|
+
* specifies the endpoint path, SSL requirements, and ping/pong intervals.
|
|
21
|
+
*
|
|
22
|
+
* @param options - Configuration including the URL path and protocol settings.
|
|
23
|
+
*/
|
|
24
|
+
export declare function Websocket(options: WebsocketOptions): (target: any) => void;
|
|
25
|
+
export declare function getWebsocketConfig(target: any): WebsocketOptions | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Property decorator that injects a `WebsocketServer` instance for a specific path.
|
|
28
|
+
*
|
|
29
|
+
* The injected server provides high-level methods for broadcasting messages
|
|
30
|
+
* and sending directed events to specific connected clients.
|
|
31
|
+
*
|
|
32
|
+
* @param path - The URL path of the target websocket handler (default: 'default').
|
|
33
|
+
*/
|
|
34
|
+
export declare function InjectWebsocketServer(path?: string): (target: any, propertyKey: string | symbol) => void;
|
|
35
|
+
export declare function getWebsocketServerInjectConfig(target: any, propertyKey: string | symbol): {
|
|
36
|
+
path: string;
|
|
37
|
+
};
|
|
38
|
+
export type WebsocketServer = {
|
|
39
|
+
getByClientId(clientId: string): WebsocketClient[] | null;
|
|
40
|
+
sendText(clientId: string, data: WebsocketTextEventMessage): void;
|
|
41
|
+
sendBinary(clientId: string, data: WebsocketBinaryMessage): void;
|
|
42
|
+
brocast(data: WebsocketMessage): void;
|
|
43
|
+
getAllClients(): WebsocketClient[];
|
|
44
|
+
};
|
|
45
|
+
export interface WebsocketMessage {
|
|
46
|
+
getMessage(): any;
|
|
47
|
+
}
|
|
48
|
+
export declare class WebsocketTextMessage implements WebsocketMessage {
|
|
49
|
+
data: string;
|
|
50
|
+
constructor(data: string);
|
|
51
|
+
getMessage(): string;
|
|
52
|
+
}
|
|
53
|
+
export declare class WebsocketTextEventMessage implements WebsocketMessage {
|
|
54
|
+
event: string;
|
|
55
|
+
payload: any;
|
|
56
|
+
constructor(event: string, payload: any);
|
|
57
|
+
static fromJson(json: string): WebsocketTextEventMessage;
|
|
58
|
+
toJson(): string;
|
|
59
|
+
getMessage(): string;
|
|
60
|
+
}
|
|
61
|
+
export declare class WebsocketBinaryMessage implements WebsocketMessage {
|
|
62
|
+
payload: Buffer;
|
|
63
|
+
constructor(payload: Buffer);
|
|
64
|
+
getMessage(): Buffer<ArrayBufferLike>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A specialized dispatcher for incoming websocket messages.
|
|
68
|
+
*
|
|
69
|
+
* This handler categorizes incoming data into:
|
|
70
|
+
* 1. **Standard Events**: Mapping to `WebsocketEvents` like "message", "error", or "close".
|
|
71
|
+
* 2. **Structured Text Events**: Parsing JSON payloads to trigger specific logic
|
|
72
|
+
* based on an `event` field (e.g., `{ "event": "chat_message", "data": "..." }`).
|
|
73
|
+
*
|
|
74
|
+
* The dispatcher prioritized structured text events over general message handlers when appropriate.
|
|
75
|
+
*/
|
|
76
|
+
export declare class WebsocketMessageHandler {
|
|
77
|
+
private event;
|
|
78
|
+
private data;
|
|
79
|
+
private isBinary;
|
|
80
|
+
private listener;
|
|
81
|
+
private textEvent;
|
|
82
|
+
constructor(event: WebsocketEvents, data: any, isBinary: boolean);
|
|
83
|
+
on(event: WebsocketEvents, callback: () => void): WebsocketMessageHandler;
|
|
84
|
+
onTextEvent(event: string, callback: () => void): WebsocketMessageHandler;
|
|
85
|
+
execute(): void;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Represents the identity and metadata of an authenticated websocket client.
|
|
89
|
+
* Must include at least a unique `id`.
|
|
90
|
+
*/
|
|
91
|
+
export type ClientInfo = {
|
|
92
|
+
id: string;
|
|
93
|
+
} & Record<string, any>;
|
|
94
|
+
/**
|
|
95
|
+
* A wrapper class that encapsulates an active websocket connection and its associated client metadata.
|
|
96
|
+
*
|
|
97
|
+
* This class provides a stable interface for interacting with a specific connected client,
|
|
98
|
+
* abstracting away the raw socket and providing easy access to the client's identity.
|
|
99
|
+
*/
|
|
100
|
+
export declare class WebsocketClient {
|
|
101
|
+
private ws;
|
|
102
|
+
private clientData;
|
|
103
|
+
constructor(ws: WebSocket, clientData?: ClientInfo);
|
|
104
|
+
/** @returns The raw `ws.WebSocket` instance. */
|
|
105
|
+
getWebsocket(): WebSocket;
|
|
106
|
+
/** @returns The unique identifier for this client. */
|
|
107
|
+
getClientId(): string;
|
|
108
|
+
/** @returns The full metadata associated with this client. */
|
|
109
|
+
getClientData(): ClientInfo;
|
|
110
|
+
}
|
|
111
|
+
type RegistryMetadata = WebsocketOptions & {
|
|
112
|
+
clients: Record<string, WebsocketClient[]>;
|
|
113
|
+
pingIntervalInstance?: NodeJS.Timer | null;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Orchestrator for real-time websocket communication within the Quan ERP kernel.
|
|
117
|
+
*
|
|
118
|
+
* The `WebsocketManager` handles:
|
|
119
|
+
* 1. **Handler Lifecycle**: Registration and destruction of plugin-scoped websocket modules.
|
|
120
|
+
* 2. **Physical Server Management**: Lazy initialization of `ws.WebSocketServer` instances based on requested paths.
|
|
121
|
+
* 3. **Connection Logic**: Managing the upgrade process, authentication triggers, and message/close event routing.
|
|
122
|
+
* 4. **Keep-Alive**: Automated ping/pong mechanism to detect and prune stale connections.
|
|
123
|
+
*/
|
|
124
|
+
export declare class WebsocketManager extends Manager<IWebsocket, RegistryMetadata> {
|
|
125
|
+
private websocketServers;
|
|
126
|
+
register(instance: IWebsocket, metadata?: (Partial<WebsocketOptions> & Record<string, any>) | null, plugin?: string, name?: string): void;
|
|
127
|
+
registerWebsocket(instance: IWebsocket, option: WebsocketOptions, plugin?: string): void;
|
|
128
|
+
deRegisterByScope(plugin: string, path?: string): void;
|
|
129
|
+
private initialzeServerByPath;
|
|
130
|
+
private assignWebsocketClient;
|
|
131
|
+
private removeWebsocketClient;
|
|
132
|
+
getOrCreateServer(path: string): WebSocketServer | null;
|
|
133
|
+
private cleanupWebsocketInstanceServer;
|
|
134
|
+
destoryAll(): void;
|
|
135
|
+
getAllWebsocketHandler(): ({
|
|
136
|
+
instance: IWebsocket;
|
|
137
|
+
} & WebsocketOptions)[];
|
|
138
|
+
findInstanceByPath(path: string): RegistryValue<IWebsocket, RegistryMetadata> | null;
|
|
139
|
+
getServer(path: string): WebsocketServer | null;
|
|
140
|
+
logDebugInfo(): void;
|
|
141
|
+
}
|
|
142
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CorsOptions } from "cors";
|
|
2
|
+
import "reflect-metadata";
|
|
3
|
+
import { WebsocketOptions } from "./a1a2ec11.js";
|
|
4
|
+
export interface ServerOptions {
|
|
5
|
+
name?: string;
|
|
6
|
+
port: number;
|
|
7
|
+
modules: any[];
|
|
8
|
+
cors?: boolean | CorsOptions;
|
|
9
|
+
/** Enable a /health endpoint for monitoring */
|
|
10
|
+
healthCheck?: boolean;
|
|
11
|
+
checkInterval?: number;
|
|
12
|
+
/** Enable a /readiness endpoint (for deployment or load balancer readiness) */
|
|
13
|
+
readiness?: boolean;
|
|
14
|
+
buildinModules?: any;
|
|
15
|
+
websocket?: WebsocketOptions;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Class decorator to define a server configuration.
|
|
19
|
+
*
|
|
20
|
+
* This decorator stores metadata about the server, such as port, modules,
|
|
21
|
+
* middleware, CORS, health checks, readiness endpoints, and websocket options.
|
|
22
|
+
*
|
|
23
|
+
* @param {ServerOptions} options - Configuration options for the server.
|
|
24
|
+
* @param {number} options.port - The port the server will listen on (default: 3000).
|
|
25
|
+
* @param {any[]} options.modules - An array of modules to load in the server.
|
|
26
|
+
* @param {boolean | CorsOptions} [options.cors] - Enable and configure CORS.
|
|
27
|
+
* @param {boolean} [options.healthCheck=true] - Enable a `/health` endpoint for monitoring.
|
|
28
|
+
* @param {number} [options.checkInterval=5000] - Interval in ms for health checks.
|
|
29
|
+
* @param {boolean} [options.readiness=true] - Enable a `/readiness` endpoint for deployment/load balancers.
|
|
30
|
+
* @param {any} [options.buildinModules=true] - Load built-in modules if set.
|
|
31
|
+
* @param {WebsocketOptions} [options.websocket] - Optional websocket configuration.
|
|
32
|
+
*
|
|
33
|
+
* @returns {ClassDecorator} A decorator that attaches server configuration metadata.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* @Server({
|
|
38
|
+
* port: 4000,
|
|
39
|
+
* modules: [UserModule, AuthModule],
|
|
40
|
+
* cors: true,
|
|
41
|
+
* healthCheck: true,
|
|
42
|
+
* readiness: true,
|
|
43
|
+
* })
|
|
44
|
+
* class AppServer {}
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function Server(options?: ServerOptions): ClassDecorator;
|
|
48
|
+
export declare function getServerConfig(target: any): ServerOptions;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import serveStatic from "serve-static";
|
|
2
|
+
export declare const PLUGIN_CONFIG_KEY = "plugin:config";
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for the application's plugin management system.
|
|
5
|
+
*/
|
|
6
|
+
export interface PluginConfigOption {
|
|
7
|
+
/**
|
|
8
|
+
* Path where installed plugins are stored.
|
|
9
|
+
* If an object is provided, custom Express static serving options can be applied.
|
|
10
|
+
*/
|
|
11
|
+
installedLocalPluginPath?: string | {
|
|
12
|
+
path: string;
|
|
13
|
+
options: Pick<serveStatic.ServeStaticOptions, "maxAge" | "immutable" | "etag">;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Path to the local repository of available (not yet installed) plugins.
|
|
17
|
+
*/
|
|
18
|
+
availablePluginLocalPath?: {
|
|
19
|
+
pluginServer: string;
|
|
20
|
+
localPath: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Filesystem path to the directory containing workflow/runner definitions.
|
|
24
|
+
*/
|
|
25
|
+
runnerFlowFilePath?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Class decorator for the root server class to configure global plugin and workflow settings.
|
|
29
|
+
*
|
|
30
|
+
* This decorator defines where the application looks for plugin code, how it serves
|
|
31
|
+
* plugin-hosted frontend assets, and where it stores automation workflow definitions.
|
|
32
|
+
*
|
|
33
|
+
* @param option - The plugin system configuration.
|
|
34
|
+
*/
|
|
35
|
+
export declare function PluginConfig(option?: PluginConfigOption): (target: any) => void;
|
|
36
|
+
export declare function getPluginConfig(target: any): PluginConfigOption | undefined;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Manager } from "./d453df06.js";
|
|
2
|
+
import { CoreApp } from "./d9b4a449.js";
|
|
3
|
+
export interface Env {
|
|
4
|
+
all(): Record<string, Record<string, {
|
|
5
|
+
value: string;
|
|
6
|
+
} & EnvRegistryMetadata | undefined>>;
|
|
7
|
+
get(name: string): string | undefined | null;
|
|
8
|
+
set(name: string, value: string | null, options?: SetPluginEnvOptions): any;
|
|
9
|
+
sync(): Promise<void>;
|
|
10
|
+
onChanged(key: string, callback: () => void): void;
|
|
11
|
+
clear(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare const ENV_METADATA_KEY = "env";
|
|
14
|
+
/**
|
|
15
|
+
* Property decorator that injects the environment configuration manager (Env) for the current plugin.
|
|
16
|
+
*
|
|
17
|
+
* The injected `Env` object allows the plugin to:
|
|
18
|
+
* 1. **Get/Set Configs**: Read and write environment variables scoped specifically to the plugin.
|
|
19
|
+
* 2. **Persistence**: Sync configuration changes back to the database.
|
|
20
|
+
* 3. **Reactivity**: Register listeners for when specific configuration keys change.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* @Service()
|
|
25
|
+
* class MyService {
|
|
26
|
+
* @InjectEnv()
|
|
27
|
+
* private env: Env;
|
|
28
|
+
*
|
|
29
|
+
* async start() {
|
|
30
|
+
* const apiKey = this.env.get('API_KEY');
|
|
31
|
+
* this.env.onChanged('API_KEY', () => { ... });
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare function InjectEnv(): PropertyDecorator;
|
|
37
|
+
export declare function getEnvInjection(target: any, propertyKey: string | symbol): boolean | undefined;
|
|
38
|
+
export interface SetPluginEnvOptions {
|
|
39
|
+
sync?: boolean;
|
|
40
|
+
isPublic?: boolean;
|
|
41
|
+
isSecret?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface PluginEnvManager {
|
|
44
|
+
get(key: string): string | undefined;
|
|
45
|
+
set(key: string, value: string, option: SetPluginEnvOptions): void;
|
|
46
|
+
}
|
|
47
|
+
export type EnvRegistryMetadata = {
|
|
48
|
+
isPublic: boolean;
|
|
49
|
+
isSecret: boolean;
|
|
50
|
+
};
|
|
51
|
+
export declare class PluginEnvConfigManager extends Manager<string, EnvRegistryMetadata> {
|
|
52
|
+
private app;
|
|
53
|
+
private cached;
|
|
54
|
+
private events;
|
|
55
|
+
constructor(app: CoreApp);
|
|
56
|
+
register(instance: string, metadata?: (Partial<{}> & Record<string, any>) | null, plugin?: string, name?: string): void;
|
|
57
|
+
set(plugin: string, key: string, value: string, { sync, isPublic, isSecret }: SetPluginEnvOptions): Promise<void>;
|
|
58
|
+
get(plugin: string, key: string): string | undefined;
|
|
59
|
+
getAllByPluginName(plugin: string): Record<string, Record<string, {
|
|
60
|
+
value: string;
|
|
61
|
+
isPublic: boolean;
|
|
62
|
+
isSecret: boolean;
|
|
63
|
+
}>>;
|
|
64
|
+
getAll(option?: {
|
|
65
|
+
maskSecret?: boolean;
|
|
66
|
+
includeSecret?: boolean;
|
|
67
|
+
publicOnly?: boolean;
|
|
68
|
+
}): Record<string, Record<string, {
|
|
69
|
+
value: string;
|
|
70
|
+
isPublic: boolean;
|
|
71
|
+
isSecret: boolean;
|
|
72
|
+
}>>;
|
|
73
|
+
getAllPublic(): Record<string, Record<string, string>>;
|
|
74
|
+
getPublic(plugin: string, key: string): string | null;
|
|
75
|
+
onChanged(plugin: string, key: string, callback: () => void): void;
|
|
76
|
+
reset(plugin: string): Promise<void>;
|
|
77
|
+
syncToDB(): Promise<void>;
|
|
78
|
+
loadFromDB(): Promise<void>;
|
|
79
|
+
private generateEventKey;
|
|
80
|
+
private registryToJSON;
|
|
81
|
+
}
|