@ripwords/myinvois-client 0.3.7 → 0.4.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 +27 -0
- package/dist/{0X-qj3c_vAo.d.ts → 0X-bPhcc9Vv.d.ts} +2 -1
- package/dist/{1X-C72Wa4pk.d.ts → 1X-Bqi8dmY1.d.ts} +2 -1
- package/dist/{1X-B-lyAVC4.d.ts → 1X-DKHYQyRy.d.ts} +2 -1
- package/dist/{2X-CH89y3Af.d.ts → 2X-CemxuAeL.d.ts} +2 -1
- package/dist/{2X-BfCK614i.d.ts → 2X-DN6M21cV.d.ts} +2 -1
- package/dist/{3X-DryrwYRf.d.ts → 3X-DIYh_ue4.d.ts} +2 -1
- package/dist/{3X-Du10Ix_V.d.ts → 3X-DJRj5xLv.d.ts} +2 -1
- package/dist/{4X-x3cRFuSM.d.ts → 4X-BCvTomUF.d.ts} +2 -1
- package/dist/{4X-BPMLRoDv.d.ts → 4X-CZi5nwIr.d.ts} +2 -1
- package/dist/{5X-B52AKeTz.d.ts → 5X-Dji6Soz5.d.ts} +2 -1
- package/dist/{5X-Bv7M6KyG.d.ts → 5X-DyYBCAvY.d.ts} +2 -1
- package/dist/{6X-DBwpWPQ6.d.ts → 6X-CO_u4RIY.d.ts} +2 -1
- package/dist/{6X-ZeZ8OB57.d.ts → 6X-Csxu6lwi.d.ts} +2 -1
- package/dist/{7X-Dvw2Z2VN.d.ts → 7X-DivvfBsk.d.ts} +2 -1
- package/dist/{7X-C_XGDSpE.d.ts → 7X-vzJ01lNF.d.ts} +2 -1
- package/dist/{8X-Di_0wuRX.d.ts → 8X-C4Wf4jYK.d.ts} +2 -1
- package/dist/{8X-BkgoX8dg.d.ts → 8X-D_Pw1H3K.d.ts} +2 -1
- package/dist/{9X-8ZnvvViY.d.ts → 9X-1VwxN9g-.d.ts} +2 -1
- package/dist/{9X-Du0e44cq.d.ts → 9X-BwR9pibT.d.ts} +2 -1
- package/dist/{AX-BSPLpkVT.d.ts → AX-CDubGAZO.d.ts} +2 -1
- package/dist/{BX-u4yMaIkz.d.ts → BX-CBsKI8np.d.ts} +2 -1
- package/dist/{CX-BKZG0pVE.d.ts → CX-DhOdAFyg.d.ts} +2 -1
- package/dist/{DX-CwA9WJAf.d.ts → DX-CBiRJGqR.d.ts} +2 -1
- package/dist/{EX-BRNu1Ooi.d.ts → EX-CAn62WaX.d.ts} +2 -1
- package/dist/{FX-DBxjq6xY.d.ts → FX-CANpsLC4.d.ts} +2 -1
- package/dist/{GX-B3CvWNrP.d.ts → GX-BvSZZ8pE.d.ts} +2 -1
- package/dist/{HX-D7FABgTv.d.ts → HX-CxrnY-YC.d.ts} +2 -1
- package/dist/{IX-D3ZknsAB.d.ts → IX-wdAD6eW8.d.ts} +2 -1
- package/dist/{JX-BRaZM3Gc.d.ts → JX-B5v815to.d.ts} +2 -1
- package/dist/{KX-B1K0OWoi.d.ts → KX-BI8n7ACj.d.ts} +2 -1
- package/dist/{LX-CKRefinL.d.ts → LX-BVvEz6Ji.d.ts} +2 -1
- package/dist/{MX-DKmaeO9r.d.ts → MX-D_OsOP_v.d.ts} +2 -1
- package/dist/{NX-CJL2Gn1U.d.ts → NX-DIhAzAY3.d.ts} +2 -1
- package/dist/{OX-Do2ap5v_.d.ts → OX-BZrRnj5g.d.ts} +2 -1
- package/dist/{PX-_DOr_rm9.d.ts → PX-DGGrJNym.d.ts} +2 -1
- package/dist/{QX-HlXLkIki.d.ts → QX-DuTJFnHX.d.ts} +2 -1
- package/dist/{RX-DVPGOVES.d.ts → RX-DYQoV7am.d.ts} +2 -1
- package/dist/{SX-OGT3qwlS.d.ts → SX-Dl1RlNnc.d.ts} +2 -1
- package/dist/{TX-cPDINmZ5.d.ts → TX-SoIfFaZj.d.ts} +2 -1
- package/dist/{UX-Be3sqvPV.d.ts → UX-DqBfrSsY.d.ts} +2 -1
- package/dist/{VX-CoEuBNDK.d.ts → VX-Ahcpp3Si.d.ts} +2 -1
- package/dist/{WX-DMvw__jH.d.ts → WX-Di6vYD7A.d.ts} +2 -1
- package/dist/{XX-DOA-10JW.d.ts → XX-BE4flzh6.d.ts} +2 -1
- package/dist/{YX-F34sJ7Ik.d.ts → YX-BPO04gSZ.d.ts} +2 -1
- package/dist/{ZX-CDQOfsHh.d.ts → ZX-DHu4FRKS.d.ts} +2 -1
- package/dist/{index2.cjs → api/documentManagement.cjs} +1 -1
- package/dist/api/documentManagement.d.cts +90 -0
- package/dist/api/documentManagement.d.ts +62 -61
- package/dist/api/documentManagement.js +1 -1
- package/dist/{index3.cjs → api/documentSubmission.cjs} +3 -3
- package/dist/api/documentSubmission.d.cts +93 -0
- package/dist/api/documentSubmission.d.ts +62 -61
- package/dist/api/documentSubmission.js +2 -2
- package/dist/{index4.cjs → api/documentTypeManagement.cjs} +1 -1
- package/dist/api/documentTypeManagement.d.cts +71 -0
- package/dist/api/documentTypeManagement.d.ts +62 -61
- package/dist/api/notificationManagement.cjs +3 -0
- package/dist/api/notificationManagement.d.cts +69 -0
- package/dist/api/notificationManagement.d.ts +62 -61
- package/dist/api/platformLogin.cjs +3 -0
- package/dist/api/platformLogin.d.cts +69 -0
- package/dist/api/platformLogin.d.ts +62 -61
- package/dist/api/taxpayerValidation.cjs +6 -0
- package/dist/api/taxpayerValidation.d.cts +72 -0
- package/dist/api/taxpayerValidation.d.ts +62 -61
- package/dist/apiQueue-B6Q644Bz.js +2 -1
- package/dist/apiQueue-B6Q644Bz.js.map +1 -0
- package/dist/{apiQueue-DgKWaQDS.cjs → apiQueue-C45w-ymm.cjs} +1 -1
- package/dist/{apiQueue-DgKWaQDS.cjs.map → apiQueue-C45w-ymm.cjs.map} +1 -1
- package/dist/{certificate-COwqszxD.js → certificate-Cg6spxUs.js} +2 -21
- package/dist/certificate-Cg6spxUs.js.map +1 -0
- package/dist/{certificate-CWmfCPdt.cjs → certificate-Dw46fkYv.cjs} +5 -31
- package/dist/certificate-Dw46fkYv.cjs.map +1 -0
- package/dist/{classification-codes-C2X4xW5-.d.ts → classification-codes-BQMnAQFr.d.ts} +2 -1
- package/dist/{country-code-DsI8Mbzx.d.ts → country-code-DAejE5RV.d.ts} +2 -1
- package/dist/{currencies-DKuDflOO.d.ts → currencies-Cg9RkxRB.d.ts} +2 -1
- package/dist/{document-B6ab06s1.cjs → document-B11B5lqd.cjs} +75 -21
- package/dist/document-B11B5lqd.cjs.map +1 -0
- package/dist/{document-Bb5WkhRe.js → document-BC52NCdW.js} +46 -19
- package/dist/document-BC52NCdW.js.map +1 -0
- package/dist/document-BQdoGqOl.d.cts +157 -0
- package/dist/document-CnamySca.d.ts +157 -0
- package/dist/{documentManagement-lPm8Gziu.js → documentManagement-DZKm582-.js} +4 -2
- package/dist/documentManagement-DZKm582-.js.map +1 -0
- package/dist/{documentManagement-BviJDtf2.cjs → documentManagement-qJnd0l1z.cjs} +3 -2
- package/dist/documentManagement-qJnd0l1z.cjs.map +1 -0
- package/dist/{documentSubmission-C-v4_4-x.cjs → documentSubmission-BaPECvYU.cjs} +5 -5
- package/dist/{documentSubmission-C-v4_4-x.cjs.map → documentSubmission-BaPECvYU.cjs.map} +1 -1
- package/dist/{documentSubmission-igf605QK.js → documentSubmission-DSsX0ldK.js} +6 -5
- package/dist/documentSubmission-DSsX0ldK.js.map +1 -0
- package/dist/{documentTypeManagement-D_-LiQVg.cjs → documentTypeManagement-DXRLfTsW.cjs} +1 -1
- package/dist/{documentTypeManagement-D_-LiQVg.cjs.map → documentTypeManagement-DXRLfTsW.cjs.map} +1 -1
- package/dist/documentTypeManagement-cBtVCOY3.js +2 -1
- package/dist/documentTypeManagement-cBtVCOY3.js.map +1 -0
- package/dist/{documents-BYV12TVt.d.ts → documents-BpZn3hJq.d.ts} +10 -9
- package/dist/{e-invoice-C2TxhyrK.d.ts → e-invoice-BSCFsH-H.d.ts} +2 -1
- package/dist/formatIdValue-qTxJqj9o.js +2 -1
- package/dist/formatIdValue-qTxJqj9o.js.map +1 -0
- package/dist/{getBaseUrl-D0G4GZmp.cjs → getBaseUrl-D2iJdUGL.cjs} +1 -1
- package/dist/{getBaseUrl-D0G4GZmp.cjs.map → getBaseUrl-D2iJdUGL.cjs.map} +1 -1
- package/dist/getBaseUrl-D7nUmoYb.js +2 -1
- package/dist/getBaseUrl-D7nUmoYb.js.map +1 -0
- package/dist/{index-CygwSf0x.d.ts → index-Dn3JIREW.d.ts} +2 -1
- package/dist/index.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +616 -0
- package/dist/index.d.ts +63 -61
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -0
- package/dist/lineItems-Btjkf6VX.js +58 -0
- package/dist/lineItems-Btjkf6VX.js.map +1 -0
- package/dist/lineItems-C8iT0OL1.cjs +64 -0
- package/dist/lineItems-C8iT0OL1.cjs.map +1 -0
- package/dist/lineItems-CBSo7giH.d.cts +32 -0
- package/dist/lineItems-CrkEXi2m.d.ts +32 -0
- package/dist/msic-codes-kysVPGdN.d.ts +26 -0
- package/dist/{notificationManagement-DLBDn77E.cjs → notificationManagement-C_qrFwWL.cjs} +1 -1
- package/dist/{notificationManagement-DLBDn77E.cjs.map → notificationManagement-C_qrFwWL.cjs.map} +1 -1
- package/dist/notificationManagement-n4Z5e-My.js +2 -1
- package/dist/notificationManagement-n4Z5e-My.js.map +1 -0
- package/dist/{notifications-sFhgh3rJ.d.ts → notifications-B4BymhRJ.d.ts} +2 -1
- package/dist/{payment-modes-g3DzLmWb.d.ts → payment-modes-BGP5McTY.d.ts} +2 -1
- package/dist/platformLogin-CqI9OLYP.js +2 -1
- package/dist/platformLogin-CqI9OLYP.js.map +1 -0
- package/dist/{platformLogin-Ch6hFKoU.cjs → platformLogin-DC4s6Qpv.cjs} +1 -1
- package/dist/{platformLogin-Ch6hFKoU.cjs.map → platformLogin-DC4s6Qpv.cjs.map} +1 -1
- package/dist/{signatures-CerHUrj3.d.ts → signatures-Bk5aKcq6.d.ts} +2 -1
- package/dist/{state-codes-Ow4oehYT.d.ts → state-codes-CAkYQnTd.d.ts} +2 -1
- package/dist/{tax-types-ClyLgydM.d.ts → tax-types-QeZFKqew.d.ts} +2 -1
- package/dist/{taxpayer-BAoT73gg.d.ts → taxpayer-B1CSMqNS.d.ts} +4 -3
- package/dist/{taxpayerValidation-j8s6YGED.cjs → taxpayerValidation-DzCJROgP.cjs} +1 -1
- package/dist/{taxpayerValidation-j8s6YGED.cjs.map → taxpayerValidation-DzCJROgP.cjs.map} +1 -1
- package/dist/taxpayerValidation-Xd_EHDvk.js +2 -1
- package/dist/taxpayerValidation-Xd_EHDvk.js.map +1 -0
- package/dist/{index16.cjs → types/classification-codes.d.cjs} +1 -1
- package/dist/types/classification-codes.d.cjs.map +1 -0
- package/dist/types/classification-codes.d.cts +2 -0
- package/dist/types/classification-codes.d.ts +1 -1
- package/dist/{index17.cjs → types/country-code.d.cjs} +1 -1
- package/dist/types/country-code.d.cjs.map +1 -0
- package/dist/types/country-code.d.cts +2 -0
- package/dist/types/country-code.d.ts +1 -1
- package/dist/{index18.cjs → types/currencies.d.cjs} +1 -1
- package/dist/types/currencies.d.cjs.map +1 -0
- package/dist/types/currencies.d.cts +2 -0
- package/dist/types/currencies.d.ts +1 -1
- package/dist/types/documents.d.cts +55 -0
- package/dist/types/documents.d.ts +54 -54
- package/dist/{index20.cjs → types/e-invoice.d.cjs} +1 -1
- package/dist/types/e-invoice.d.cjs.map +1 -0
- package/dist/types/e-invoice.d.cts +2 -0
- package/dist/types/e-invoice.d.ts +1 -1
- package/dist/types/index.d.cts +61 -0
- package/dist/types/index.d.ts +60 -60
- package/dist/{index31.cjs → types/msic/0X.d.cjs} +1 -1
- package/dist/types/msic/0X.d.cjs.map +1 -0
- package/dist/types/msic/0X.d.cts +2 -0
- package/dist/types/msic/0X.d.ts +1 -1
- package/dist/{index32.cjs → types/msic/1X.d.cjs} +1 -1
- package/dist/types/msic/1X.d.cjs.map +1 -0
- package/dist/types/msic/1X.d.cts +2 -0
- package/dist/types/msic/1X.d.ts +1 -1
- package/dist/{index33.cjs → types/msic/2X.d.cjs} +1 -1
- package/dist/types/msic/2X.d.cjs.map +1 -0
- package/dist/types/msic/2X.d.cts +2 -0
- package/dist/types/msic/2X.d.ts +1 -1
- package/dist/{index34.cjs → types/msic/3X.d.cjs} +1 -1
- package/dist/types/msic/3X.d.cjs.map +1 -0
- package/dist/types/msic/3X.d.cts +2 -0
- package/dist/types/msic/3X.d.ts +1 -1
- package/dist/{index35.cjs → types/msic/4X.d.cjs} +1 -1
- package/dist/types/msic/4X.d.cjs.map +1 -0
- package/dist/types/msic/4X.d.cts +2 -0
- package/dist/types/msic/4X.d.ts +1 -1
- package/dist/{index36.cjs → types/msic/5X.d.cjs} +1 -1
- package/dist/types/msic/5X.d.cjs.map +1 -0
- package/dist/types/msic/5X.d.cts +2 -0
- package/dist/types/msic/5X.d.ts +1 -1
- package/dist/{index37.cjs → types/msic/6X.d.cjs} +1 -1
- package/dist/types/msic/6X.d.cjs.map +1 -0
- package/dist/types/msic/6X.d.cts +2 -0
- package/dist/types/msic/6X.d.ts +1 -1
- package/dist/{index38.cjs → types/msic/7X.d.cjs} +1 -1
- package/dist/types/msic/7X.d.cjs.map +1 -0
- package/dist/types/msic/7X.d.cts +2 -0
- package/dist/types/msic/7X.d.ts +1 -1
- package/dist/{index39.cjs → types/msic/8X.d.cjs} +1 -1
- package/dist/types/msic/8X.d.cjs.map +1 -0
- package/dist/types/msic/8X.d.cts +2 -0
- package/dist/types/msic/8X.d.ts +1 -1
- package/dist/{index40.cjs → types/msic/9X.d.cjs} +1 -1
- package/dist/types/msic/9X.d.cjs.map +1 -0
- package/dist/types/msic/9X.d.cts +2 -0
- package/dist/types/msic/9X.d.ts +1 -1
- package/dist/types/msic-codes.d.cts +12 -0
- package/dist/types/msic-codes.d.ts +11 -11
- package/dist/{index23.cjs → types/notifications.d.cjs} +1 -1
- package/dist/types/notifications.d.cjs.map +1 -0
- package/dist/types/notifications.d.cts +2 -0
- package/dist/types/notifications.d.ts +1 -1
- package/dist/{index24.cjs → types/payment-modes.d.cjs} +1 -1
- package/dist/types/payment-modes.d.cjs.map +1 -0
- package/dist/types/payment-modes.d.cts +2 -0
- package/dist/types/payment-modes.d.ts +1 -1
- package/dist/types/signatures.d.cts +2 -0
- package/dist/types/signatures.d.ts +1 -1
- package/dist/{index26.cjs → types/state-codes.d.cjs} +1 -1
- package/dist/types/state-codes.d.cjs.map +1 -0
- package/dist/types/state-codes.d.cts +2 -0
- package/dist/types/state-codes.d.ts +1 -1
- package/dist/{index27.cjs → types/tax-types.d.cjs} +1 -1
- package/dist/types/tax-types.d.cjs.map +1 -0
- package/dist/types/tax-types.d.cts +2 -0
- package/dist/types/tax-types.d.ts +1 -1
- package/dist/types/taxpayer.d.cts +56 -0
- package/dist/types/taxpayer.d.ts +55 -55
- package/dist/{index41.cjs → types/unit/1X.d.cjs} +1 -1
- package/dist/types/unit/1X.d.cjs.map +1 -0
- package/dist/types/unit/1X.d.cts +2 -0
- package/dist/types/unit/1X.d.ts +1 -1
- package/dist/{index42.cjs → types/unit/2X.d.cjs} +1 -1
- package/dist/types/unit/2X.d.cjs.map +1 -0
- package/dist/types/unit/2X.d.cts +2 -0
- package/dist/types/unit/2X.d.ts +1 -1
- package/dist/{index43.cjs → types/unit/3X.d.cjs} +1 -1
- package/dist/types/unit/3X.d.cjs.map +1 -0
- package/dist/types/unit/3X.d.cts +2 -0
- package/dist/types/unit/3X.d.ts +1 -1
- package/dist/{index44.cjs → types/unit/4X.d.cjs} +1 -1
- package/dist/types/unit/4X.d.cjs.map +1 -0
- package/dist/types/unit/4X.d.cts +2 -0
- package/dist/types/unit/4X.d.ts +1 -1
- package/dist/{index45.cjs → types/unit/5X.d.cjs} +1 -1
- package/dist/types/unit/5X.d.cjs.map +1 -0
- package/dist/types/unit/5X.d.cts +2 -0
- package/dist/types/unit/5X.d.ts +1 -1
- package/dist/{index46.cjs → types/unit/6X.d.cjs} +1 -1
- package/dist/types/unit/6X.d.cjs.map +1 -0
- package/dist/types/unit/6X.d.cts +2 -0
- package/dist/types/unit/6X.d.ts +1 -1
- package/dist/{index47.cjs → types/unit/7X.d.cjs} +1 -1
- package/dist/types/unit/7X.d.cjs.map +1 -0
- package/dist/types/unit/7X.d.cts +2 -0
- package/dist/types/unit/7X.d.ts +1 -1
- package/dist/{index48.cjs → types/unit/8X.d.cjs} +1 -1
- package/dist/types/unit/8X.d.cjs.map +1 -0
- package/dist/types/unit/8X.d.cts +2 -0
- package/dist/types/unit/8X.d.ts +1 -1
- package/dist/{index49.cjs → types/unit/9X.d.cjs} +1 -1
- package/dist/types/unit/9X.d.cjs.map +1 -0
- package/dist/types/unit/9X.d.cts +2 -0
- package/dist/types/unit/9X.d.ts +1 -1
- package/dist/{index50.cjs → types/unit/AX.d.cjs} +1 -1
- package/dist/types/unit/AX.d.cjs.map +1 -0
- package/dist/types/unit/AX.d.cts +2 -0
- package/dist/types/unit/AX.d.ts +1 -1
- package/dist/{index51.cjs → types/unit/BX.d.cjs} +1 -1
- package/dist/types/unit/BX.d.cjs.map +1 -0
- package/dist/types/unit/BX.d.cts +2 -0
- package/dist/types/unit/BX.d.ts +1 -1
- package/dist/{index52.cjs → types/unit/CX.d.cjs} +1 -1
- package/dist/types/unit/CX.d.cjs.map +1 -0
- package/dist/types/unit/CX.d.cts +2 -0
- package/dist/types/unit/CX.d.ts +1 -1
- package/dist/{index53.cjs → types/unit/DX.d.cjs} +1 -1
- package/dist/types/unit/DX.d.cjs.map +1 -0
- package/dist/types/unit/DX.d.cts +2 -0
- package/dist/types/unit/DX.d.ts +1 -1
- package/dist/{index54.cjs → types/unit/EX.d.cjs} +1 -1
- package/dist/types/unit/EX.d.cjs.map +1 -0
- package/dist/types/unit/EX.d.cts +2 -0
- package/dist/types/unit/EX.d.ts +1 -1
- package/dist/{index55.cjs → types/unit/FX.d.cjs} +1 -1
- package/dist/types/unit/FX.d.cjs.map +1 -0
- package/dist/types/unit/FX.d.cts +2 -0
- package/dist/types/unit/FX.d.ts +1 -1
- package/dist/{index56.cjs → types/unit/GX.d.cjs} +1 -1
- package/dist/types/unit/GX.d.cjs.map +1 -0
- package/dist/types/unit/GX.d.cts +2 -0
- package/dist/types/unit/GX.d.ts +1 -1
- package/dist/{index57.cjs → types/unit/HX.d.cjs} +1 -1
- package/dist/types/unit/HX.d.cjs.map +1 -0
- package/dist/types/unit/HX.d.cts +2 -0
- package/dist/types/unit/HX.d.ts +1 -1
- package/dist/{index58.cjs → types/unit/IX.d.cjs} +1 -1
- package/dist/types/unit/IX.d.cjs.map +1 -0
- package/dist/types/unit/IX.d.cts +2 -0
- package/dist/types/unit/IX.d.ts +1 -1
- package/dist/{index59.cjs → types/unit/JX.d.cjs} +1 -1
- package/dist/types/unit/JX.d.cjs.map +1 -0
- package/dist/types/unit/JX.d.cts +2 -0
- package/dist/types/unit/JX.d.ts +1 -1
- package/dist/{index60.cjs → types/unit/KX.d.cjs} +1 -1
- package/dist/types/unit/KX.d.cjs.map +1 -0
- package/dist/types/unit/KX.d.cts +2 -0
- package/dist/types/unit/KX.d.ts +1 -1
- package/dist/{index61.cjs → types/unit/LX.d.cjs} +1 -1
- package/dist/types/unit/LX.d.cjs.map +1 -0
- package/dist/types/unit/LX.d.cts +2 -0
- package/dist/types/unit/LX.d.ts +1 -1
- package/dist/{index62.cjs → types/unit/MX.d.cjs} +1 -1
- package/dist/types/unit/MX.d.cjs.map +1 -0
- package/dist/types/unit/MX.d.cts +2 -0
- package/dist/types/unit/MX.d.ts +1 -1
- package/dist/{index63.cjs → types/unit/NX.d.cjs} +1 -1
- package/dist/types/unit/NX.d.cjs.map +1 -0
- package/dist/types/unit/NX.d.cts +2 -0
- package/dist/types/unit/NX.d.ts +1 -1
- package/dist/{index64.cjs → types/unit/OX.d.cjs} +1 -1
- package/dist/types/unit/OX.d.cjs.map +1 -0
- package/dist/types/unit/OX.d.cts +2 -0
- package/dist/types/unit/OX.d.ts +1 -1
- package/dist/{index65.cjs → types/unit/PX.d.cjs} +1 -1
- package/dist/types/unit/PX.d.cjs.map +1 -0
- package/dist/types/unit/PX.d.cts +2 -0
- package/dist/types/unit/PX.d.ts +1 -1
- package/dist/{index66.cjs → types/unit/QX.d.cjs} +1 -1
- package/dist/types/unit/QX.d.cjs.map +1 -0
- package/dist/types/unit/QX.d.cts +2 -0
- package/dist/types/unit/QX.d.ts +1 -1
- package/dist/{index67.cjs → types/unit/RX.d.cjs} +1 -1
- package/dist/types/unit/RX.d.cjs.map +1 -0
- package/dist/types/unit/RX.d.cts +2 -0
- package/dist/types/unit/RX.d.ts +1 -1
- package/dist/{index68.cjs → types/unit/SX.d.cjs} +1 -1
- package/dist/types/unit/SX.d.cjs.map +1 -0
- package/dist/types/unit/SX.d.cts +2 -0
- package/dist/types/unit/SX.d.ts +1 -1
- package/dist/{index69.cjs → types/unit/TX.d.cjs} +1 -1
- package/dist/types/unit/TX.d.cjs.map +1 -0
- package/dist/types/unit/TX.d.cts +2 -0
- package/dist/types/unit/TX.d.ts +1 -1
- package/dist/{index70.cjs → types/unit/UX.d.cjs} +1 -1
- package/dist/types/unit/UX.d.cjs.map +1 -0
- package/dist/types/unit/UX.d.cts +2 -0
- package/dist/types/unit/UX.d.ts +1 -1
- package/dist/{index71.cjs → types/unit/VX.d.cjs} +1 -1
- package/dist/types/unit/VX.d.cjs.map +1 -0
- package/dist/types/unit/VX.d.cts +2 -0
- package/dist/types/unit/VX.d.ts +1 -1
- package/dist/{index72.cjs → types/unit/WX.d.cjs} +1 -1
- package/dist/types/unit/WX.d.cjs.map +1 -0
- package/dist/types/unit/WX.d.cts +2 -0
- package/dist/types/unit/WX.d.ts +1 -1
- package/dist/{index73.cjs → types/unit/XX.d.cjs} +1 -1
- package/dist/types/unit/XX.d.cjs.map +1 -0
- package/dist/types/unit/XX.d.cts +2 -0
- package/dist/types/unit/XX.d.ts +1 -1
- package/dist/{index74.cjs → types/unit/YX.d.cjs} +1 -1
- package/dist/types/unit/YX.d.cjs.map +1 -0
- package/dist/types/unit/YX.d.cts +2 -0
- package/dist/types/unit/YX.d.ts +1 -1
- package/dist/{index75.cjs → types/unit/ZX.d.cjs} +1 -1
- package/dist/types/unit/ZX.d.cjs.map +1 -0
- package/dist/types/unit/ZX.d.cts +2 -0
- package/dist/types/unit/ZX.d.ts +1 -1
- package/dist/types/unit-types.d.cts +37 -0
- package/dist/types/unit-types.d.ts +36 -36
- package/dist/types/utils.d.cts +2 -0
- package/dist/types/utils.d.ts +1 -1
- package/dist/unit-types-CZdxXbVN.d.ts +56 -0
- package/dist/{index8.cjs → utils/apiQueue.cjs} +1 -1
- package/dist/utils/apiQueue.d.cts +46 -0
- package/dist/utils/apiQueue.d.ts +2 -1
- package/dist/{index9.cjs → utils/base64.cjs} +1 -1
- package/dist/utils/base64.cjs.map +1 -0
- package/dist/utils/base64.d.cts +6 -0
- package/dist/utils/base64.d.ts +2 -1
- package/dist/utils/base64.js +2 -1
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/certificate.cjs +7 -0
- package/dist/utils/certificate.d.cts +78 -0
- package/dist/utils/certificate.d.ts +64 -12
- package/dist/utils/certificate.js +3 -1
- package/dist/{index11.cjs → utils/document.cjs} +2 -2
- package/dist/utils/document.d.cts +62 -0
- package/dist/utils/document.d.ts +61 -210
- package/dist/utils/document.js +1 -1
- package/dist/utils/formatIdValue.cjs +3 -0
- package/dist/utils/formatIdValue.d.cts +5 -0
- package/dist/utils/formatIdValue.d.ts +2 -1
- package/dist/utils/getBaseUrl.cjs +3 -0
- package/dist/utils/getBaseUrl.d.cts +5 -0
- package/dist/utils/getBaseUrl.d.ts +2 -1
- package/dist/utils/lineItems.cjs +3 -0
- package/dist/utils/lineItems.d.cts +62 -0
- package/dist/utils/lineItems.d.ts +62 -0
- package/dist/utils/lineItems.js +3 -0
- package/dist/{index14.cjs → utils/signature-diagnostics.cjs} +4 -5
- package/dist/utils/signature-diagnostics.cjs.map +1 -0
- package/dist/utils/signature-diagnostics.d.cts +97 -0
- package/dist/utils/signature-diagnostics.d.ts +62 -61
- package/dist/utils/signature-diagnostics.js +3 -2
- package/dist/utils/signature-diagnostics.js.map +1 -0
- package/dist/{index15.cjs → utils/validation.cjs} +1 -1
- package/dist/utils/validation.cjs.map +1 -0
- package/dist/utils/validation.d.cts +109 -0
- package/dist/utils/validation.d.ts +62 -61
- package/dist/utils/validation.js +2 -1
- package/dist/utils/validation.js.map +1 -0
- package/dist/{utils-C4FoVKLq.d.ts → utils-BYVq373g.d.ts} +2 -1
- package/package.json +17 -7
- package/dist/certificate-CWmfCPdt.cjs.map +0 -1
- package/dist/chunk-CUT6urMc.cjs +0 -30
- package/dist/document-B6ab06s1.cjs.map +0 -1
- package/dist/documentManagement-BviJDtf2.cjs.map +0 -1
- package/dist/index10.cjs +0 -5
- package/dist/index12.cjs +0 -3
- package/dist/index13.cjs +0 -3
- package/dist/index14.cjs.map +0 -1
- package/dist/index15.cjs.map +0 -1
- package/dist/index16.cjs.map +0 -1
- package/dist/index17.cjs.map +0 -1
- package/dist/index18.cjs.map +0 -1
- package/dist/index20.cjs.map +0 -1
- package/dist/index23.cjs.map +0 -1
- package/dist/index24.cjs.map +0 -1
- package/dist/index26.cjs.map +0 -1
- package/dist/index27.cjs.map +0 -1
- package/dist/index31.cjs.map +0 -1
- package/dist/index32.cjs.map +0 -1
- package/dist/index33.cjs.map +0 -1
- package/dist/index34.cjs.map +0 -1
- package/dist/index35.cjs.map +0 -1
- package/dist/index36.cjs.map +0 -1
- package/dist/index37.cjs.map +0 -1
- package/dist/index38.cjs.map +0 -1
- package/dist/index39.cjs.map +0 -1
- package/dist/index40.cjs.map +0 -1
- package/dist/index41.cjs.map +0 -1
- package/dist/index42.cjs.map +0 -1
- package/dist/index43.cjs.map +0 -1
- package/dist/index44.cjs.map +0 -1
- package/dist/index45.cjs.map +0 -1
- package/dist/index46.cjs.map +0 -1
- package/dist/index47.cjs.map +0 -1
- package/dist/index48.cjs.map +0 -1
- package/dist/index49.cjs.map +0 -1
- package/dist/index5.cjs +0 -3
- package/dist/index50.cjs.map +0 -1
- package/dist/index51.cjs.map +0 -1
- package/dist/index52.cjs.map +0 -1
- package/dist/index53.cjs.map +0 -1
- package/dist/index54.cjs.map +0 -1
- package/dist/index55.cjs.map +0 -1
- package/dist/index56.cjs.map +0 -1
- package/dist/index57.cjs.map +0 -1
- package/dist/index58.cjs.map +0 -1
- package/dist/index59.cjs.map +0 -1
- package/dist/index6.cjs +0 -3
- package/dist/index60.cjs.map +0 -1
- package/dist/index61.cjs.map +0 -1
- package/dist/index61.cts.map +0 -1
- package/dist/index62.cjs.map +0 -1
- package/dist/index62.cts.map +0 -1
- package/dist/index63.cjs.map +0 -1
- package/dist/index63.cts.map +0 -1
- package/dist/index64.cjs.map +0 -1
- package/dist/index64.cts.map +0 -1
- package/dist/index65.cjs.map +0 -1
- package/dist/index65.cts.map +0 -1
- package/dist/index66.cjs.map +0 -1
- package/dist/index66.cts.map +0 -1
- package/dist/index67.cjs.map +0 -1
- package/dist/index67.cts.map +0 -1
- package/dist/index68.cjs.map +0 -1
- package/dist/index68.cts.map +0 -1
- package/dist/index69.cjs.map +0 -1
- package/dist/index69.cts.map +0 -1
- package/dist/index7.cjs +0 -6
- package/dist/index70.cjs.map +0 -1
- package/dist/index70.cts.map +0 -1
- package/dist/index71.cjs.map +0 -1
- package/dist/index71.cts.map +0 -1
- package/dist/index72.cjs.map +0 -1
- package/dist/index72.cts.map +0 -1
- package/dist/index73.cjs.map +0 -1
- package/dist/index73.cts.map +0 -1
- package/dist/index74.cjs.map +0 -1
- package/dist/index74.cts.map +0 -1
- package/dist/index75.cjs.map +0 -1
- package/dist/index75.cts.map +0 -1
- package/dist/index9.cjs.map +0 -1
- package/dist/msic-codes-CjrrJmzb.d.ts +0 -25
- package/dist/unit-types-VgYXIwTT.d.ts +0 -55
- /package/dist/{index19.cjs → types/documents.d.cjs} +0 -0
- /package/dist/{index21.cjs → types/index.d.cjs} +0 -0
- /package/dist/{index22.cjs → types/msic-codes.d.cjs} +0 -0
- /package/dist/{index25.cjs → types/signatures.d.cjs} +0 -0
- /package/dist/{index28.cjs → types/taxpayer.d.cjs} +0 -0
- /package/dist/{index29.cjs → types/unit-types.d.cjs} +0 -0
- /package/dist/{index30.cjs → types/utils.d.cjs} +0 -0
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import "../classification-codes-
|
|
2
|
-
import "../country-code-
|
|
3
|
-
import "../currencies-
|
|
4
|
-
import "../e-invoice-
|
|
5
|
-
import "../0X-
|
|
6
|
-
import "../1X-
|
|
7
|
-
import "../2X-
|
|
8
|
-
import "../3X-
|
|
9
|
-
import "../4X-
|
|
10
|
-
import "../5X-
|
|
11
|
-
import "../6X-
|
|
12
|
-
import "../7X-
|
|
13
|
-
import "../8X-
|
|
14
|
-
import "../9X-
|
|
15
|
-
import "../msic-codes-
|
|
16
|
-
import "../tax-types-
|
|
17
|
-
import "../state-codes-
|
|
18
|
-
import "../1X-
|
|
19
|
-
import "../2X-
|
|
20
|
-
import "../3X-
|
|
21
|
-
import "../4X-
|
|
22
|
-
import "../5X-
|
|
23
|
-
import "../6X-
|
|
24
|
-
import "../7X-
|
|
25
|
-
import "../8X-
|
|
26
|
-
import "../9X-
|
|
27
|
-
import "../AX-
|
|
28
|
-
import "../BX-
|
|
29
|
-
import "../CX-
|
|
30
|
-
import "../DX-
|
|
31
|
-
import "../EX-
|
|
32
|
-
import "../FX-
|
|
33
|
-
import "../GX-
|
|
34
|
-
import "../HX-
|
|
35
|
-
import "../IX-
|
|
36
|
-
import "../JX-
|
|
37
|
-
import "../KX-
|
|
38
|
-
import "../LX-
|
|
39
|
-
import "../MX-
|
|
40
|
-
import "../NX-
|
|
41
|
-
import "../OX-
|
|
42
|
-
import "../PX-
|
|
43
|
-
import "../QX-
|
|
44
|
-
import "../RX-
|
|
45
|
-
import "../SX-
|
|
46
|
-
import "../TX-
|
|
47
|
-
import "../UX-
|
|
48
|
-
import "../VX-
|
|
49
|
-
import "../WX-
|
|
50
|
-
import "../YX-
|
|
51
|
-
import "../ZX-
|
|
52
|
-
import "../XX-
|
|
53
|
-
import "../unit-types-
|
|
54
|
-
import "../documents-
|
|
55
|
-
import "../payment-modes-
|
|
56
|
-
import "../signatures-
|
|
57
|
-
import { NotificationResponse, NotificationSearchParams } from "../notifications-
|
|
58
|
-
import "../taxpayer-
|
|
59
|
-
import { Fetch } from "../utils-
|
|
60
|
-
import "../index-
|
|
1
|
+
import "../classification-codes-BQMnAQFr.js";
|
|
2
|
+
import "../country-code-DAejE5RV.js";
|
|
3
|
+
import "../currencies-Cg9RkxRB.js";
|
|
4
|
+
import "../e-invoice-BSCFsH-H.js";
|
|
5
|
+
import "../0X-bPhcc9Vv.js";
|
|
6
|
+
import "../1X-DKHYQyRy.js";
|
|
7
|
+
import "../2X-DN6M21cV.js";
|
|
8
|
+
import "../3X-DJRj5xLv.js";
|
|
9
|
+
import "../4X-BCvTomUF.js";
|
|
10
|
+
import "../5X-Dji6Soz5.js";
|
|
11
|
+
import "../6X-CO_u4RIY.js";
|
|
12
|
+
import "../7X-vzJ01lNF.js";
|
|
13
|
+
import "../8X-C4Wf4jYK.js";
|
|
14
|
+
import "../9X-1VwxN9g-.js";
|
|
15
|
+
import "../msic-codes-kysVPGdN.js";
|
|
16
|
+
import "../tax-types-QeZFKqew.js";
|
|
17
|
+
import "../state-codes-CAkYQnTd.js";
|
|
18
|
+
import "../1X-Bqi8dmY1.js";
|
|
19
|
+
import "../2X-CemxuAeL.js";
|
|
20
|
+
import "../3X-DIYh_ue4.js";
|
|
21
|
+
import "../4X-CZi5nwIr.js";
|
|
22
|
+
import "../5X-DyYBCAvY.js";
|
|
23
|
+
import "../6X-Csxu6lwi.js";
|
|
24
|
+
import "../7X-DivvfBsk.js";
|
|
25
|
+
import "../8X-D_Pw1H3K.js";
|
|
26
|
+
import "../9X-BwR9pibT.js";
|
|
27
|
+
import "../AX-CDubGAZO.js";
|
|
28
|
+
import "../BX-CBsKI8np.js";
|
|
29
|
+
import "../CX-DhOdAFyg.js";
|
|
30
|
+
import "../DX-CBiRJGqR.js";
|
|
31
|
+
import "../EX-CAn62WaX.js";
|
|
32
|
+
import "../FX-CANpsLC4.js";
|
|
33
|
+
import "../GX-BvSZZ8pE.js";
|
|
34
|
+
import "../HX-CxrnY-YC.js";
|
|
35
|
+
import "../IX-wdAD6eW8.js";
|
|
36
|
+
import "../JX-B5v815to.js";
|
|
37
|
+
import "../KX-BI8n7ACj.js";
|
|
38
|
+
import "../LX-BVvEz6Ji.js";
|
|
39
|
+
import "../MX-D_OsOP_v.js";
|
|
40
|
+
import "../NX-DIhAzAY3.js";
|
|
41
|
+
import "../OX-BZrRnj5g.js";
|
|
42
|
+
import "../PX-DGGrJNym.js";
|
|
43
|
+
import "../QX-DuTJFnHX.js";
|
|
44
|
+
import "../RX-DYQoV7am.js";
|
|
45
|
+
import "../SX-Dl1RlNnc.js";
|
|
46
|
+
import "../TX-SoIfFaZj.js";
|
|
47
|
+
import "../UX-DqBfrSsY.js";
|
|
48
|
+
import "../VX-Ahcpp3Si.js";
|
|
49
|
+
import "../WX-Di6vYD7A.js";
|
|
50
|
+
import "../YX-BPO04gSZ.js";
|
|
51
|
+
import "../ZX-DHu4FRKS.js";
|
|
52
|
+
import "../XX-BE4flzh6.js";
|
|
53
|
+
import "../unit-types-CZdxXbVN.js";
|
|
54
|
+
import "../documents-BpZn3hJq.js";
|
|
55
|
+
import "../payment-modes-BGP5McTY.js";
|
|
56
|
+
import "../signatures-Bk5aKcq6.js";
|
|
57
|
+
import { NotificationResponse, NotificationSearchParams } from "../notifications-B4BymhRJ.js";
|
|
58
|
+
import "../taxpayer-B1CSMqNS.js";
|
|
59
|
+
import { Fetch } from "../utils-BYVq373g.js";
|
|
60
|
+
import "../index-Dn3JIREW.js";
|
|
61
61
|
|
|
62
62
|
//#region src/api/notificationManagement.d.ts
|
|
63
63
|
interface NotificationContext {
|
|
@@ -65,4 +65,5 @@ interface NotificationContext {
|
|
|
65
65
|
}
|
|
66
66
|
declare function getNotifications(context: NotificationContext, params: NotificationSearchParams): Promise<NotificationResponse>;
|
|
67
67
|
//#endregion
|
|
68
|
-
export { getNotifications };
|
|
68
|
+
export { getNotifications };
|
|
69
|
+
//# sourceMappingURL=notificationManagement.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import "../classification-codes-B15PbWxz.cjs";
|
|
2
|
+
import "../country-code-DPeNFMMi.cjs";
|
|
3
|
+
import "../currencies-S5g1gzBU.cjs";
|
|
4
|
+
import "../e-invoice-BuwtFnlI.cjs";
|
|
5
|
+
import "../0X-Cr3M7hci.cjs";
|
|
6
|
+
import "../1X-CWwmfCzo.cjs";
|
|
7
|
+
import "../2X-DNtkJ0tj.cjs";
|
|
8
|
+
import "../3X-BOxfatu3.cjs";
|
|
9
|
+
import "../4X-C7fzDWJ_.cjs";
|
|
10
|
+
import "../5X-CNAFsDm2.cjs";
|
|
11
|
+
import "../6X-uObUP4VG.cjs";
|
|
12
|
+
import "../7X-BifJnY24.cjs";
|
|
13
|
+
import "../8X-DioBXCJ0.cjs";
|
|
14
|
+
import "../9X-BjffnXuq.cjs";
|
|
15
|
+
import "../msic-codes-CIKdPqag.cjs";
|
|
16
|
+
import "../tax-types-fu5Q6dic.cjs";
|
|
17
|
+
import "../state-codes-u3ppueWo.cjs";
|
|
18
|
+
import "../1X-DYw2tURz.cjs";
|
|
19
|
+
import "../2X-CXtqiwRg.cjs";
|
|
20
|
+
import "../3X-Bk_fUIAk.cjs";
|
|
21
|
+
import "../4X-CK9rj5qd.cjs";
|
|
22
|
+
import "../5X-CpAvNxvd.cjs";
|
|
23
|
+
import "../6X-bXWr_7xY.cjs";
|
|
24
|
+
import "../7X-BJBOlWhV.cjs";
|
|
25
|
+
import "../8X-dshwiOxU.cjs";
|
|
26
|
+
import "../9X-9j2Djy4W.cjs";
|
|
27
|
+
import "../AX-CWCopjCC.cjs";
|
|
28
|
+
import "../BX-Cq7WdhD3.cjs";
|
|
29
|
+
import "../CX-DlcVZfxx.cjs";
|
|
30
|
+
import "../DX-DLdv-Nxj.cjs";
|
|
31
|
+
import "../EX-CIJv8-Lw.cjs";
|
|
32
|
+
import "../FX-DlDM_Zea.cjs";
|
|
33
|
+
import "../GX-BFGNX6Jy.cjs";
|
|
34
|
+
import "../HX-D7Y9qRSm.cjs";
|
|
35
|
+
import "../IX-DPTrbhgX.cjs";
|
|
36
|
+
import "../JX-D8JmtNpo.cjs";
|
|
37
|
+
import "../KX-B46KJZrH.cjs";
|
|
38
|
+
import "../LX-CfTKy8Sx.cjs";
|
|
39
|
+
import "../MX-BKJ4gNvV.cjs";
|
|
40
|
+
import "../NX-CSdLIFqU.cjs";
|
|
41
|
+
import "../OX-BwqOsulT.cjs";
|
|
42
|
+
import "../PX-BTx0TXsJ.cjs";
|
|
43
|
+
import "../QX-BUXR8RJL.cjs";
|
|
44
|
+
import "../RX-CZ8HiH37.cjs";
|
|
45
|
+
import "../SX-CLxsqiQk.cjs";
|
|
46
|
+
import "../TX-DKc8hLc4.cjs";
|
|
47
|
+
import "../UX-bc7xDnZI.cjs";
|
|
48
|
+
import "../VX-CIHTFyoC.cjs";
|
|
49
|
+
import "../WX-BHvlq7Jx.cjs";
|
|
50
|
+
import "../YX-CkxLeFb4.cjs";
|
|
51
|
+
import "../ZX-DVb_buNI.cjs";
|
|
52
|
+
import "../XX-DztQxYHJ.cjs";
|
|
53
|
+
import "../unit-types-BXdufGWm.cjs";
|
|
54
|
+
import "../documents-D_V38Q_U.cjs";
|
|
55
|
+
import "../payment-modes-7c1lWlIr.cjs";
|
|
56
|
+
import "../signatures-CyDSZr_e.cjs";
|
|
57
|
+
import "../notifications-DdlEkprb.cjs";
|
|
58
|
+
import "../taxpayer-DwGzY1IL.cjs";
|
|
59
|
+
import "../utils-Cdqbbzca.cjs";
|
|
60
|
+
import { ClientCredentials } from "../index-Yr1QAbIF.cjs";
|
|
61
|
+
|
|
62
|
+
//#region src/api/platformLogin.d.ts
|
|
63
|
+
declare const platformLogin: (client: ClientCredentials) => Promise<{
|
|
64
|
+
token: string;
|
|
65
|
+
tokenExpiration: Date;
|
|
66
|
+
}>;
|
|
67
|
+
//#endregion
|
|
68
|
+
export { platformLogin };
|
|
69
|
+
//# sourceMappingURL=platformLogin.d.cts.map
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import "../classification-codes-
|
|
2
|
-
import "../country-code-
|
|
3
|
-
import "../currencies-
|
|
4
|
-
import "../e-invoice-
|
|
5
|
-
import "../0X-
|
|
6
|
-
import "../1X-
|
|
7
|
-
import "../2X-
|
|
8
|
-
import "../3X-
|
|
9
|
-
import "../4X-
|
|
10
|
-
import "../5X-
|
|
11
|
-
import "../6X-
|
|
12
|
-
import "../7X-
|
|
13
|
-
import "../8X-
|
|
14
|
-
import "../9X-
|
|
15
|
-
import "../msic-codes-
|
|
16
|
-
import "../tax-types-
|
|
17
|
-
import "../state-codes-
|
|
18
|
-
import "../1X-
|
|
19
|
-
import "../2X-
|
|
20
|
-
import "../3X-
|
|
21
|
-
import "../4X-
|
|
22
|
-
import "../5X-
|
|
23
|
-
import "../6X-
|
|
24
|
-
import "../7X-
|
|
25
|
-
import "../8X-
|
|
26
|
-
import "../9X-
|
|
27
|
-
import "../AX-
|
|
28
|
-
import "../BX-
|
|
29
|
-
import "../CX-
|
|
30
|
-
import "../DX-
|
|
31
|
-
import "../EX-
|
|
32
|
-
import "../FX-
|
|
33
|
-
import "../GX-
|
|
34
|
-
import "../HX-
|
|
35
|
-
import "../IX-
|
|
36
|
-
import "../JX-
|
|
37
|
-
import "../KX-
|
|
38
|
-
import "../LX-
|
|
39
|
-
import "../MX-
|
|
40
|
-
import "../NX-
|
|
41
|
-
import "../OX-
|
|
42
|
-
import "../PX-
|
|
43
|
-
import "../QX-
|
|
44
|
-
import "../RX-
|
|
45
|
-
import "../SX-
|
|
46
|
-
import "../TX-
|
|
47
|
-
import "../UX-
|
|
48
|
-
import "../VX-
|
|
49
|
-
import "../WX-
|
|
50
|
-
import "../YX-
|
|
51
|
-
import "../ZX-
|
|
52
|
-
import "../XX-
|
|
53
|
-
import "../unit-types-
|
|
54
|
-
import "../documents-
|
|
55
|
-
import "../payment-modes-
|
|
56
|
-
import "../signatures-
|
|
57
|
-
import "../notifications-
|
|
58
|
-
import "../taxpayer-
|
|
59
|
-
import "../utils-
|
|
60
|
-
import { ClientCredentials } from "../index-
|
|
1
|
+
import "../classification-codes-BQMnAQFr.js";
|
|
2
|
+
import "../country-code-DAejE5RV.js";
|
|
3
|
+
import "../currencies-Cg9RkxRB.js";
|
|
4
|
+
import "../e-invoice-BSCFsH-H.js";
|
|
5
|
+
import "../0X-bPhcc9Vv.js";
|
|
6
|
+
import "../1X-DKHYQyRy.js";
|
|
7
|
+
import "../2X-DN6M21cV.js";
|
|
8
|
+
import "../3X-DJRj5xLv.js";
|
|
9
|
+
import "../4X-BCvTomUF.js";
|
|
10
|
+
import "../5X-Dji6Soz5.js";
|
|
11
|
+
import "../6X-CO_u4RIY.js";
|
|
12
|
+
import "../7X-vzJ01lNF.js";
|
|
13
|
+
import "../8X-C4Wf4jYK.js";
|
|
14
|
+
import "../9X-1VwxN9g-.js";
|
|
15
|
+
import "../msic-codes-kysVPGdN.js";
|
|
16
|
+
import "../tax-types-QeZFKqew.js";
|
|
17
|
+
import "../state-codes-CAkYQnTd.js";
|
|
18
|
+
import "../1X-Bqi8dmY1.js";
|
|
19
|
+
import "../2X-CemxuAeL.js";
|
|
20
|
+
import "../3X-DIYh_ue4.js";
|
|
21
|
+
import "../4X-CZi5nwIr.js";
|
|
22
|
+
import "../5X-DyYBCAvY.js";
|
|
23
|
+
import "../6X-Csxu6lwi.js";
|
|
24
|
+
import "../7X-DivvfBsk.js";
|
|
25
|
+
import "../8X-D_Pw1H3K.js";
|
|
26
|
+
import "../9X-BwR9pibT.js";
|
|
27
|
+
import "../AX-CDubGAZO.js";
|
|
28
|
+
import "../BX-CBsKI8np.js";
|
|
29
|
+
import "../CX-DhOdAFyg.js";
|
|
30
|
+
import "../DX-CBiRJGqR.js";
|
|
31
|
+
import "../EX-CAn62WaX.js";
|
|
32
|
+
import "../FX-CANpsLC4.js";
|
|
33
|
+
import "../GX-BvSZZ8pE.js";
|
|
34
|
+
import "../HX-CxrnY-YC.js";
|
|
35
|
+
import "../IX-wdAD6eW8.js";
|
|
36
|
+
import "../JX-B5v815to.js";
|
|
37
|
+
import "../KX-BI8n7ACj.js";
|
|
38
|
+
import "../LX-BVvEz6Ji.js";
|
|
39
|
+
import "../MX-D_OsOP_v.js";
|
|
40
|
+
import "../NX-DIhAzAY3.js";
|
|
41
|
+
import "../OX-BZrRnj5g.js";
|
|
42
|
+
import "../PX-DGGrJNym.js";
|
|
43
|
+
import "../QX-DuTJFnHX.js";
|
|
44
|
+
import "../RX-DYQoV7am.js";
|
|
45
|
+
import "../SX-Dl1RlNnc.js";
|
|
46
|
+
import "../TX-SoIfFaZj.js";
|
|
47
|
+
import "../UX-DqBfrSsY.js";
|
|
48
|
+
import "../VX-Ahcpp3Si.js";
|
|
49
|
+
import "../WX-Di6vYD7A.js";
|
|
50
|
+
import "../YX-BPO04gSZ.js";
|
|
51
|
+
import "../ZX-DHu4FRKS.js";
|
|
52
|
+
import "../XX-BE4flzh6.js";
|
|
53
|
+
import "../unit-types-CZdxXbVN.js";
|
|
54
|
+
import "../documents-BpZn3hJq.js";
|
|
55
|
+
import "../payment-modes-BGP5McTY.js";
|
|
56
|
+
import "../signatures-Bk5aKcq6.js";
|
|
57
|
+
import "../notifications-B4BymhRJ.js";
|
|
58
|
+
import "../taxpayer-B1CSMqNS.js";
|
|
59
|
+
import "../utils-BYVq373g.js";
|
|
60
|
+
import { ClientCredentials } from "../index-Dn3JIREW.js";
|
|
61
61
|
|
|
62
62
|
//#region src/api/platformLogin.d.ts
|
|
63
63
|
declare const platformLogin: (client: ClientCredentials) => Promise<{
|
|
@@ -65,4 +65,5 @@ declare const platformLogin: (client: ClientCredentials) => Promise<{
|
|
|
65
65
|
tokenExpiration: Date;
|
|
66
66
|
}>;
|
|
67
67
|
//#endregion
|
|
68
|
-
export { platformLogin };
|
|
68
|
+
export { platformLogin };
|
|
69
|
+
//# sourceMappingURL=platformLogin.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
require('../formatIdValue-i67o4kyD.cjs');
|
|
2
|
+
const require_taxpayerValidation = require('../taxpayerValidation-DzCJROgP.cjs');
|
|
3
|
+
|
|
4
|
+
exports.taxpayerQRCode = require_taxpayerValidation.taxpayerQRCode;
|
|
5
|
+
exports.tinSearch = require_taxpayerValidation.tinSearch;
|
|
6
|
+
exports.verifyTin = require_taxpayerValidation.verifyTin;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import "../classification-codes-B15PbWxz.cjs";
|
|
2
|
+
import "../country-code-DPeNFMMi.cjs";
|
|
3
|
+
import "../currencies-S5g1gzBU.cjs";
|
|
4
|
+
import "../e-invoice-BuwtFnlI.cjs";
|
|
5
|
+
import "../0X-Cr3M7hci.cjs";
|
|
6
|
+
import "../1X-CWwmfCzo.cjs";
|
|
7
|
+
import "../2X-DNtkJ0tj.cjs";
|
|
8
|
+
import "../3X-BOxfatu3.cjs";
|
|
9
|
+
import "../4X-C7fzDWJ_.cjs";
|
|
10
|
+
import "../5X-CNAFsDm2.cjs";
|
|
11
|
+
import "../6X-uObUP4VG.cjs";
|
|
12
|
+
import "../7X-BifJnY24.cjs";
|
|
13
|
+
import "../8X-DioBXCJ0.cjs";
|
|
14
|
+
import "../9X-BjffnXuq.cjs";
|
|
15
|
+
import "../msic-codes-CIKdPqag.cjs";
|
|
16
|
+
import "../tax-types-fu5Q6dic.cjs";
|
|
17
|
+
import "../state-codes-u3ppueWo.cjs";
|
|
18
|
+
import "../1X-DYw2tURz.cjs";
|
|
19
|
+
import "../2X-CXtqiwRg.cjs";
|
|
20
|
+
import "../3X-Bk_fUIAk.cjs";
|
|
21
|
+
import "../4X-CK9rj5qd.cjs";
|
|
22
|
+
import "../5X-CpAvNxvd.cjs";
|
|
23
|
+
import "../6X-bXWr_7xY.cjs";
|
|
24
|
+
import "../7X-BJBOlWhV.cjs";
|
|
25
|
+
import "../8X-dshwiOxU.cjs";
|
|
26
|
+
import "../9X-9j2Djy4W.cjs";
|
|
27
|
+
import "../AX-CWCopjCC.cjs";
|
|
28
|
+
import "../BX-Cq7WdhD3.cjs";
|
|
29
|
+
import "../CX-DlcVZfxx.cjs";
|
|
30
|
+
import "../DX-DLdv-Nxj.cjs";
|
|
31
|
+
import "../EX-CIJv8-Lw.cjs";
|
|
32
|
+
import "../FX-DlDM_Zea.cjs";
|
|
33
|
+
import "../GX-BFGNX6Jy.cjs";
|
|
34
|
+
import "../HX-D7Y9qRSm.cjs";
|
|
35
|
+
import "../IX-DPTrbhgX.cjs";
|
|
36
|
+
import "../JX-D8JmtNpo.cjs";
|
|
37
|
+
import "../KX-B46KJZrH.cjs";
|
|
38
|
+
import "../LX-CfTKy8Sx.cjs";
|
|
39
|
+
import "../MX-BKJ4gNvV.cjs";
|
|
40
|
+
import "../NX-CSdLIFqU.cjs";
|
|
41
|
+
import "../OX-BwqOsulT.cjs";
|
|
42
|
+
import "../PX-BTx0TXsJ.cjs";
|
|
43
|
+
import "../QX-BUXR8RJL.cjs";
|
|
44
|
+
import "../RX-CZ8HiH37.cjs";
|
|
45
|
+
import "../SX-CLxsqiQk.cjs";
|
|
46
|
+
import "../TX-DKc8hLc4.cjs";
|
|
47
|
+
import "../UX-bc7xDnZI.cjs";
|
|
48
|
+
import "../VX-CIHTFyoC.cjs";
|
|
49
|
+
import "../WX-BHvlq7Jx.cjs";
|
|
50
|
+
import "../YX-CkxLeFb4.cjs";
|
|
51
|
+
import "../ZX-DVb_buNI.cjs";
|
|
52
|
+
import "../XX-DztQxYHJ.cjs";
|
|
53
|
+
import "../unit-types-BXdufGWm.cjs";
|
|
54
|
+
import { RegistrationType } from "../documents-D_V38Q_U.cjs";
|
|
55
|
+
import "../payment-modes-7c1lWlIr.cjs";
|
|
56
|
+
import "../signatures-CyDSZr_e.cjs";
|
|
57
|
+
import "../notifications-DdlEkprb.cjs";
|
|
58
|
+
import { TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse } from "../taxpayer-DwGzY1IL.cjs";
|
|
59
|
+
import { Fetch } from "../utils-Cdqbbzca.cjs";
|
|
60
|
+
import "../index-Yr1QAbIF.cjs";
|
|
61
|
+
|
|
62
|
+
//#region src/api/taxpayerValidation.d.ts
|
|
63
|
+
interface TaxpayerContext {
|
|
64
|
+
fetch: Fetch;
|
|
65
|
+
debug: boolean;
|
|
66
|
+
}
|
|
67
|
+
declare function tinSearch(context: TaxpayerContext, params: TinSearchParams): Promise<TinSearchResponse>;
|
|
68
|
+
declare function verifyTin(context: TaxpayerContext, tin: string, idType: RegistrationType, idValue: string): Promise<boolean>;
|
|
69
|
+
declare function taxpayerQRCode(context: TaxpayerContext, qrCodeText: string): Promise<TaxpayerQRCodeResponse>;
|
|
70
|
+
//#endregion
|
|
71
|
+
export { taxpayerQRCode, tinSearch, verifyTin };
|
|
72
|
+
//# sourceMappingURL=taxpayerValidation.d.cts.map
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import "../classification-codes-
|
|
2
|
-
import "../country-code-
|
|
3
|
-
import "../currencies-
|
|
4
|
-
import "../e-invoice-
|
|
5
|
-
import "../0X-
|
|
6
|
-
import "../1X-
|
|
7
|
-
import "../2X-
|
|
8
|
-
import "../3X-
|
|
9
|
-
import "../4X-
|
|
10
|
-
import "../5X-
|
|
11
|
-
import "../6X-
|
|
12
|
-
import "../7X-
|
|
13
|
-
import "../8X-
|
|
14
|
-
import "../9X-
|
|
15
|
-
import "../msic-codes-
|
|
16
|
-
import "../tax-types-
|
|
17
|
-
import "../state-codes-
|
|
18
|
-
import "../1X-
|
|
19
|
-
import "../2X-
|
|
20
|
-
import "../3X-
|
|
21
|
-
import "../4X-
|
|
22
|
-
import "../5X-
|
|
23
|
-
import "../6X-
|
|
24
|
-
import "../7X-
|
|
25
|
-
import "../8X-
|
|
26
|
-
import "../9X-
|
|
27
|
-
import "../AX-
|
|
28
|
-
import "../BX-
|
|
29
|
-
import "../CX-
|
|
30
|
-
import "../DX-
|
|
31
|
-
import "../EX-
|
|
32
|
-
import "../FX-
|
|
33
|
-
import "../GX-
|
|
34
|
-
import "../HX-
|
|
35
|
-
import "../IX-
|
|
36
|
-
import "../JX-
|
|
37
|
-
import "../KX-
|
|
38
|
-
import "../LX-
|
|
39
|
-
import "../MX-
|
|
40
|
-
import "../NX-
|
|
41
|
-
import "../OX-
|
|
42
|
-
import "../PX-
|
|
43
|
-
import "../QX-
|
|
44
|
-
import "../RX-
|
|
45
|
-
import "../SX-
|
|
46
|
-
import "../TX-
|
|
47
|
-
import "../UX-
|
|
48
|
-
import "../VX-
|
|
49
|
-
import "../WX-
|
|
50
|
-
import "../YX-
|
|
51
|
-
import "../ZX-
|
|
52
|
-
import "../XX-
|
|
53
|
-
import "../unit-types-
|
|
54
|
-
import { RegistrationType } from "../documents-
|
|
55
|
-
import "../payment-modes-
|
|
56
|
-
import "../signatures-
|
|
57
|
-
import "../notifications-
|
|
58
|
-
import { TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse } from "../taxpayer-
|
|
59
|
-
import { Fetch } from "../utils-
|
|
60
|
-
import "../index-
|
|
1
|
+
import "../classification-codes-BQMnAQFr.js";
|
|
2
|
+
import "../country-code-DAejE5RV.js";
|
|
3
|
+
import "../currencies-Cg9RkxRB.js";
|
|
4
|
+
import "../e-invoice-BSCFsH-H.js";
|
|
5
|
+
import "../0X-bPhcc9Vv.js";
|
|
6
|
+
import "../1X-DKHYQyRy.js";
|
|
7
|
+
import "../2X-DN6M21cV.js";
|
|
8
|
+
import "../3X-DJRj5xLv.js";
|
|
9
|
+
import "../4X-BCvTomUF.js";
|
|
10
|
+
import "../5X-Dji6Soz5.js";
|
|
11
|
+
import "../6X-CO_u4RIY.js";
|
|
12
|
+
import "../7X-vzJ01lNF.js";
|
|
13
|
+
import "../8X-C4Wf4jYK.js";
|
|
14
|
+
import "../9X-1VwxN9g-.js";
|
|
15
|
+
import "../msic-codes-kysVPGdN.js";
|
|
16
|
+
import "../tax-types-QeZFKqew.js";
|
|
17
|
+
import "../state-codes-CAkYQnTd.js";
|
|
18
|
+
import "../1X-Bqi8dmY1.js";
|
|
19
|
+
import "../2X-CemxuAeL.js";
|
|
20
|
+
import "../3X-DIYh_ue4.js";
|
|
21
|
+
import "../4X-CZi5nwIr.js";
|
|
22
|
+
import "../5X-DyYBCAvY.js";
|
|
23
|
+
import "../6X-Csxu6lwi.js";
|
|
24
|
+
import "../7X-DivvfBsk.js";
|
|
25
|
+
import "../8X-D_Pw1H3K.js";
|
|
26
|
+
import "../9X-BwR9pibT.js";
|
|
27
|
+
import "../AX-CDubGAZO.js";
|
|
28
|
+
import "../BX-CBsKI8np.js";
|
|
29
|
+
import "../CX-DhOdAFyg.js";
|
|
30
|
+
import "../DX-CBiRJGqR.js";
|
|
31
|
+
import "../EX-CAn62WaX.js";
|
|
32
|
+
import "../FX-CANpsLC4.js";
|
|
33
|
+
import "../GX-BvSZZ8pE.js";
|
|
34
|
+
import "../HX-CxrnY-YC.js";
|
|
35
|
+
import "../IX-wdAD6eW8.js";
|
|
36
|
+
import "../JX-B5v815to.js";
|
|
37
|
+
import "../KX-BI8n7ACj.js";
|
|
38
|
+
import "../LX-BVvEz6Ji.js";
|
|
39
|
+
import "../MX-D_OsOP_v.js";
|
|
40
|
+
import "../NX-DIhAzAY3.js";
|
|
41
|
+
import "../OX-BZrRnj5g.js";
|
|
42
|
+
import "../PX-DGGrJNym.js";
|
|
43
|
+
import "../QX-DuTJFnHX.js";
|
|
44
|
+
import "../RX-DYQoV7am.js";
|
|
45
|
+
import "../SX-Dl1RlNnc.js";
|
|
46
|
+
import "../TX-SoIfFaZj.js";
|
|
47
|
+
import "../UX-DqBfrSsY.js";
|
|
48
|
+
import "../VX-Ahcpp3Si.js";
|
|
49
|
+
import "../WX-Di6vYD7A.js";
|
|
50
|
+
import "../YX-BPO04gSZ.js";
|
|
51
|
+
import "../ZX-DHu4FRKS.js";
|
|
52
|
+
import "../XX-BE4flzh6.js";
|
|
53
|
+
import "../unit-types-CZdxXbVN.js";
|
|
54
|
+
import { RegistrationType } from "../documents-BpZn3hJq.js";
|
|
55
|
+
import "../payment-modes-BGP5McTY.js";
|
|
56
|
+
import "../signatures-Bk5aKcq6.js";
|
|
57
|
+
import "../notifications-B4BymhRJ.js";
|
|
58
|
+
import { TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse } from "../taxpayer-B1CSMqNS.js";
|
|
59
|
+
import { Fetch } from "../utils-BYVq373g.js";
|
|
60
|
+
import "../index-Dn3JIREW.js";
|
|
61
61
|
|
|
62
62
|
//#region src/api/taxpayerValidation.d.ts
|
|
63
63
|
interface TaxpayerContext {
|
|
@@ -68,4 +68,5 @@ declare function tinSearch(context: TaxpayerContext, params: TinSearchParams): P
|
|
|
68
68
|
declare function verifyTin(context: TaxpayerContext, tin: string, idType: RegistrationType, idValue: string): Promise<boolean>;
|
|
69
69
|
declare function taxpayerQRCode(context: TaxpayerContext, qrCodeText: string): Promise<TaxpayerQRCodeResponse>;
|
|
70
70
|
//#endregion
|
|
71
|
-
export { taxpayerQRCode, tinSearch, verifyTin };
|
|
71
|
+
export { taxpayerQRCode, tinSearch, verifyTin };
|
|
72
|
+
//# sourceMappingURL=taxpayerValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiQueue-B6Q644Bz.js","names":["queues: Record<string, Queue>","LIMITS: Record<ApiCategory, { max: number; perMs: number }>","timestamps: number[]","windowMs: number","now: number","max: number","clientId: string","category: ApiCategory","task: Task<T>","now","key: string","debug: boolean","category?: ApiCategory","path: string","method: string"],"sources":["../src/utils/apiQueue.ts"],"sourcesContent":["// A very small utility that provides per-endpoint request queuing with rate-limits.\n// The goal is to make sure that we never exceed the vendor-defined limits while also ensuring\n// that every request is eventually executed.\n//\n// NOTE: This is intentionally minimal – no external dependencies are introduced.\n// If you need more advanced features (persistence, jitter, etc.) consider a library such as `bottleneck`.\n\n/*\nRate-limit specification (per 60-second window)\n----------------------------------------------\nLogin as Taxpayer System : 12\nLogin as Intermediary System : 12\nSubmit Documents : 100\nGet Submission : 300\nCancel Document : 12\nReject Document : 12\nGet Document : 60\nGet Document Details : 125\nGet Recent Documents : 12\nSearch Documents : 12\nSearch Taxpayer's TIN : 60\nTaxpayer's QR Code : 60\n*/\n\nexport type ApiCategory =\n | 'loginTaxpayer'\n | 'loginIntermediary'\n | 'submitDocuments'\n | 'getSubmission'\n | 'cancelDocument'\n | 'rejectDocument'\n | 'getDocument'\n | 'getDocumentDetails'\n | 'getRecentDocuments'\n | 'searchDocuments'\n | 'searchTin'\n | 'taxpayerQr'\n | 'default'\n\ntype Task<T> = () => Promise<T>\n\ninterface Queue {\n running: number\n queue: Array<{ run: () => void; addedAt: number }>\n requestTimestamps: number[] // Track all request timestamps in the sliding window\n nextTimer: NodeJS.Timeout | null // Track scheduled timer to avoid pile-up\n}\n\nconst queues: Record<string, Queue> = {}\n\n// Rate limits: max requests per time window (in ms)\nconst LIMITS: Record<ApiCategory, { max: number; perMs: number }> = {\n loginTaxpayer: { max: 12, perMs: 60000 }, // 12 req/60s\n loginIntermediary: { max: 12, perMs: 60000 }, // 12 req/60s\n submitDocuments: { max: 100, perMs: 60000 }, // 100 req/60s\n getSubmission: { max: 300, perMs: 60000 }, // 300 req/60s\n cancelDocument: { max: 12, perMs: 60000 }, // 12 req/60s\n rejectDocument: { max: 12, perMs: 60000 }, // 12 req/60s\n getDocument: { max: 60, perMs: 60000 }, // 60 req/60s\n getDocumentDetails: { max: 125, perMs: 60000 }, // 125 req/60s\n getRecentDocuments: { max: 12, perMs: 60000 }, // 12 req/60s\n searchDocuments: { max: 12, perMs: 60000 }, // 12 req/60s\n searchTin: { max: 60, perMs: 60000 }, // 60 req/60s\n taxpayerQr: { max: 60, perMs: 60000 }, // 60 req/60s\n default: { max: 12, perMs: 60000 }, // 12 req/60s (minimum limit)\n}\n\n/**\n * Clean up old timestamps outside the sliding window\n */\nfunction cleanupTimestamps(\n timestamps: number[],\n windowMs: number,\n now: number,\n): number[] {\n return timestamps.filter(ts => now - ts < windowMs)\n}\n\n/**\n * Calculate when we can make the next request without exceeding the rate limit\n */\nfunction getNextAvailableTime(\n timestamps: number[],\n max: number,\n windowMs: number,\n now: number,\n): number {\n if (timestamps.length < max) {\n return now // Can execute immediately\n }\n\n // We're at the limit. Find when the oldest request will expire\n const oldestTimestamp = timestamps[0]\n if (!oldestTimestamp) {\n return now // Shouldn't happen, but fallback to now\n }\n return oldestTimestamp + windowMs\n}\n\n/**\n * Public helper to schedule a request according to the category's limits.\n * Rate limits are enforced per clientId, so multiple instances with the same\n * clientId will share rate limiters, while different clientIds get separate limiters.\n *\n * This implementation uses a sliding window to track all requests within the time window.\n */\nexport function queueRequest<T>(\n clientId: string,\n category: ApiCategory,\n task: Task<T>,\n debug = false,\n): Promise<T> {\n const key = `${clientId}:${category}`\n if (!queues[key]) {\n queues[key] = {\n running: 0,\n queue: [],\n requestTimestamps: [],\n nextTimer: null,\n }\n }\n\n const queue = queues[key]!\n const { max, perMs } = LIMITS[category] ?? LIMITS.default\n\n return new Promise<T>((resolve, reject) => {\n const run = () => {\n const now = Date.now()\n\n // Clean up old timestamps before checking\n queue.requestTimestamps = cleanupTimestamps(\n queue.requestTimestamps,\n perMs,\n now,\n )\n\n // Check if we can execute now\n if (queue.requestTimestamps.length >= max) {\n // We've hit the rate limit, need to wait\n const nextAvailable = getNextAvailableTime(\n queue.requestTimestamps,\n max,\n perMs,\n now,\n )\n const waitTime = nextAvailable - now\n\n if (debug) {\n console.log(\n `[apiQueue] 🚫 Rate limit reached (${queue.requestTimestamps.length}/${max} in last ${perMs}ms). Queuing request. Need to wait ${waitTime.toFixed(0)}ms. Queue size: ${queue.queue.length + 1}`,\n )\n }\n\n // Re-queue this request to try again later\n queue.queue.push({ run, addedAt: now })\n // Don't call processQueue here - let the scheduled timer handle it\n // to avoid potential requeue loops\n return\n }\n\n // Record this request timestamp\n queue.requestTimestamps.push(now)\n queue.running++\n\n if (debug) {\n console.log(\n `[apiQueue] ▶️ Executing request (${category}). Requests in window: ${queue.requestTimestamps.length}/${max}. Running: ${queue.running}. Queue size: ${queue.queue.length}`,\n )\n }\n\n task()\n .then(resolve)\n .catch(reject)\n .finally(() => {\n queue.running--\n if (debug) {\n console.log(\n `[apiQueue] ✅ Request completed (${category}). Requests in window: ${queue.requestTimestamps.length}/${max}. Running: ${queue.running}. Queue size: ${queue.queue.length}`,\n )\n }\n processQueue(key, debug, category)\n })\n }\n\n // Add to queue or run immediately\n const now = Date.now()\n queue.requestTimestamps = cleanupTimestamps(\n queue.requestTimestamps,\n perMs,\n now,\n )\n\n if (queue.queue.length > 0 || queue.requestTimestamps.length >= max) {\n // Either there's already a queue, or we're at the rate limit\n queue.queue.push({ run, addedAt: now })\n if (debug) {\n console.log(\n `[apiQueue] ⏳ Queued request (${category}). Requests in window: ${queue.requestTimestamps.length}/${max}. Queue size: ${queue.queue.length}`,\n )\n }\n processQueue(key, debug, category)\n } else {\n // Can run immediately\n run()\n }\n })\n}\n\nfunction processQueue(key: string, debug: boolean, category: ApiCategory) {\n const queue = queues[key]\n if (!queue || queue.queue.length === 0) return\n\n const { max, perMs } = LIMITS[category] ?? LIMITS.default\n const now = Date.now()\n\n // Clean up old timestamps\n queue.requestTimestamps = cleanupTimestamps(\n queue.requestTimestamps,\n perMs,\n now,\n )\n\n // Check if we can process the next request\n if (queue.requestTimestamps.length < max) {\n // We have capacity, process immediately\n const next = queue.queue.shift()\n if (next) {\n if (debug) {\n const waitTime = Date.now() - next.addedAt\n console.log(\n `[apiQueue] 🚀 Processing queued request (${category}). Waited: ${waitTime.toFixed(0)}ms. Queue size: ${queue.queue.length}`,\n )\n }\n next.run()\n }\n // After one runs, immediately try again (in case there's more space)\n if (queue.queue.length > 0) {\n processQueue(key, debug, category)\n }\n } else {\n // We're at capacity, schedule for when the oldest request expires\n const nextAvailable = getNextAvailableTime(\n queue.requestTimestamps,\n max,\n perMs,\n now,\n )\n const delay = Math.max(0, nextAvailable - now + 50) // +50ms buffer for timer precision\n\n if (debug) {\n console.log(\n `[apiQueue] ⏸️ Delaying queue processing (${category}). Will retry in ${delay.toFixed(0)}ms. Queue size: ${queue.queue.length}`,\n )\n }\n\n // Only schedule a timer if one isn't already scheduled\n // This prevents timer pile-up during bursts\n if (!queue.nextTimer) {\n queue.nextTimer = setTimeout(() => {\n queue.nextTimer = null\n processQueue(key, debug, category)\n }, delay)\n }\n }\n}\n\n/**\n * Cleanup function to clear all queues and timers for a specific client.\n * Useful for testing or cleanup on application shutdown.\n */\nexport function clearQueue(clientId: string, category?: ApiCategory): void {\n if (category) {\n const key = `${clientId}:${category}`\n const queue = queues[key]\n if (queue) {\n if (queue.nextTimer) {\n clearTimeout(queue.nextTimer)\n queue.nextTimer = null\n }\n queue.queue = []\n queue.requestTimestamps = []\n queue.running = 0\n }\n } else {\n // Clear all queues for this client\n Object.keys(queues).forEach(key => {\n if (key.startsWith(`${clientId}:`)) {\n const queue = queues[key]\n if (queue?.nextTimer) {\n clearTimeout(queue.nextTimer)\n queue.nextTimer = null\n }\n delete queues[key]\n }\n })\n }\n}\n\n/**\n * Very naive path-based category detection. If no matcher fits, the `default` category\n * (effectively unlimited) is returned. Adjust these heuristics as your API surface evolves.\n */\nexport function categorizeRequest(\n path: string,\n method: string = 'GET',\n): ApiCategory {\n const cleanPath = path.toLowerCase()\n const isPost = method?.toUpperCase() === 'POST'\n\n if (cleanPath.includes('/documentsubmissions')) {\n return isPost ? 'submitDocuments' : 'getSubmission'\n }\n\n // -----------------------------\n // v1.0 API endpoint matchers\n // -----------------------------\n\n // Get Recent Documents - /api/v1.0/documents/recent\n if (cleanPath.includes('/documents/recent')) {\n return 'getRecentDocuments'\n }\n\n // Search Documents - /api/v1.0/documents/search\n if (cleanPath.includes('/documents/search')) {\n return 'searchDocuments'\n }\n\n // Document state actions (cancel/reject) - PUT /api/v1.0/documents/state/{uuid}/state\n // Both cancel and reject use the same endpoint, differentiated only by request body\n if (cleanPath.includes('/documents/state/') && cleanPath.endsWith('/state')) {\n // Both cancelDocument and rejectDocument share the same rate limit (12 RPM)\n // Use cancelDocument category for both since they share the same bucket\n return 'cancelDocument'\n }\n\n // Document raw content - /api/v1.0/documents/{uuid}/raw\n if (/\\/documents\\/[^/]+\\/raw$/.test(cleanPath)) {\n return 'getDocument'\n }\n\n // Document details - /api/v1.0/documents/{uuid}/details\n if (/\\/documents\\/[^/]+\\/details$/.test(cleanPath)) {\n return 'getDocumentDetails'\n }\n\n // Taxpayer TIN search & validation share same limit bucket\n if (cleanPath.includes('/taxpayer/search/tin')) return 'searchTin'\n if (cleanPath.includes('/taxpayer/validate/')) return 'searchTin'\n\n // Taxpayer QR code info\n if (cleanPath.includes('/taxpayer/qrcode')) return 'taxpayerQr'\n\n // Legacy matchers (kept for backward compatibility)\n if (cleanPath.includes('/searchtin')) return 'searchTin'\n if (cleanPath.includes('/qrcode')) return 'taxpayerQr'\n if (cleanPath.includes('/connect/token')) {\n return 'loginTaxpayer'\n }\n\n return 'default'\n}\n"],"mappings":"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"}
|