@ripwords/myinvois-client 0.4.0 → 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/dist/0X-Cr3M7hci.d.cts +211 -0
- package/dist/0X-bPhcc9Vv.d.ts +211 -0
- package/dist/1X-Bqi8dmY1.d.ts +20 -0
- package/dist/1X-CWwmfCzo.d.cts +112 -0
- package/dist/1X-DKHYQyRy.d.ts +112 -0
- package/dist/1X-DYw2tURz.d.cts +20 -0
- package/dist/2X-CXtqiwRg.d.cts +40 -0
- package/dist/2X-CemxuAeL.d.ts +40 -0
- package/dist/2X-DN6M21cV.d.ts +140 -0
- package/dist/2X-DNtkJ0tj.d.cts +140 -0
- package/dist/3X-BOxfatu3.d.cts +62 -0
- package/dist/3X-Bk_fUIAk.d.cts +21 -0
- package/dist/3X-DIYh_ue4.d.ts +21 -0
- package/dist/3X-DJRj5xLv.d.ts +62 -0
- package/dist/4X-BCvTomUF.d.ts +265 -0
- package/dist/4X-C7fzDWJ_.d.cts +265 -0
- package/dist/4X-CK9rj5qd.d.cts +31 -0
- package/dist/4X-CZi5nwIr.d.ts +31 -0
- package/dist/5X-CNAFsDm2.d.cts +77 -0
- package/dist/5X-CpAvNxvd.d.cts +22 -0
- package/dist/5X-Dji6Soz5.d.ts +77 -0
- package/dist/5X-DyYBCAvY.d.ts +22 -0
- package/dist/6X-CO_u4RIY.d.ts +105 -0
- package/dist/6X-Csxu6lwi.d.ts +16 -0
- package/dist/6X-bXWr_7xY.d.cts +16 -0
- package/dist/6X-uObUP4VG.d.cts +105 -0
- package/dist/7X-BJBOlWhV.d.cts +16 -0
- package/dist/7X-BifJnY24.d.cts +71 -0
- package/dist/7X-DivvfBsk.d.ts +16 -0
- package/dist/7X-vzJ01lNF.d.ts +71 -0
- package/dist/8X-C4Wf4jYK.d.ts +110 -0
- package/dist/8X-D_Pw1H3K.d.ts +19 -0
- package/dist/8X-DioBXCJ0.d.cts +110 -0
- package/dist/8X-dshwiOxU.d.cts +19 -0
- package/dist/9X-1VwxN9g-.d.ts +98 -0
- package/dist/9X-9j2Djy4W.d.cts +15 -0
- package/dist/9X-BjffnXuq.d.cts +98 -0
- package/dist/9X-BwR9pibT.d.ts +15 -0
- package/dist/AX-CDubGAZO.d.ts +111 -0
- package/dist/AX-CWCopjCC.d.cts +111 -0
- package/dist/BX-CBsKI8np.d.ts +115 -0
- package/dist/BX-Cq7WdhD3.d.cts +115 -0
- package/dist/CX-DhOdAFyg.d.ts +128 -0
- package/dist/CX-DlcVZfxx.d.cts +128 -0
- package/dist/DX-CBiRJGqR.d.ts +115 -0
- package/dist/DX-DLdv-Nxj.d.cts +115 -0
- package/dist/EX-CAn62WaX.d.ts +107 -0
- package/dist/EX-CIJv8-Lw.d.cts +107 -0
- package/dist/FX-CANpsLC4.d.ts +127 -0
- package/dist/FX-DlDM_Zea.d.cts +127 -0
- package/dist/GX-BFGNX6Jy.d.cts +136 -0
- package/dist/GX-BvSZZ8pE.d.ts +136 -0
- package/dist/HX-CxrnY-YC.d.ts +126 -0
- package/dist/HX-D7Y9qRSm.d.cts +126 -0
- package/dist/IX-DPTrbhgX.d.cts +23 -0
- package/dist/IX-wdAD6eW8.d.ts +23 -0
- package/dist/JX-B5v815to.d.ts +104 -0
- package/dist/JX-D8JmtNpo.d.cts +104 -0
- package/dist/KX-B46KJZrH.d.cts +151 -0
- package/dist/KX-BI8n7ACj.d.ts +151 -0
- package/dist/LX-BVvEz6Ji.d.ts +123 -0
- package/dist/LX-CfTKy8Sx.d.cts +123 -0
- package/dist/MX-BKJ4gNvV.d.cts +153 -0
- package/dist/MX-D_OsOP_v.d.ts +153 -0
- package/dist/NX-CSdLIFqU.d.cts +122 -0
- package/dist/NX-DIhAzAY3.d.ts +122 -0
- package/dist/OX-BZrRnj5g.d.ts +26 -0
- package/dist/OX-BwqOsulT.d.cts +26 -0
- package/dist/PX-BTx0TXsJ.d.cts +121 -0
- package/dist/PX-DGGrJNym.d.ts +121 -0
- package/dist/QX-BUXR8RJL.d.cts +59 -0
- package/dist/QX-DuTJFnHX.d.ts +59 -0
- package/dist/RX-CZ8HiH37.d.cts +23 -0
- package/dist/RX-DYQoV7am.d.ts +23 -0
- package/dist/SX-CLxsqiQk.d.cts +40 -0
- package/dist/SX-Dl1RlNnc.d.ts +40 -0
- package/dist/TX-DKc8hLc4.d.cts +31 -0
- package/dist/TX-SoIfFaZj.d.ts +31 -0
- package/dist/UX-DqBfrSsY.d.ts +18 -0
- package/dist/UX-bc7xDnZI.d.cts +18 -0
- package/dist/VX-Ahcpp3Si.d.ts +17 -0
- package/dist/VX-CIHTFyoC.d.cts +17 -0
- package/dist/WX-BHvlq7Jx.d.cts +26 -0
- package/dist/WX-Di6vYD7A.d.ts +26 -0
- package/dist/XX-BE4flzh6.d.ts +828 -0
- package/dist/XX-DztQxYHJ.d.cts +828 -0
- package/dist/YX-BPO04gSZ.d.ts +20 -0
- package/dist/YX-CkxLeFb4.d.cts +20 -0
- package/dist/ZX-DHu4FRKS.d.ts +22 -0
- package/dist/ZX-DVb_buNI.d.cts +22 -0
- package/dist/{index2.cjs → api/documentManagement.cjs} +1 -1
- package/dist/api/documentManagement.d.cts +90 -0
- package/dist/api/documentManagement.d.ts +90 -0
- package/dist/api/documentManagement.js +3 -0
- package/dist/{index3.cjs → api/documentSubmission.cjs} +3 -3
- package/dist/api/documentSubmission.d.cts +93 -0
- package/dist/api/documentSubmission.d.ts +93 -0
- package/dist/api/documentSubmission.js +5 -0
- package/dist/{index4.cjs → api/documentTypeManagement.cjs} +1 -1
- package/dist/api/documentTypeManagement.d.cts +71 -0
- package/dist/api/documentTypeManagement.d.ts +71 -0
- package/dist/api/documentTypeManagement.js +3 -0
- package/dist/api/notificationManagement.cjs +3 -0
- package/dist/api/notificationManagement.d.cts +69 -0
- package/dist/api/notificationManagement.d.ts +69 -0
- package/dist/api/notificationManagement.js +3 -0
- package/dist/api/platformLogin.cjs +3 -0
- package/dist/api/platformLogin.d.cts +69 -0
- package/dist/api/platformLogin.d.ts +69 -0
- package/dist/api/platformLogin.js +3 -0
- package/dist/api/taxpayerValidation.cjs +6 -0
- package/dist/api/taxpayerValidation.d.cts +72 -0
- package/dist/api/taxpayerValidation.d.ts +72 -0
- package/dist/api/taxpayerValidation.js +4 -0
- package/dist/apiQueue-B6Q644Bz.js +202 -0
- package/dist/apiQueue-B6Q644Bz.js.map +1 -0
- package/dist/certificate-Cg6spxUs.js +52 -0
- package/dist/certificate-Cg6spxUs.js.map +1 -0
- package/dist/classification-codes-B15PbWxz.d.cts +118 -0
- package/dist/classification-codes-BQMnAQFr.d.ts +118 -0
- package/dist/country-code-DAejE5RV.d.ts +543 -0
- package/dist/country-code-DPeNFMMi.d.cts +543 -0
- package/dist/currencies-Cg9RkxRB.d.ts +208 -0
- package/dist/currencies-S5g1gzBU.d.cts +208 -0
- package/dist/document-BC52NCdW.js +653 -0
- 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-DZKm582-.js +51 -0
- package/dist/documentManagement-DZKm582-.js.map +1 -0
- package/dist/documentSubmission-DSsX0ldK.js +136 -0
- package/dist/documentSubmission-DSsX0ldK.js.map +1 -0
- package/dist/documentTypeManagement-cBtVCOY3.js +23 -0
- package/dist/documentTypeManagement-cBtVCOY3.js.map +1 -0
- package/dist/documents-BpZn3hJq.d.ts +1197 -0
- package/dist/documents-D_V38Q_U.d.cts +1197 -0
- package/dist/e-invoice-BSCFsH-H.d.ts +44 -0
- package/dist/e-invoice-BuwtFnlI.d.cts +44 -0
- package/dist/formatIdValue-qTxJqj9o.js +8 -0
- package/dist/formatIdValue-qTxJqj9o.js.map +1 -0
- package/dist/getBaseUrl-D7nUmoYb.js +8 -0
- package/dist/getBaseUrl-D7nUmoYb.js.map +1 -0
- package/dist/index-Dn3JIREW.d.ts +16 -0
- package/dist/index-Yr1QAbIF.d.cts +16 -0
- package/dist/index.d.cts +616 -0
- package/dist/index.d.ts +616 -0
- package/dist/index.js +629 -0
- 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-CBSo7giH.d.cts +32 -0
- package/dist/lineItems-CrkEXi2m.d.ts +32 -0
- package/dist/msic-codes-CIKdPqag.d.cts +26 -0
- package/dist/msic-codes-kysVPGdN.d.ts +26 -0
- package/dist/notificationManagement-n4Z5e-My.js +20 -0
- package/dist/notificationManagement-n4Z5e-My.js.map +1 -0
- package/dist/notifications-B4BymhRJ.d.ts +63 -0
- package/dist/notifications-DdlEkprb.d.cts +63 -0
- package/dist/payment-modes-7c1lWlIr.d.cts +44 -0
- package/dist/payment-modes-BGP5McTY.d.ts +44 -0
- package/dist/platformLogin-CqI9OLYP.js +40 -0
- package/dist/platformLogin-CqI9OLYP.js.map +1 -0
- package/dist/signatures-Bk5aKcq6.d.ts +173 -0
- package/dist/signatures-CyDSZr_e.d.cts +173 -0
- package/dist/state-codes-CAkYQnTd.d.ts +62 -0
- package/dist/state-codes-u3ppueWo.d.cts +62 -0
- package/dist/tax-types-QeZFKqew.d.ts +42 -0
- package/dist/tax-types-fu5Q6dic.d.cts +42 -0
- package/dist/taxpayer-B1CSMqNS.d.ts +36 -0
- package/dist/taxpayer-DwGzY1IL.d.cts +36 -0
- package/dist/taxpayerValidation-Xd_EHDvk.js +48 -0
- package/dist/taxpayerValidation-Xd_EHDvk.js.map +1 -0
- package/dist/{index17.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 +2 -0
- package/dist/{index18.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 +2 -0
- package/dist/{index19.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 +2 -0
- package/dist/types/documents.d.cts +55 -0
- package/dist/types/documents.d.ts +55 -0
- package/dist/{index21.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 +2 -0
- package/dist/types/index.d.cts +61 -0
- package/dist/types/index.d.ts +61 -0
- package/dist/{index32.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 +2 -0
- package/dist/{index33.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 +2 -0
- package/dist/{index34.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 +2 -0
- package/dist/{index35.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 +2 -0
- package/dist/{index36.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 +2 -0
- package/dist/{index37.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 +2 -0
- package/dist/{index38.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 +2 -0
- package/dist/{index39.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 +2 -0
- package/dist/{index40.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 +2 -0
- package/dist/{index41.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 +2 -0
- package/dist/types/msic-codes.d.cts +12 -0
- package/dist/types/msic-codes.d.ts +12 -0
- package/dist/{index24.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 +2 -0
- package/dist/{index25.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 +2 -0
- package/dist/types/signatures.d.cts +2 -0
- package/dist/types/signatures.d.ts +2 -0
- package/dist/{index27.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 +2 -0
- package/dist/{index28.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 +2 -0
- package/dist/types/taxpayer.d.cts +56 -0
- package/dist/types/taxpayer.d.ts +56 -0
- package/dist/{index42.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 +2 -0
- package/dist/{index43.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 +2 -0
- package/dist/{index44.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 +2 -0
- package/dist/{index45.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 +2 -0
- package/dist/{index46.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 +2 -0
- package/dist/{index47.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 +2 -0
- package/dist/{index48.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 +2 -0
- package/dist/{index49.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 +2 -0
- package/dist/{index50.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 +2 -0
- package/dist/{index51.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 +2 -0
- package/dist/{index52.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 +2 -0
- package/dist/{index53.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 +2 -0
- package/dist/{index54.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 +2 -0
- package/dist/{index55.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 +2 -0
- package/dist/{index56.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 +2 -0
- package/dist/{index57.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 +2 -0
- package/dist/{index58.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 +2 -0
- package/dist/{index59.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 +2 -0
- package/dist/{index60.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 +2 -0
- package/dist/{index61.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 +2 -0
- package/dist/{index62.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 +2 -0
- package/dist/{index63.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 +2 -0
- package/dist/{index64.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 +2 -0
- package/dist/{index65.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 +2 -0
- package/dist/{index66.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 +2 -0
- package/dist/{index67.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 +2 -0
- package/dist/{index68.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 +2 -0
- package/dist/{index69.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 +2 -0
- package/dist/{index70.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 +2 -0
- package/dist/{index71.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 +2 -0
- package/dist/{index72.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 +2 -0
- package/dist/{index73.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 +2 -0
- package/dist/{index74.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 +2 -0
- package/dist/{index75.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 +2 -0
- package/dist/{index76.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 +2 -0
- package/dist/types/unit-types.d.cts +37 -0
- package/dist/types/unit-types.d.ts +37 -0
- package/dist/types/utils.d.cts +2 -0
- package/dist/types/utils.d.ts +2 -0
- package/dist/unit-types-BXdufGWm.d.cts +56 -0
- 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 +46 -0
- package/dist/utils/apiQueue.js +3 -0
- 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 +6 -0
- package/dist/utils/base64.js +11 -0
- 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 +78 -0
- package/dist/utils/certificate.js +5 -0
- package/dist/{index11.cjs → utils/document.cjs} +2 -2
- package/dist/utils/document.d.cts +62 -0
- package/dist/utils/document.d.ts +62 -0
- package/dist/utils/document.js +4 -0
- package/dist/utils/formatIdValue.cjs +3 -0
- package/dist/utils/formatIdValue.d.cts +5 -0
- package/dist/utils/formatIdValue.d.ts +5 -0
- package/dist/utils/formatIdValue.js +3 -0
- package/dist/utils/getBaseUrl.cjs +3 -0
- package/dist/utils/getBaseUrl.d.cts +5 -0
- package/dist/utils/getBaseUrl.d.ts +5 -0
- package/dist/utils/getBaseUrl.js +3 -0
- 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/{index15.cjs → utils/signature-diagnostics.cjs} +3 -3
- 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 +97 -0
- package/dist/utils/signature-diagnostics.js +328 -0
- package/dist/utils/signature-diagnostics.js.map +1 -0
- package/dist/{index16.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 +109 -0
- package/dist/utils/validation.js +187 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/utils-BYVq373g.d.ts +5 -0
- package/dist/utils-Cdqbbzca.d.cts +5 -0
- package/package.json +17 -7
- package/dist/index10.cjs +0 -7
- package/dist/index12.cjs +0 -3
- package/dist/index13.cjs +0 -3
- package/dist/index14.cjs +0 -3
- 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/index19.cjs.map +0 -1
- package/dist/index21.cjs.map +0 -1
- package/dist/index24.cjs.map +0 -1
- package/dist/index25.cjs.map +0 -1
- package/dist/index27.cjs.map +0 -1
- package/dist/index28.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/index62.cjs.map +0 -1
- package/dist/index63.cjs.map +0 -1
- package/dist/index64.cjs.map +0 -1
- package/dist/index65.cjs.map +0 -1
- package/dist/index66.cjs.map +0 -1
- package/dist/index67.cjs.map +0 -1
- package/dist/index68.cjs.map +0 -1
- package/dist/index69.cjs.map +0 -1
- package/dist/index7.cjs +0 -6
- package/dist/index70.cjs.map +0 -1
- package/dist/index71.cjs.map +0 -1
- package/dist/index72.cjs.map +0 -1
- package/dist/index73.cjs.map +0 -1
- package/dist/index74.cjs.map +0 -1
- package/dist/index75.cjs.map +0 -1
- package/dist/index76.cjs.map +0 -1
- package/dist/index9.cjs.map +0 -1
- /package/dist/{index20.cjs → types/documents.d.cjs} +0 -0
- /package/dist/{index22.cjs → types/index.d.cjs} +0 -0
- /package/dist/{index23.cjs → types/msic-codes.d.cjs} +0 -0
- /package/dist/{index26.cjs → types/signatures.d.cjs} +0 -0
- /package/dist/{index29.cjs → types/taxpayer.d.cjs} +0 -0
- /package/dist/{index30.cjs → types/unit-types.d.cjs} +0 -0
- /package/dist/{index31.cjs → types/utils.d.cjs} +0 -0
|
@@ -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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"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import crypto from "crypto";
|
|
2
|
+
import * as forge from "node-forge";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/certificate.ts
|
|
6
|
+
/**
|
|
7
|
+
* Validates that certificate and private key form a valid pair
|
|
8
|
+
*
|
|
9
|
+
* @param certificatePem - Certificate in PEM format
|
|
10
|
+
* @param privateKeyPem - Private key in PEM format
|
|
11
|
+
* @returns Boolean indicating if key pair is valid
|
|
12
|
+
*/
|
|
13
|
+
const validateKeyPair = (certificatePem, privateKeyPem) => {
|
|
14
|
+
try {
|
|
15
|
+
const cert = new crypto.X509Certificate(certificatePem);
|
|
16
|
+
const publicKey = cert.publicKey;
|
|
17
|
+
const testData = "validation-test-data";
|
|
18
|
+
const signer = crypto.createSign("RSA-SHA256");
|
|
19
|
+
signer.update(testData);
|
|
20
|
+
const signature = signer.sign(privateKeyPem);
|
|
21
|
+
const verifier = crypto.createVerify("RSA-SHA256");
|
|
22
|
+
verifier.update(testData);
|
|
23
|
+
return verifier.verify(publicKey, signature);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.error("Key pair validation failed:", error);
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const getPemFromP12 = (p12Input, passphrase) => {
|
|
30
|
+
try {
|
|
31
|
+
const p12Buffer = Buffer.isBuffer(p12Input) ? p12Input : fs.readFileSync(p12Input);
|
|
32
|
+
const p12Der = forge.util.createBuffer(p12Buffer.toString("binary"));
|
|
33
|
+
const p12Asn1 = forge.asn1.fromDer(p12Der.getBytes());
|
|
34
|
+
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, passphrase);
|
|
35
|
+
const certBags = p12.getBags({ bagType: forge.pki.oids.certBag })[forge.pki.oids.certBag];
|
|
36
|
+
if (!certBags || certBags.length === 0) throw new Error("No certificate found in PKCS#12 bundle");
|
|
37
|
+
const certificatePem = forge.pki.certificateToPem(certBags[0].cert);
|
|
38
|
+
const keyBags = p12.getBags({ bagType: forge.pki.oids.pkcs8ShroudedKeyBag })[forge.pki.oids.pkcs8ShroudedKeyBag];
|
|
39
|
+
if (!keyBags || keyBags.length === 0) throw new Error("No private key found in PKCS#12 bundle");
|
|
40
|
+
const privateKeyPem = forge.pki.privateKeyToPem(keyBags[0].key);
|
|
41
|
+
return {
|
|
42
|
+
certificatePem,
|
|
43
|
+
privateKeyPem
|
|
44
|
+
};
|
|
45
|
+
} catch (error) {
|
|
46
|
+
throw new Error(`Failed to extract PEM from PKCS#12 file: ${error}`);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
export { getPemFromP12, validateKeyPair };
|
|
52
|
+
//# sourceMappingURL=certificate-Cg6spxUs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"certificate-Cg6spxUs.js","names":["certificatePem: string","privateKeyPem: string","p12Input: Buffer | string","passphrase: string","p12Buffer: Buffer"],"sources":["../src/utils/certificate.ts"],"sourcesContent":["import crypto from 'crypto'\nimport * as forge from 'node-forge'\nimport fs from 'fs'\n\n// Single source of truth for issuer name / serial number extraction. The signer\n// (utils/document) owns the canonical normalization (RDN order + XML escaping)\n// that MyInvois validates against (DS326), so re-export it here rather than\n// maintaining a second, divergent implementation.\nexport { extractCertificateInfo } from './document'\n\n/**\n * Validates that certificate and private key form a valid pair\n *\n * @param certificatePem - Certificate in PEM format\n * @param privateKeyPem - Private key in PEM format\n * @returns Boolean indicating if key pair is valid\n */\nexport const validateKeyPair = (\n certificatePem: string,\n privateKeyPem: string,\n): boolean => {\n try {\n const cert = new crypto.X509Certificate(certificatePem)\n const publicKey = cert.publicKey\n\n // Test signature/verification cycle\n const testData = 'validation-test-data'\n const signer = crypto.createSign('RSA-SHA256')\n signer.update(testData)\n const signature = signer.sign(privateKeyPem)\n\n const verifier = crypto.createVerify('RSA-SHA256')\n verifier.update(testData)\n return verifier.verify(publicKey, signature)\n } catch (error) {\n console.error('Key pair validation failed:', error)\n return false\n }\n}\n\nexport const getPemFromP12 = (\n p12Input: Buffer | string,\n passphrase: string,\n): {\n certificatePem: string\n privateKeyPem: string\n} => {\n try {\n // Load binary DER contents of the p12 file\n const p12Buffer: Buffer = Buffer.isBuffer(p12Input)\n ? p12Input\n : fs.readFileSync(p12Input)\n\n // Convert DER -> ASN.1\n const p12Der = forge.util.createBuffer(p12Buffer.toString('binary'))\n const p12Asn1 = forge.asn1.fromDer(p12Der.getBytes())\n\n // Parse the PKCS#12 using the provided passphrase\n const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, passphrase)\n\n // Extract the first certificate (assumes it is the signing cert)\n const certBags = p12.getBags({ bagType: forge.pki.oids.certBag })[\n forge.pki.oids.certBag\n ]\n if (!certBags || certBags.length === 0)\n throw new Error('No certificate found in PKCS#12 bundle')\n const certificatePem = forge.pki.certificateToPem(certBags[0].cert)\n\n // Extract the first private key\n const keyBags = p12.getBags({\n bagType: forge.pki.oids.pkcs8ShroudedKeyBag,\n })[forge.pki.oids.pkcs8ShroudedKeyBag]\n if (!keyBags || keyBags.length === 0)\n throw new Error('No private key found in PKCS#12 bundle')\n const privateKeyPem = forge.pki.privateKeyToPem(keyBags[0].key)\n\n return { certificatePem, privateKeyPem }\n } catch (error) {\n throw new Error(`Failed to extract PEM from PKCS#12 file: ${error}`)\n }\n}\n"],"mappings":";;;;;;;;;;;;AAiBA,MAAa,kBAAkB,CAC7BA,gBACAC,kBACY;AACZ,KAAI;EACF,MAAM,OAAO,IAAI,OAAO,gBAAgB;EACxC,MAAM,YAAY,KAAK;EAGvB,MAAM,WAAW;EACjB,MAAM,SAAS,OAAO,WAAW,aAAa;AAC9C,SAAO,OAAO,SAAS;EACvB,MAAM,YAAY,OAAO,KAAK,cAAc;EAE5C,MAAM,WAAW,OAAO,aAAa,aAAa;AAClD,WAAS,OAAO,SAAS;AACzB,SAAO,SAAS,OAAO,WAAW,UAAU;CAC7C,SAAQ,OAAO;AACd,UAAQ,MAAM,+BAA+B,MAAM;AACnD,SAAO;CACR;AACF;AAED,MAAa,gBAAgB,CAC3BC,UACAC,eAIG;AACH,KAAI;EAEF,MAAMC,YAAoB,OAAO,SAAS,SAAS,GAC/C,WACA,GAAG,aAAa,SAAS;EAG7B,MAAM,SAAS,MAAM,KAAK,aAAa,UAAU,SAAS,SAAS,CAAC;EACpE,MAAM,UAAU,MAAM,KAAK,QAAQ,OAAO,UAAU,CAAC;EAGrD,MAAM,MAAM,MAAM,OAAO,eAAe,SAAS,WAAW;EAG5D,MAAM,WAAW,IAAI,QAAQ,EAAE,SAAS,MAAM,IAAI,KAAK,QAAS,EAAC,CAC/D,MAAM,IAAI,KAAK;AAEjB,OAAK,YAAY,SAAS,WAAW,EACnC,OAAM,IAAI,MAAM;EAClB,MAAM,iBAAiB,MAAM,IAAI,iBAAiB,SAAS,GAAG,KAAK;EAGnE,MAAM,UAAU,IAAI,QAAQ,EAC1B,SAAS,MAAM,IAAI,KAAK,oBACzB,EAAC,CAAC,MAAM,IAAI,KAAK;AAClB,OAAK,WAAW,QAAQ,WAAW,EACjC,OAAM,IAAI,MAAM;EAClB,MAAM,gBAAgB,MAAM,IAAI,gBAAgB,QAAQ,GAAG,IAAI;AAE/D,SAAO;GAAE;GAAgB;EAAe;CACzC,SAAQ,OAAO;AACd,QAAM,IAAI,OAAO,2CAA2C,MAAM;CACnE;AACF"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
//#region src/types/classification-codes.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents the allowed classification codes for e-Invoice items.
|
|
4
|
+
* Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/classification-codes/
|
|
5
|
+
*/
|
|
6
|
+
type ClassificationCode = '001' // Breastfeeding equipment
|
|
7
|
+
| '002' // Child care centres and kindergartens fees
|
|
8
|
+
| '003' // Computer, smartphone or tablet
|
|
9
|
+
| '004' // Consolidated e-Invoice
|
|
10
|
+
| '005' // Construction materials (as specified under Fourth Schedule of the Lembaga Pembangunan Industri Pembinaan Malaysia Act 1994)
|
|
11
|
+
| '006' // Disbursement
|
|
12
|
+
| '007' // Donation
|
|
13
|
+
| '008' // e-Commerce - e-Invoice to buyer / purchaser
|
|
14
|
+
| '009' // e-Commerce - Self-billed e-Invoice to seller, logistics, etc.
|
|
15
|
+
| '010' // Education fees
|
|
16
|
+
| '011' // Goods on consignment (Consignor)
|
|
17
|
+
| '012' // Goods on consignment (Consignee)
|
|
18
|
+
| '013' // Gym membership
|
|
19
|
+
| '014' // Insurance - Education and medical benefits
|
|
20
|
+
| '015' // Insurance - Takaful or life insurance
|
|
21
|
+
| '016' // Interest and financing expenses
|
|
22
|
+
| '017' // Internet subscription
|
|
23
|
+
| '018' // Land and building
|
|
24
|
+
| '019' // Medical examination for learning disabilities and early intervention or rehabilitation treatments of learning disabilities
|
|
25
|
+
| '020' // Medical examination or vaccination expenses
|
|
26
|
+
| '021' // Medical expenses for serious diseases
|
|
27
|
+
| '022' // Others
|
|
28
|
+
| '023' // Petroleum operations (as defined in Petroleum (Income Tax) Act 1967)
|
|
29
|
+
| '024' // Private retirement scheme or deferred annuity scheme
|
|
30
|
+
| '025' // Motor vehicle
|
|
31
|
+
| '026' // Subscription of books / journals / magazines / newspapers / other similar publications
|
|
32
|
+
| '027' // Reimbursement
|
|
33
|
+
| '028' // Rental of motor vehicle
|
|
34
|
+
| '029' // EV charging facilities (Installation, rental, sale / purchase or subscription fees)
|
|
35
|
+
| '030' // Repair and maintenance
|
|
36
|
+
| '031' // Research and development
|
|
37
|
+
| '032' // Foreign income
|
|
38
|
+
| '033' // Self-billed - Betting and gaming
|
|
39
|
+
| '034' // Self-billed - Importation of goods
|
|
40
|
+
| '035' // Self-billed - Importation of services
|
|
41
|
+
| '036' // Self-billed - Others
|
|
42
|
+
| '037' // Self-billed - Monetary payment to agents, dealers or distributors
|
|
43
|
+
| '038' // Sports equipment, rental / entry fees for sports facilities, registration in sports competition or sports training fees imposed by associations / sports clubs / companies registered with the Sports Commissioner or Companies Commission of Malaysia and carrying out sports activities as listed under the Sports Development Act 1997
|
|
44
|
+
| '039' // Supporting equipment for disabled person
|
|
45
|
+
| '040' // Voluntary contribution to approved provident fund
|
|
46
|
+
| '041' // Dental examination or treatment
|
|
47
|
+
| '042' // Fertility treatment
|
|
48
|
+
| '043' // Treatment and home care nursing, daycare centres and residential care centers
|
|
49
|
+
| '044' // Vouchers, gift cards, loyalty points, etc
|
|
50
|
+
| '045'; // Self-billed - Non-monetary payment to agents, dealers or distributors
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Enum representing the allowed classification codes with descriptive names.
|
|
54
|
+
* Provides a more readable way to reference classification codes.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const code = ClassificationCodeEnum.ComputerSmartphoneOrTablet;
|
|
58
|
+
* console.log(code); // Output: "003"
|
|
59
|
+
*/
|
|
60
|
+
declare enum ClassificationCodeEnum {
|
|
61
|
+
BreastfeedingEquipment = '001',
|
|
62
|
+
ChildCareCentresAndKindergartensFees = '002',
|
|
63
|
+
ComputerSmartphoneOrTablet = '003',
|
|
64
|
+
ConsolidatedEInvoice = '004',
|
|
65
|
+
ConstructionMaterials = '005',
|
|
66
|
+
Disbursement = '006',
|
|
67
|
+
Donation = '007',
|
|
68
|
+
ECommerceEInvoiceToBuyer = '008',
|
|
69
|
+
ECommerceSelfBilledToSellerLogistics = '009',
|
|
70
|
+
EducationFees = '010',
|
|
71
|
+
GoodsOnConsignmentConsignor = '011',
|
|
72
|
+
GoodsOnConsignmentConsignee = '012',
|
|
73
|
+
GymMembership = '013',
|
|
74
|
+
InsuranceEducationMedicalBenefits = '014',
|
|
75
|
+
InsuranceTakafulLife = '015',
|
|
76
|
+
InterestFinancingExpenses = '016',
|
|
77
|
+
InternetSubscription = '017',
|
|
78
|
+
LandAndBuilding = '018',
|
|
79
|
+
MedicalExamLearningDisabilities = '019',
|
|
80
|
+
MedicalExamVaccination = '020',
|
|
81
|
+
MedicalExpensesSeriousDiseases = '021',
|
|
82
|
+
Others = '022',
|
|
83
|
+
PetroleumOperations = '023',
|
|
84
|
+
PrivateRetirementSchemeDeferredAnnuity = '024',
|
|
85
|
+
MotorVehicle = '025',
|
|
86
|
+
SubscriptionBooksJournalsEtc = '026',
|
|
87
|
+
Reimbursement = '027',
|
|
88
|
+
RentalOfMotorVehicle = '028',
|
|
89
|
+
EVChargingFacilities = '029',
|
|
90
|
+
RepairAndMaintenance = '030',
|
|
91
|
+
ResearchAndDevelopment = '031',
|
|
92
|
+
ForeignIncome = '032',
|
|
93
|
+
SelfBilledBettingGaming = '033',
|
|
94
|
+
SelfBilledImportationGoods = '034',
|
|
95
|
+
SelfBilledImportationServices = '035',
|
|
96
|
+
SelfBilledOthers = '036',
|
|
97
|
+
SelfBilledMonetaryPaymentToAgents = '037',
|
|
98
|
+
SportsEquipmentRentalFeesEtc = '038',
|
|
99
|
+
SupportingEquipmentDisabledPerson = '039',
|
|
100
|
+
VoluntaryContributionProvidentFund = '040',
|
|
101
|
+
DentalExamTreatment = '041',
|
|
102
|
+
FertilityTreatment = '042',
|
|
103
|
+
TreatmentHomeCareNursingEtc = '043',
|
|
104
|
+
VouchersGiftCardsLoyaltyPoints = '044',
|
|
105
|
+
SelfBilledNonMonetaryPaymentToAgents = '045',
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Interface representing a classification code entry.
|
|
110
|
+
* Contains the code and its corresponding description.
|
|
111
|
+
*/
|
|
112
|
+
interface Classification {
|
|
113
|
+
code: ClassificationCode;
|
|
114
|
+
description: string;
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { Classification, ClassificationCode, ClassificationCodeEnum };
|
|
118
|
+
//# sourceMappingURL=classification-codes-B15PbWxz.d.cts.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
//#region src/types/classification-codes.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents the allowed classification codes for e-Invoice items.
|
|
4
|
+
* Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/classification-codes/
|
|
5
|
+
*/
|
|
6
|
+
type ClassificationCode = '001' // Breastfeeding equipment
|
|
7
|
+
| '002' // Child care centres and kindergartens fees
|
|
8
|
+
| '003' // Computer, smartphone or tablet
|
|
9
|
+
| '004' // Consolidated e-Invoice
|
|
10
|
+
| '005' // Construction materials (as specified under Fourth Schedule of the Lembaga Pembangunan Industri Pembinaan Malaysia Act 1994)
|
|
11
|
+
| '006' // Disbursement
|
|
12
|
+
| '007' // Donation
|
|
13
|
+
| '008' // e-Commerce - e-Invoice to buyer / purchaser
|
|
14
|
+
| '009' // e-Commerce - Self-billed e-Invoice to seller, logistics, etc.
|
|
15
|
+
| '010' // Education fees
|
|
16
|
+
| '011' // Goods on consignment (Consignor)
|
|
17
|
+
| '012' // Goods on consignment (Consignee)
|
|
18
|
+
| '013' // Gym membership
|
|
19
|
+
| '014' // Insurance - Education and medical benefits
|
|
20
|
+
| '015' // Insurance - Takaful or life insurance
|
|
21
|
+
| '016' // Interest and financing expenses
|
|
22
|
+
| '017' // Internet subscription
|
|
23
|
+
| '018' // Land and building
|
|
24
|
+
| '019' // Medical examination for learning disabilities and early intervention or rehabilitation treatments of learning disabilities
|
|
25
|
+
| '020' // Medical examination or vaccination expenses
|
|
26
|
+
| '021' // Medical expenses for serious diseases
|
|
27
|
+
| '022' // Others
|
|
28
|
+
| '023' // Petroleum operations (as defined in Petroleum (Income Tax) Act 1967)
|
|
29
|
+
| '024' // Private retirement scheme or deferred annuity scheme
|
|
30
|
+
| '025' // Motor vehicle
|
|
31
|
+
| '026' // Subscription of books / journals / magazines / newspapers / other similar publications
|
|
32
|
+
| '027' // Reimbursement
|
|
33
|
+
| '028' // Rental of motor vehicle
|
|
34
|
+
| '029' // EV charging facilities (Installation, rental, sale / purchase or subscription fees)
|
|
35
|
+
| '030' // Repair and maintenance
|
|
36
|
+
| '031' // Research and development
|
|
37
|
+
| '032' // Foreign income
|
|
38
|
+
| '033' // Self-billed - Betting and gaming
|
|
39
|
+
| '034' // Self-billed - Importation of goods
|
|
40
|
+
| '035' // Self-billed - Importation of services
|
|
41
|
+
| '036' // Self-billed - Others
|
|
42
|
+
| '037' // Self-billed - Monetary payment to agents, dealers or distributors
|
|
43
|
+
| '038' // Sports equipment, rental / entry fees for sports facilities, registration in sports competition or sports training fees imposed by associations / sports clubs / companies registered with the Sports Commissioner or Companies Commission of Malaysia and carrying out sports activities as listed under the Sports Development Act 1997
|
|
44
|
+
| '039' // Supporting equipment for disabled person
|
|
45
|
+
| '040' // Voluntary contribution to approved provident fund
|
|
46
|
+
| '041' // Dental examination or treatment
|
|
47
|
+
| '042' // Fertility treatment
|
|
48
|
+
| '043' // Treatment and home care nursing, daycare centres and residential care centers
|
|
49
|
+
| '044' // Vouchers, gift cards, loyalty points, etc
|
|
50
|
+
| '045'; // Self-billed - Non-monetary payment to agents, dealers or distributors
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Enum representing the allowed classification codes with descriptive names.
|
|
54
|
+
* Provides a more readable way to reference classification codes.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const code = ClassificationCodeEnum.ComputerSmartphoneOrTablet;
|
|
58
|
+
* console.log(code); // Output: "003"
|
|
59
|
+
*/
|
|
60
|
+
declare enum ClassificationCodeEnum {
|
|
61
|
+
BreastfeedingEquipment = '001',
|
|
62
|
+
ChildCareCentresAndKindergartensFees = '002',
|
|
63
|
+
ComputerSmartphoneOrTablet = '003',
|
|
64
|
+
ConsolidatedEInvoice = '004',
|
|
65
|
+
ConstructionMaterials = '005',
|
|
66
|
+
Disbursement = '006',
|
|
67
|
+
Donation = '007',
|
|
68
|
+
ECommerceEInvoiceToBuyer = '008',
|
|
69
|
+
ECommerceSelfBilledToSellerLogistics = '009',
|
|
70
|
+
EducationFees = '010',
|
|
71
|
+
GoodsOnConsignmentConsignor = '011',
|
|
72
|
+
GoodsOnConsignmentConsignee = '012',
|
|
73
|
+
GymMembership = '013',
|
|
74
|
+
InsuranceEducationMedicalBenefits = '014',
|
|
75
|
+
InsuranceTakafulLife = '015',
|
|
76
|
+
InterestFinancingExpenses = '016',
|
|
77
|
+
InternetSubscription = '017',
|
|
78
|
+
LandAndBuilding = '018',
|
|
79
|
+
MedicalExamLearningDisabilities = '019',
|
|
80
|
+
MedicalExamVaccination = '020',
|
|
81
|
+
MedicalExpensesSeriousDiseases = '021',
|
|
82
|
+
Others = '022',
|
|
83
|
+
PetroleumOperations = '023',
|
|
84
|
+
PrivateRetirementSchemeDeferredAnnuity = '024',
|
|
85
|
+
MotorVehicle = '025',
|
|
86
|
+
SubscriptionBooksJournalsEtc = '026',
|
|
87
|
+
Reimbursement = '027',
|
|
88
|
+
RentalOfMotorVehicle = '028',
|
|
89
|
+
EVChargingFacilities = '029',
|
|
90
|
+
RepairAndMaintenance = '030',
|
|
91
|
+
ResearchAndDevelopment = '031',
|
|
92
|
+
ForeignIncome = '032',
|
|
93
|
+
SelfBilledBettingGaming = '033',
|
|
94
|
+
SelfBilledImportationGoods = '034',
|
|
95
|
+
SelfBilledImportationServices = '035',
|
|
96
|
+
SelfBilledOthers = '036',
|
|
97
|
+
SelfBilledMonetaryPaymentToAgents = '037',
|
|
98
|
+
SportsEquipmentRentalFeesEtc = '038',
|
|
99
|
+
SupportingEquipmentDisabledPerson = '039',
|
|
100
|
+
VoluntaryContributionProvidentFund = '040',
|
|
101
|
+
DentalExamTreatment = '041',
|
|
102
|
+
FertilityTreatment = '042',
|
|
103
|
+
TreatmentHomeCareNursingEtc = '043',
|
|
104
|
+
VouchersGiftCardsLoyaltyPoints = '044',
|
|
105
|
+
SelfBilledNonMonetaryPaymentToAgents = '045',
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Interface representing a classification code entry.
|
|
110
|
+
* Contains the code and its corresponding description.
|
|
111
|
+
*/
|
|
112
|
+
interface Classification {
|
|
113
|
+
code: ClassificationCode;
|
|
114
|
+
description: string;
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { Classification, ClassificationCode, ClassificationCodeEnum };
|
|
118
|
+
//# sourceMappingURL=classification-codes-BQMnAQFr.d.ts.map
|