@ripwords/myinvois-client 0.0.10 → 0.1.0
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/bun.lock +89 -132
- package/dist/0X-C4IRh_fJ.d.ts +211 -0
- package/dist/0X-C4IRh_fJ.d.ts.map +1 -0
- package/dist/0X-Yw7mZEro.d.cts +211 -0
- package/dist/0X-Yw7mZEro.d.cts.map +1 -0
- package/dist/1X-Brnls9Jh.d.ts +112 -0
- package/dist/1X-Brnls9Jh.d.ts.map +1 -0
- package/dist/1X-BwpSoT3o.d.cts +20 -0
- package/dist/1X-BwpSoT3o.d.cts.map +1 -0
- package/dist/1X-C-_KHV-Q.d.ts +20 -0
- package/dist/1X-C-_KHV-Q.d.ts.map +1 -0
- package/dist/1X-D_aUVsuM.d.cts +112 -0
- package/dist/1X-D_aUVsuM.d.cts.map +1 -0
- package/dist/2X-Bb6elyzV.d.cts +40 -0
- package/dist/2X-Bb6elyzV.d.cts.map +1 -0
- package/dist/2X-DkS1BoE5.d.ts +40 -0
- package/dist/2X-DkS1BoE5.d.ts.map +1 -0
- package/dist/2X-UdQcQW24.d.ts +140 -0
- package/dist/2X-UdQcQW24.d.ts.map +1 -0
- package/dist/2X-hClUyw26.d.cts +140 -0
- package/dist/2X-hClUyw26.d.cts.map +1 -0
- package/dist/3X-C7VFD-n-.d.cts +21 -0
- package/dist/3X-C7VFD-n-.d.cts.map +1 -0
- package/dist/3X-CLMESDvz.d.cts +62 -0
- package/dist/3X-CLMESDvz.d.cts.map +1 -0
- package/dist/3X-DFI-4RQQ.d.ts +21 -0
- package/dist/3X-DFI-4RQQ.d.ts.map +1 -0
- package/dist/3X-DVDyspgb.d.ts +62 -0
- package/dist/3X-DVDyspgb.d.ts.map +1 -0
- package/dist/4X-CIJ2JJ2w.d.ts +31 -0
- package/dist/4X-CIJ2JJ2w.d.ts.map +1 -0
- package/dist/4X-CUR8jlaZ.d.ts +265 -0
- package/dist/4X-CUR8jlaZ.d.ts.map +1 -0
- package/dist/4X-CvScPJTf.d.cts +265 -0
- package/dist/4X-CvScPJTf.d.cts.map +1 -0
- package/dist/4X-DIfvpU6V.d.cts +31 -0
- package/dist/4X-DIfvpU6V.d.cts.map +1 -0
- package/dist/5X-BOUxhadJ.d.cts +22 -0
- package/dist/5X-BOUxhadJ.d.cts.map +1 -0
- package/dist/5X-C6db432h.d.ts +77 -0
- package/dist/5X-C6db432h.d.ts.map +1 -0
- package/dist/5X-COsZHUaQ.d.ts +22 -0
- package/dist/5X-COsZHUaQ.d.ts.map +1 -0
- package/dist/5X-CkLu7Vyd.d.cts +77 -0
- package/dist/5X-CkLu7Vyd.d.cts.map +1 -0
- package/dist/6X-C_fFIcJC.d.ts +105 -0
- package/dist/6X-C_fFIcJC.d.ts.map +1 -0
- package/dist/6X-ClZDKOTC.d.ts +16 -0
- package/dist/6X-ClZDKOTC.d.ts.map +1 -0
- package/dist/6X-DE7RJeV6.d.cts +16 -0
- package/dist/6X-DE7RJeV6.d.cts.map +1 -0
- package/dist/6X-Mf32k1d0.d.cts +105 -0
- package/dist/6X-Mf32k1d0.d.cts.map +1 -0
- package/dist/7X-BZyesooz.d.ts +16 -0
- package/dist/7X-BZyesooz.d.ts.map +1 -0
- package/dist/7X-Chtd6B66.d.cts +16 -0
- package/dist/7X-Chtd6B66.d.cts.map +1 -0
- package/dist/7X-DoCUcp-J.d.cts +71 -0
- package/dist/7X-DoCUcp-J.d.cts.map +1 -0
- package/dist/7X-kot_VccM.d.ts +71 -0
- package/dist/7X-kot_VccM.d.ts.map +1 -0
- package/dist/8X-Df4DOBOe.d.ts +110 -0
- package/dist/8X-Df4DOBOe.d.ts.map +1 -0
- package/dist/8X-DkuKAkHz.d.ts +19 -0
- package/dist/8X-DkuKAkHz.d.ts.map +1 -0
- package/dist/8X-DqZyMvyV.d.cts +19 -0
- package/dist/8X-DqZyMvyV.d.cts.map +1 -0
- package/dist/8X-Dr9RunRw.d.cts +110 -0
- package/dist/8X-Dr9RunRw.d.cts.map +1 -0
- package/dist/9X-BDgifncF.d.ts +15 -0
- package/dist/9X-BDgifncF.d.ts.map +1 -0
- package/dist/9X-BaoZtjWF.d.cts +98 -0
- package/dist/9X-BaoZtjWF.d.cts.map +1 -0
- package/dist/9X-BcAb6Uso.d.cts +15 -0
- package/dist/9X-BcAb6Uso.d.cts.map +1 -0
- package/dist/9X-BhBWlgxG.d.ts +98 -0
- package/dist/9X-BhBWlgxG.d.ts.map +1 -0
- package/dist/AX-BY72FohC.d.cts +111 -0
- package/dist/AX-BY72FohC.d.cts.map +1 -0
- package/dist/AX-D6XHWdrY.d.ts +111 -0
- package/dist/AX-D6XHWdrY.d.ts.map +1 -0
- package/dist/BX-CA0OmrUZ.d.cts +115 -0
- package/dist/BX-CA0OmrUZ.d.cts.map +1 -0
- package/dist/BX-D_0C8Qbd.d.ts +115 -0
- package/dist/BX-D_0C8Qbd.d.ts.map +1 -0
- package/dist/CX-HH4cSZRX.d.ts +128 -0
- package/dist/CX-HH4cSZRX.d.ts.map +1 -0
- package/dist/CX-glpQSL8x.d.cts +128 -0
- package/dist/CX-glpQSL8x.d.cts.map +1 -0
- package/dist/DX-DimL1MDM.d.cts +115 -0
- package/dist/DX-DimL1MDM.d.cts.map +1 -0
- package/dist/DX-Dx22ax_I.d.ts +115 -0
- package/dist/DX-Dx22ax_I.d.ts.map +1 -0
- package/dist/EX-BRWh1wFc.d.ts +107 -0
- package/dist/EX-BRWh1wFc.d.ts.map +1 -0
- package/dist/EX-Cx87Ruxl.d.cts +107 -0
- package/dist/EX-Cx87Ruxl.d.cts.map +1 -0
- package/dist/FX-D81UlxNN.d.cts +127 -0
- package/dist/FX-D81UlxNN.d.cts.map +1 -0
- package/dist/FX-RmjwAr40.d.ts +127 -0
- package/dist/FX-RmjwAr40.d.ts.map +1 -0
- package/dist/GX-9i7piP9G.d.cts +136 -0
- package/dist/GX-9i7piP9G.d.cts.map +1 -0
- package/dist/GX-CJyo7oDp.d.ts +136 -0
- package/dist/GX-CJyo7oDp.d.ts.map +1 -0
- package/dist/HX-20GVJAvl.d.cts +126 -0
- package/dist/HX-20GVJAvl.d.cts.map +1 -0
- package/dist/HX-XALBTdLA.d.ts +126 -0
- package/dist/HX-XALBTdLA.d.ts.map +1 -0
- package/dist/IX-6SZ55QKb.d.ts +23 -0
- package/dist/IX-6SZ55QKb.d.ts.map +1 -0
- package/dist/IX-D54NGPsc.d.cts +23 -0
- package/dist/IX-D54NGPsc.d.cts.map +1 -0
- package/dist/JX-C1RYcwQX.d.cts +104 -0
- package/dist/JX-C1RYcwQX.d.cts.map +1 -0
- package/dist/JX-hQ1XRmLp.d.ts +104 -0
- package/dist/JX-hQ1XRmLp.d.ts.map +1 -0
- package/dist/KX-BNwunEfn.d.ts +151 -0
- package/dist/KX-BNwunEfn.d.ts.map +1 -0
- package/dist/KX-gQHCIgtQ.d.cts +151 -0
- package/dist/KX-gQHCIgtQ.d.cts.map +1 -0
- package/dist/LX-CHYX3X3J.d.ts +123 -0
- package/dist/LX-CHYX3X3J.d.ts.map +1 -0
- package/dist/LX-CPurJGIh.d.cts +123 -0
- package/dist/LX-CPurJGIh.d.cts.map +1 -0
- package/dist/MX-BPGLWSUz.d.ts +153 -0
- package/dist/MX-BPGLWSUz.d.ts.map +1 -0
- package/dist/MX-BnyW5eHf.d.cts +153 -0
- package/dist/MX-BnyW5eHf.d.cts.map +1 -0
- package/dist/MyInvoisClient-BrNyMjS-.d.cts +178 -0
- package/dist/MyInvoisClient-BrNyMjS-.d.cts.map +1 -0
- package/dist/MyInvoisClient-CXu4pdl-.d.ts +178 -0
- package/dist/MyInvoisClient-CXu4pdl-.d.ts.map +1 -0
- package/dist/MyInvoisClient-Cnvb5iUC.js +299 -0
- package/dist/MyInvoisClient-Cnvb5iUC.js.map +1 -0
- package/dist/MyInvoisClient-DO1dJfQq.cjs +304 -0
- package/dist/MyInvoisClient-DO1dJfQq.cjs.map +1 -0
- package/dist/NX-B11fQuco.d.cts +122 -0
- package/dist/NX-B11fQuco.d.cts.map +1 -0
- package/dist/NX-RulN5Ml3.d.ts +122 -0
- package/dist/NX-RulN5Ml3.d.ts.map +1 -0
- package/dist/OX-DgKVSp7I.d.ts +26 -0
- package/dist/OX-DgKVSp7I.d.ts.map +1 -0
- package/dist/OX-T-ydRXQS.d.cts +26 -0
- package/dist/OX-T-ydRXQS.d.cts.map +1 -0
- package/dist/PX-DA4A2kEv.d.ts +121 -0
- package/dist/PX-DA4A2kEv.d.ts.map +1 -0
- package/dist/PX-p0n1SzvU.d.cts +121 -0
- package/dist/PX-p0n1SzvU.d.cts.map +1 -0
- package/dist/QX-CI1NccIB.d.cts +59 -0
- package/dist/QX-CI1NccIB.d.cts.map +1 -0
- package/dist/QX-DrFqsMEs.d.ts +59 -0
- package/dist/QX-DrFqsMEs.d.ts.map +1 -0
- package/dist/RX-Cm7vFcFN.d.ts +23 -0
- package/dist/RX-Cm7vFcFN.d.ts.map +1 -0
- package/dist/RX-DnNKol22.d.cts +23 -0
- package/dist/RX-DnNKol22.d.cts.map +1 -0
- package/dist/SX-BUjiWQYz.d.cts +40 -0
- package/dist/SX-BUjiWQYz.d.cts.map +1 -0
- package/dist/SX-CsPPTu-W.d.ts +40 -0
- package/dist/SX-CsPPTu-W.d.ts.map +1 -0
- package/dist/TX-DCY25MdR.d.ts +31 -0
- package/dist/TX-DCY25MdR.d.ts.map +1 -0
- package/dist/TX-DOEpsf05.d.cts +31 -0
- package/dist/TX-DOEpsf05.d.cts.map +1 -0
- package/dist/UX-DauyagHy.d.ts +18 -0
- package/dist/UX-DauyagHy.d.ts.map +1 -0
- package/dist/UX-DgUOnTFK.d.cts +18 -0
- package/dist/UX-DgUOnTFK.d.cts.map +1 -0
- package/dist/VX-DD4scgCe.d.ts +17 -0
- package/dist/VX-DD4scgCe.d.ts.map +1 -0
- package/dist/VX-kUX6LM-3.d.cts +17 -0
- package/dist/VX-kUX6LM-3.d.cts.map +1 -0
- package/dist/WX-CjkoppdY.d.ts +26 -0
- package/dist/WX-CjkoppdY.d.ts.map +1 -0
- package/dist/WX-DPfyPFFh.d.cts +26 -0
- package/dist/WX-DPfyPFFh.d.cts.map +1 -0
- package/dist/XX-C4C1gQZH.d.cts +828 -0
- package/dist/XX-C4C1gQZH.d.cts.map +1 -0
- package/dist/XX-sbsIUOnA.d.ts +828 -0
- package/dist/XX-sbsIUOnA.d.ts.map +1 -0
- package/dist/YX-BeT-LsiA.d.cts +20 -0
- package/dist/YX-BeT-LsiA.d.cts.map +1 -0
- package/dist/YX-DUdO8mRC.d.ts +20 -0
- package/dist/YX-DUdO8mRC.d.ts.map +1 -0
- package/dist/ZX-BuVTTq-D.d.cts +22 -0
- package/dist/ZX-BuVTTq-D.d.cts.map +1 -0
- package/dist/ZX-DwfcSA-D.d.ts +22 -0
- package/dist/ZX-DwfcSA-D.d.ts.map +1 -0
- package/dist/api/platform/platformLogin.d.ts +67 -0
- package/dist/api/platform/platformLogin.d.ts.map +1 -0
- package/dist/api/platform/platformLogin.js +3 -0
- package/dist/canonicalize-C_fNNpYr.cjs +80 -0
- package/dist/canonicalize-C_fNNpYr.cjs.map +1 -0
- package/dist/canonicalize-DNUrCGad.js +68 -0
- package/dist/canonicalize-DNUrCGad.js.map +1 -0
- package/dist/chunk-CUT6urMc.cjs +30 -0
- package/dist/classification-codes-B15PbWxz.d.cts +118 -0
- package/dist/classification-codes-B15PbWxz.d.cts.map +1 -0
- package/dist/classification-codes-C2X4xW5-.d.ts +118 -0
- package/dist/classification-codes-C2X4xW5-.d.ts.map +1 -0
- package/dist/country-code-DPeNFMMi.d.cts +543 -0
- package/dist/country-code-DPeNFMMi.d.cts.map +1 -0
- package/dist/country-code-DsI8Mbzx.d.ts +543 -0
- package/dist/country-code-DsI8Mbzx.d.ts.map +1 -0
- package/dist/currencies-DKuDflOO.d.ts +208 -0
- package/dist/currencies-DKuDflOO.d.ts.map +1 -0
- package/dist/currencies-S5g1gzBU.d.cts +208 -0
- package/dist/currencies-S5g1gzBU.d.cts.map +1 -0
- package/dist/e-invoice-BuwtFnlI.d.cts +44 -0
- package/dist/e-invoice-BuwtFnlI.d.cts.map +1 -0
- package/dist/e-invoice-C2TxhyrK.d.ts +44 -0
- package/dist/e-invoice-C2TxhyrK.d.ts.map +1 -0
- package/dist/getBaseUrl-CO7Jp27d.cjs +14 -0
- package/dist/getBaseUrl-CO7Jp27d.cjs.map +1 -0
- package/dist/getBaseUrl-Dx6RDC8I.js +8 -0
- package/dist/getBaseUrl-Dx6RDC8I.js.map +1 -0
- package/dist/hashCert-Bol7lIh2.js +62 -0
- package/dist/hashCert-Bol7lIh2.js.map +1 -0
- package/dist/hashCert-mlYEuYex.cjs +68 -0
- package/dist/hashCert-mlYEuYex.cjs.map +1 -0
- package/dist/hashSignedProperties-9vj5wlYR.js +83 -0
- package/dist/hashSignedProperties-9vj5wlYR.js.map +1 -0
- package/dist/hashSignedProperties-CU_ZqqmY.cjs +95 -0
- package/dist/hashSignedProperties-CU_ZqqmY.cjs.map +1 -0
- package/dist/index-B1DSs-wd.d.cts +16 -0
- package/dist/index-B1DSs-wd.d.cts.map +1 -0
- package/dist/index-CJNLQVjx.d.ts +1 -0
- package/dist/index-FTgB2nM6.d.ts +16 -0
- package/dist/index-FTgB2nM6.d.ts.map +1 -0
- package/dist/index-Wy1ONBjV.d.cts +1 -0
- package/dist/index.cjs +13 -103
- package/dist/index.d.ts +60 -5666
- package/dist/index.js +11 -99
- package/dist/index10.cjs +34 -0
- package/dist/index10.cjs.map +1 -0
- package/dist/index11.cjs +24 -0
- package/dist/index11.cjs.map +1 -0
- package/dist/index12.cjs +0 -0
- package/dist/index13.cjs +13 -0
- package/dist/index14.cjs +13 -0
- package/dist/index14.cjs.map +1 -0
- package/dist/index15.cjs +3 -0
- package/dist/index16.cjs +17 -0
- package/dist/index17.cjs +3 -0
- package/dist/index18.cjs +208 -0
- package/dist/index18.cjs.map +1 -0
- package/dist/index19.cjs +109 -0
- package/dist/index19.cjs.map +1 -0
- package/dist/index2.cjs +62 -0
- package/dist/index2.cjs.map +1 -0
- package/dist/index20.cjs +137 -0
- package/dist/index20.cjs.map +1 -0
- package/dist/index21.cjs +64 -0
- package/dist/index21.cjs.map +1 -0
- package/dist/index22.cjs +267 -0
- package/dist/index22.cjs.map +1 -0
- package/dist/index23.cjs +79 -0
- package/dist/index23.cjs.map +1 -0
- package/dist/index24.cjs +107 -0
- package/dist/index24.cjs.map +1 -0
- package/dist/index25.cjs +73 -0
- package/dist/index25.cjs.map +1 -0
- package/dist/index26.cjs +112 -0
- package/dist/index26.cjs.map +1 -0
- package/dist/index27.cjs +100 -0
- package/dist/index27.cjs.map +1 -0
- package/dist/index28.cjs +18 -0
- package/dist/index28.cjs.map +1 -0
- package/dist/index29.cjs +38 -0
- package/dist/index29.cjs.map +1 -0
- package/dist/index3.cjs +532 -0
- package/dist/index3.cjs.map +1 -0
- package/dist/index30.cjs +19 -0
- package/dist/index30.cjs.map +1 -0
- package/dist/index31.cjs +29 -0
- package/dist/index31.cjs.map +1 -0
- package/dist/index32.cjs +20 -0
- package/dist/index32.cjs.map +1 -0
- package/dist/index33.cjs +14 -0
- package/dist/index33.cjs.map +1 -0
- package/dist/index34.cjs +14 -0
- package/dist/index34.cjs.map +1 -0
- package/dist/index35.cjs +17 -0
- package/dist/index35.cjs.map +1 -0
- package/dist/index36.cjs +13 -0
- package/dist/index36.cjs.map +1 -0
- package/dist/index37.cjs +108 -0
- package/dist/index37.cjs.map +1 -0
- package/dist/index38.cjs +113 -0
- package/dist/index38.cjs.map +1 -0
- package/dist/index39.cjs +126 -0
- package/dist/index39.cjs.map +1 -0
- package/dist/index4.cjs +196 -0
- package/dist/index4.cjs.map +1 -0
- package/dist/index40.cjs +113 -0
- package/dist/index40.cjs.map +1 -0
- package/dist/index41.cjs +105 -0
- package/dist/index41.cjs.map +1 -0
- package/dist/index42.cjs +125 -0
- package/dist/index42.cjs.map +1 -0
- package/dist/index43.cjs +134 -0
- package/dist/index43.cjs.map +1 -0
- package/dist/index44.cjs +124 -0
- package/dist/index44.cjs.map +1 -0
- package/dist/index45.cjs +21 -0
- package/dist/index45.cjs.map +1 -0
- package/dist/index46.cjs +102 -0
- package/dist/index46.cjs.map +1 -0
- package/dist/index47.cjs +149 -0
- package/dist/index47.cjs.map +1 -0
- package/dist/index48.cjs +121 -0
- package/dist/index48.cjs.map +1 -0
- package/dist/index49.cjs +151 -0
- package/dist/index49.cjs.map +1 -0
- package/dist/index5.cjs +25 -0
- package/dist/index5.cjs.map +1 -0
- package/dist/index50.cjs +120 -0
- package/dist/index50.cjs.map +1 -0
- package/dist/index51.cjs +24 -0
- package/dist/index51.cjs.map +1 -0
- package/dist/index52.cjs +119 -0
- package/dist/index52.cjs.map +1 -0
- package/dist/index53.cjs +54 -0
- package/dist/index53.cjs.map +1 -0
- package/dist/index54.cjs +21 -0
- package/dist/index54.cjs.map +1 -0
- package/dist/index55.cjs +35 -0
- package/dist/index55.cjs.map +1 -0
- package/dist/index56.cjs +29 -0
- package/dist/index56.cjs.map +1 -0
- package/dist/index57.cjs +16 -0
- package/dist/index57.cjs.map +1 -0
- package/dist/index58.cjs +15 -0
- package/dist/index58.cjs.map +1 -0
- package/dist/index59.cjs +24 -0
- package/dist/index59.cjs.map +1 -0
- package/dist/index59.cts.map +1 -0
- package/dist/index6.cjs +0 -0
- package/dist/index60.cjs +419 -0
- package/dist/index60.cjs.map +1 -0
- package/dist/index61.cjs +15 -0
- package/dist/index61.cjs.map +1 -0
- package/dist/index62.cjs +16 -0
- package/dist/index62.cjs.map +1 -0
- package/dist/index62.cts.map +1 -0
- package/dist/index63.cjs +0 -0
- package/dist/index63.cts.map +1 -0
- package/dist/index64.cjs +0 -0
- package/dist/index64.cts.map +1 -0
- package/dist/index65.cjs +122 -0
- package/dist/index65.cjs.map +1 -0
- package/dist/index65.cts.map +1 -0
- package/dist/index66.cjs +229 -0
- package/dist/index66.cjs.map +1 -0
- package/dist/index66.cts.map +1 -0
- package/dist/index67.cjs +4 -0
- package/dist/index67.cts.map +1 -0
- package/dist/index68.cjs +3 -0
- package/dist/index68.cts.map +1 -0
- package/dist/index69.cjs +4 -0
- package/dist/index69.cts.map +1 -0
- package/dist/index7.cjs +0 -0
- package/dist/index70.cjs +3 -0
- package/dist/index70.cts.map +1 -0
- package/dist/index71.cjs +3 -0
- package/dist/index71.cts.map +1 -0
- package/dist/index72.cjs +3 -0
- package/dist/index72.cts.map +1 -0
- package/dist/index73.cjs +3 -0
- package/dist/index73.cts.map +1 -0
- package/dist/index8.cjs +25 -0
- package/dist/index8.cjs.map +1 -0
- package/dist/index9.cjs +0 -0
- package/dist/invoice-1_1-BJVcw-oE.d.ts +432 -0
- package/dist/invoice-1_1-BJVcw-oE.d.ts.map +1 -0
- package/dist/invoice-1_1-DWdNPRzr.d.cts +432 -0
- package/dist/invoice-1_1-DWdNPRzr.d.cts.map +1 -0
- package/dist/invoice1-1-8S-QQn7P.cjs +547 -0
- package/dist/invoice1-1-8S-QQn7P.cjs.map +1 -0
- package/dist/invoice1-1-CHuLpkFz.js +504 -0
- package/dist/invoice1-1-CHuLpkFz.js.map +1 -0
- package/dist/msic-codes-B_1W6lZF.d.cts +26 -0
- package/dist/msic-codes-B_1W6lZF.d.cts.map +1 -0
- package/dist/msic-codes-bs0lTfSZ.d.ts +26 -0
- package/dist/msic-codes-bs0lTfSZ.d.ts.map +1 -0
- package/dist/payment-modes-B8dNy3SM.d.ts +44 -0
- package/dist/payment-modes-B8dNy3SM.d.ts.map +1 -0
- package/dist/payment-modes-DHihrywe.d.cts +44 -0
- package/dist/payment-modes-DHihrywe.d.cts.map +1 -0
- package/dist/platformLogin-DsxWWUXr.js +31 -0
- package/dist/platformLogin-DsxWWUXr.js.map +1 -0
- package/dist/platformLogin-PGzMhw1X.cjs +37 -0
- package/dist/platformLogin-PGzMhw1X.cjs.map +1 -0
- package/dist/populateFinalDocument-BdyYzz5Y.cjs +96 -0
- package/dist/populateFinalDocument-BdyYzz5Y.cjs.map +1 -0
- package/dist/populateFinalDocument-BpLXmgLv.js +90 -0
- package/dist/populateFinalDocument-BpLXmgLv.js.map +1 -0
- package/dist/populateSignedProperties-BJMcBQ6S.cjs +58 -0
- package/dist/populateSignedProperties-BJMcBQ6S.cjs.map +1 -0
- package/dist/populateSignedProperties-BvGN-YZH.js +52 -0
- package/dist/populateSignedProperties-BvGN-YZH.js.map +1 -0
- package/dist/sign-B61Cy3gO.cjs +40 -0
- package/dist/sign-B61Cy3gO.cjs.map +1 -0
- package/dist/sign-DzHK7UhR.js +34 -0
- package/dist/sign-DzHK7UhR.js.map +1 -0
- package/dist/signatures-BKi9DP2K.d.cts +173 -0
- package/dist/signatures-BKi9DP2K.d.cts.map +1 -0
- package/dist/signatures-C9QPZTQd.d.ts +173 -0
- package/dist/signatures-C9QPZTQd.d.ts.map +1 -0
- package/dist/state-codes-CxG1S9YY.d.ts +62 -0
- package/dist/state-codes-CxG1S9YY.d.ts.map +1 -0
- package/dist/state-codes-DXSWtE6a.d.cts +62 -0
- package/dist/state-codes-DXSWtE6a.d.cts.map +1 -0
- package/dist/tax-types-CEpfSh5P.d.ts +42 -0
- package/dist/tax-types-CEpfSh5P.d.ts.map +1 -0
- package/dist/tax-types-CgwxONDS.d.cts +42 -0
- package/dist/tax-types-CgwxONDS.d.cts.map +1 -0
- package/dist/transform-BLz0S687.cjs +72 -0
- package/dist/transform-BLz0S687.cjs.map +1 -0
- package/dist/transform-D1q-U6Zj.js +66 -0
- package/dist/transform-D1q-U6Zj.js.map +1 -0
- package/dist/types/classification-codes.d.ts +2 -0
- package/dist/types/country-code.d.ts +2 -0
- package/dist/types/currencies.d.ts +2 -0
- package/dist/types/documents/index.d.ts +57 -0
- package/dist/types/documents/invoice-1_1.d.ts +56 -0
- package/dist/types/e-invoice.d.ts +2 -0
- package/dist/types/index.d.ts +59 -0
- package/dist/types/msic/0X.d.ts +2 -0
- package/dist/types/msic/1X.d.ts +2 -0
- package/dist/types/msic/2X.d.ts +2 -0
- package/dist/types/msic/3X.d.ts +2 -0
- package/dist/types/msic/4X.d.ts +2 -0
- package/dist/types/msic/5X.d.ts +2 -0
- package/dist/types/msic/6X.d.ts +2 -0
- package/dist/types/msic/7X.d.ts +2 -0
- package/dist/types/msic/8X.d.ts +2 -0
- package/dist/types/msic/9X.d.ts +2 -0
- package/dist/types/msic-codes.d.ts +12 -0
- package/dist/types/payment-modes.d.ts +2 -0
- package/dist/types/signatures.d.ts +2 -0
- package/dist/types/state-codes.d.ts +2 -0
- package/dist/types/tax-types.d.ts +2 -0
- package/dist/types/unit/1X.d.ts +2 -0
- package/dist/types/unit/2X.d.ts +2 -0
- package/dist/types/unit/3X.d.ts +2 -0
- package/dist/types/unit/4X.d.ts +2 -0
- package/dist/types/unit/5X.d.ts +2 -0
- package/dist/types/unit/6X.d.ts +2 -0
- package/dist/types/unit/7X.d.ts +2 -0
- package/dist/types/unit/8X.d.ts +2 -0
- package/dist/types/unit/9X.d.ts +2 -0
- package/dist/types/unit/AX.d.ts +2 -0
- package/dist/types/unit/BX.d.ts +2 -0
- package/dist/types/unit/CX.d.ts +2 -0
- package/dist/types/unit/DX.d.ts +2 -0
- package/dist/types/unit/EX.d.ts +2 -0
- package/dist/types/unit/FX.d.ts +2 -0
- package/dist/types/unit/GX.d.ts +2 -0
- package/dist/types/unit/HX.d.ts +2 -0
- package/dist/types/unit/IX.d.ts +2 -0
- package/dist/types/unit/JX.d.ts +2 -0
- package/dist/types/unit/KX.d.ts +2 -0
- package/dist/types/unit/LX.d.ts +2 -0
- package/dist/types/unit/MX.d.ts +2 -0
- package/dist/types/unit/NX.d.ts +2 -0
- package/dist/types/unit/OX.d.ts +2 -0
- package/dist/types/unit/PX.d.ts +2 -0
- package/dist/types/unit/QX.d.ts +2 -0
- package/dist/types/unit/RX.d.ts +2 -0
- package/dist/types/unit/SX.d.ts +2 -0
- package/dist/types/unit/TX.d.ts +2 -0
- package/dist/types/unit/UX.d.ts +2 -0
- package/dist/types/unit/VX.d.ts +2 -0
- package/dist/types/unit/WX.d.ts +2 -0
- package/dist/types/unit/XX.d.ts +2 -0
- package/dist/types/unit/YX.d.ts +2 -0
- package/dist/types/unit/ZX.d.ts +2 -0
- package/dist/types/unit-types.d.ts +37 -0
- package/dist/unit-types-1bF0KhIp.d.ts +56 -0
- package/dist/unit-types-1bF0KhIp.d.ts.map +1 -0
- package/dist/unit-types-CsrkvgfG.d.cts +56 -0
- package/dist/unit-types-CsrkvgfG.d.cts.map +1 -0
- package/dist/utils/MyInvoisClient.d.ts +60 -0
- package/dist/utils/MyInvoisClient.js +13 -0
- package/dist/utils/base64.d.ts +6 -0
- package/dist/utils/base64.d.ts.map +1 -0
- package/dist/utils/base64.js +11 -0
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/debug/debug-document-hash.d.ts +100 -0
- package/dist/utils/debug/debug-document-hash.d.ts.map +1 -0
- package/dist/utils/debug/debug-document-hash.js +120 -0
- package/dist/utils/debug/debug-document-hash.js.map +1 -0
- package/dist/utils/debug/debug-invoice-submission.d.ts +152 -0
- package/dist/utils/debug/debug-invoice-submission.d.ts.map +1 -0
- package/dist/utils/debug/debug-invoice-submission.js +226 -0
- package/dist/utils/debug/debug-invoice-submission.js.map +1 -0
- package/dist/utils/getBaseUrl.d.ts +5 -0
- package/dist/utils/getBaseUrl.d.ts.map +1 -0
- package/dist/utils/getBaseUrl.js +3 -0
- package/dist/utils/invoice1-1.d.ts +117 -0
- package/dist/utils/invoice1-1.d.ts.map +1 -0
- package/dist/utils/invoice1-1.js +10 -0
- package/dist/utils/signature/canonicalize.d.ts +26 -0
- package/dist/utils/signature/canonicalize.d.ts.map +1 -0
- package/dist/utils/signature/canonicalize.js +3 -0
- package/dist/utils/signature/hashCert.d.ts +15 -0
- package/dist/utils/signature/hashCert.d.ts.map +1 -0
- package/dist/utils/signature/hashCert.js +3 -0
- package/dist/utils/signature/hashSignedProperties.d.ts +25 -0
- package/dist/utils/signature/hashSignedProperties.d.ts.map +1 -0
- package/dist/utils/signature/hashSignedProperties.js +3 -0
- package/dist/utils/signature/populateFinalDocument.d.ts +23 -0
- package/dist/utils/signature/populateFinalDocument.d.ts.map +1 -0
- package/dist/utils/signature/populateFinalDocument.js +3 -0
- package/dist/utils/signature/populateSignedProperties.d.ts +23 -0
- package/dist/utils/signature/populateSignedProperties.d.ts.map +1 -0
- package/dist/utils/signature/populateSignedProperties.js +3 -0
- package/dist/utils/signature/sign.d.ts +16 -0
- package/dist/utils/signature/sign.d.ts.map +1 -0
- package/dist/utils/signature/sign.js +3 -0
- package/dist/utils/signature/transform.d.ts +16 -0
- package/dist/utils/signature/transform.d.ts.map +1 -0
- package/dist/utils/signature/transform.js +3 -0
- package/package.json +12 -5
- package/src/api/platform/platformLogin.ts +6 -1
- package/src/types/documents/invoice-1_1.d.ts +90 -0
- package/src/types/msic-codes.d.ts +1 -7
- package/src/utils/MyInvoisClient.ts +421 -8
- package/src/utils/base64.ts +7 -0
- package/src/utils/debug/debug-document-hash.ts +249 -0
- package/src/utils/debug/debug-invoice-submission.ts +355 -0
- package/src/utils/getBaseUrl.ts +1 -1
- package/src/utils/invoice1-1.ts +671 -0
- package/src/utils/signature/canonicalize.ts +104 -0
- package/src/utils/signature/hashCert.ts +115 -0
- package/src/utils/signature/hashSignedProperties.ts +155 -0
- package/src/utils/signature/populateFinalDocument.ts +187 -0
- package/src/utils/signature/populateSignedProperties.ts +87 -0
- package/src/utils/signature/sign.ts +51 -0
- package/src/utils/signature/transform.ts +99 -0
- package/test/MyInvoiClientWithRealData.test.ts +2 -1
- package/test/MyInvoisClient.test.ts +16 -8
- package/test/base64.test.ts +43 -0
- package/test/canonicalize.test.ts +110 -0
- package/test/hashCert.test.ts +95 -0
- package/test/hashSignedProperties.test.ts +140 -0
- package/test/populateFinalDocument.test.ts +218 -0
- package/test/populateSignedProperties.test.ts +155 -0
- package/test/sign.test.ts +70 -0
- package/test/signAndSubmitInvoice.test.ts +915 -0
- package/test/transform.test.ts +158 -0
- package/tsconfig.json +7 -1
- package/tsdown.config.ts +31 -0
- package/dist/index.cjs.map +0 -1
- package/rolldown.config.ts +0 -26
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const crypto = require_chunk.__toESM(require("crypto"));
|
|
3
|
+
|
|
4
|
+
//#region src/utils/signature/sign.ts
|
|
5
|
+
/**
|
|
6
|
+
* Signs the document hash digest using RSA-SHA256 and a private key.
|
|
7
|
+
*
|
|
8
|
+
* Corresponds to Step 4 in the MyInvois Signature Creation guide:
|
|
9
|
+
* https://sdk.myinvois.hasil.gov.my/signature-creation/#step-4-sign-the-document-digest
|
|
10
|
+
*
|
|
11
|
+
* @param base64DocDigest The Base64 encoded SHA-256 hash of the canonicalized document (DocDigest from Step 3).
|
|
12
|
+
* @param privateKeyPem The private key in PEM format (string or Buffer).
|
|
13
|
+
* @returns The Base64 encoded RSA-SHA256 signature (Sig).
|
|
14
|
+
* @throws {Error} If signing fails.
|
|
15
|
+
*/
|
|
16
|
+
function signDocumentDigest(base64DocDigest, privateKeyPem) {
|
|
17
|
+
try {
|
|
18
|
+
const base64Regex = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
19
|
+
if (base64DocDigest.length > 0 && !base64Regex.test(base64DocDigest)) throw new Error("Invalid Base64 characters detected in document digest.");
|
|
20
|
+
const rawDocDigest = Buffer.from(base64DocDigest, "base64");
|
|
21
|
+
if (base64DocDigest.length > 0 && rawDocDigest.length === 0) throw new Error("Invalid Base64 content for document digest.");
|
|
22
|
+
const signer = crypto.createSign("RSA-SHA256");
|
|
23
|
+
signer.update(rawDocDigest);
|
|
24
|
+
signer.end();
|
|
25
|
+
const base64Signature = signer.sign(privateKeyPem, "base64");
|
|
26
|
+
return base64Signature;
|
|
27
|
+
} catch (error) {
|
|
28
|
+
console.error("Error during signing:", error);
|
|
29
|
+
throw new Error(`Failed to sign document digest: ${error.message || error}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
Object.defineProperty(exports, 'signDocumentDigest', {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () {
|
|
37
|
+
return signDocumentDigest;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=sign-B61Cy3gO.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-B61Cy3gO.cjs","names":["base64DocDigest: string","privateKeyPem: string | Buffer","error: any"],"sources":["../src/utils/signature/sign.ts"],"sourcesContent":["import * as crypto from 'crypto'\n\n/**\n * Signs the document hash digest using RSA-SHA256 and a private key.\n *\n * Corresponds to Step 4 in the MyInvois Signature Creation guide:\n * https://sdk.myinvois.hasil.gov.my/signature-creation/#step-4-sign-the-document-digest\n *\n * @param base64DocDigest The Base64 encoded SHA-256 hash of the canonicalized document (DocDigest from Step 3).\n * @param privateKeyPem The private key in PEM format (string or Buffer).\n * @returns The Base64 encoded RSA-SHA256 signature (Sig).\n * @throws {Error} If signing fails.\n */\nexport function signDocumentDigest(\n base64DocDigest: string,\n privateKeyPem: string | Buffer,\n): string {\n try {\n // Add stricter validation: Check if the input string contains only valid Base64 characters.\n const base64Regex = /^[A-Za-z0-9+/]*={0,2}$/\n if (base64DocDigest.length > 0 && !base64Regex.test(base64DocDigest)) {\n throw new Error('Invalid Base64 characters detected in document digest.')\n }\n\n // 1. Decode the Base64 document digest back to a raw buffer\n // The signature is calculated over the raw hash bytes, not the Base64 string.\n const rawDocDigest = Buffer.from(base64DocDigest, 'base64')\n\n // Add check: If input Base64 string was not empty, but decoded buffer is,\n // it implies invalid Base64 characters were likely ignored instead of throwing.\n if (base64DocDigest.length > 0 && rawDocDigest.length === 0) {\n throw new Error('Invalid Base64 content for document digest.')\n }\n\n // 2. Create a signer instance with RSA-SHA256\n const signer = crypto.createSign('RSA-SHA256')\n\n // 3. Update the signer with the raw hash digest\n // Note: We sign the HASH itself, not the original data.\n signer.update(rawDocDigest)\n signer.end()\n\n // 4. Sign using the private key and get the signature in Base64 format\n const base64Signature = signer.sign(privateKeyPem, 'base64')\n\n return base64Signature\n } catch (error: any) {\n console.error('Error during signing:', error)\n throw new Error(`Failed to sign document digest: ${error.message || error}`)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAaA,SAAgB,mBACdA,iBACAC,eACQ;AACR,KAAI;EAEF,MAAM,cAAc;AACpB,MAAI,gBAAgB,SAAS,MAAM,YAAY,KAAK,gBAAgB,CAClE,OAAM,IAAI,MAAM;EAKlB,MAAM,eAAe,OAAO,KAAK,iBAAiB,SAAS;AAI3D,MAAI,gBAAgB,SAAS,KAAK,aAAa,WAAW,EACxD,OAAM,IAAI,MAAM;EAIlB,MAAM,SAAS,OAAO,WAAW,aAAa;AAI9C,SAAO,OAAO,aAAa;AAC3B,SAAO,KAAK;EAGZ,MAAM,kBAAkB,OAAO,KAAK,eAAe,SAAS;AAE5D,SAAO;CACR,SAAQC,OAAY;AACnB,UAAQ,MAAM,yBAAyB,MAAM;AAC7C,QAAM,IAAI,OAAO,kCAAkC,MAAM,WAAW,MAAM;CAC3E;AACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as crypto from "crypto";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/signature/sign.ts
|
|
4
|
+
/**
|
|
5
|
+
* Signs the document hash digest using RSA-SHA256 and a private key.
|
|
6
|
+
*
|
|
7
|
+
* Corresponds to Step 4 in the MyInvois Signature Creation guide:
|
|
8
|
+
* https://sdk.myinvois.hasil.gov.my/signature-creation/#step-4-sign-the-document-digest
|
|
9
|
+
*
|
|
10
|
+
* @param base64DocDigest The Base64 encoded SHA-256 hash of the canonicalized document (DocDigest from Step 3).
|
|
11
|
+
* @param privateKeyPem The private key in PEM format (string or Buffer).
|
|
12
|
+
* @returns The Base64 encoded RSA-SHA256 signature (Sig).
|
|
13
|
+
* @throws {Error} If signing fails.
|
|
14
|
+
*/
|
|
15
|
+
function signDocumentDigest(base64DocDigest, privateKeyPem) {
|
|
16
|
+
try {
|
|
17
|
+
const base64Regex = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
18
|
+
if (base64DocDigest.length > 0 && !base64Regex.test(base64DocDigest)) throw new Error("Invalid Base64 characters detected in document digest.");
|
|
19
|
+
const rawDocDigest = Buffer.from(base64DocDigest, "base64");
|
|
20
|
+
if (base64DocDigest.length > 0 && rawDocDigest.length === 0) throw new Error("Invalid Base64 content for document digest.");
|
|
21
|
+
const signer = crypto.createSign("RSA-SHA256");
|
|
22
|
+
signer.update(rawDocDigest);
|
|
23
|
+
signer.end();
|
|
24
|
+
const base64Signature = signer.sign(privateKeyPem, "base64");
|
|
25
|
+
return base64Signature;
|
|
26
|
+
} catch (error) {
|
|
27
|
+
console.error("Error during signing:", error);
|
|
28
|
+
throw new Error(`Failed to sign document digest: ${error.message || error}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { signDocumentDigest };
|
|
34
|
+
//# sourceMappingURL=sign-DzHK7UhR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-DzHK7UhR.js","names":["base64DocDigest: string","privateKeyPem: string | Buffer","error: any"],"sources":["../src/utils/signature/sign.ts"],"sourcesContent":["import * as crypto from 'crypto'\n\n/**\n * Signs the document hash digest using RSA-SHA256 and a private key.\n *\n * Corresponds to Step 4 in the MyInvois Signature Creation guide:\n * https://sdk.myinvois.hasil.gov.my/signature-creation/#step-4-sign-the-document-digest\n *\n * @param base64DocDigest The Base64 encoded SHA-256 hash of the canonicalized document (DocDigest from Step 3).\n * @param privateKeyPem The private key in PEM format (string or Buffer).\n * @returns The Base64 encoded RSA-SHA256 signature (Sig).\n * @throws {Error} If signing fails.\n */\nexport function signDocumentDigest(\n base64DocDigest: string,\n privateKeyPem: string | Buffer,\n): string {\n try {\n // Add stricter validation: Check if the input string contains only valid Base64 characters.\n const base64Regex = /^[A-Za-z0-9+/]*={0,2}$/\n if (base64DocDigest.length > 0 && !base64Regex.test(base64DocDigest)) {\n throw new Error('Invalid Base64 characters detected in document digest.')\n }\n\n // 1. Decode the Base64 document digest back to a raw buffer\n // The signature is calculated over the raw hash bytes, not the Base64 string.\n const rawDocDigest = Buffer.from(base64DocDigest, 'base64')\n\n // Add check: If input Base64 string was not empty, but decoded buffer is,\n // it implies invalid Base64 characters were likely ignored instead of throwing.\n if (base64DocDigest.length > 0 && rawDocDigest.length === 0) {\n throw new Error('Invalid Base64 content for document digest.')\n }\n\n // 2. Create a signer instance with RSA-SHA256\n const signer = crypto.createSign('RSA-SHA256')\n\n // 3. Update the signer with the raw hash digest\n // Note: We sign the HASH itself, not the original data.\n signer.update(rawDocDigest)\n signer.end()\n\n // 4. Sign using the private key and get the signature in Base64 format\n const base64Signature = signer.sign(privateKeyPem, 'base64')\n\n return base64Signature\n } catch (error: any) {\n console.error('Error during signing:', error)\n throw new Error(`Failed to sign document digest: ${error.message || error}`)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAgB,mBACdA,iBACAC,eACQ;AACR,KAAI;EAEF,MAAM,cAAc;AACpB,MAAI,gBAAgB,SAAS,MAAM,YAAY,KAAK,gBAAgB,CAClE,OAAM,IAAI,MAAM;EAKlB,MAAM,eAAe,OAAO,KAAK,iBAAiB,SAAS;AAI3D,MAAI,gBAAgB,SAAS,KAAK,aAAa,WAAW,EACxD,OAAM,IAAI,MAAM;EAIlB,MAAM,SAAS,OAAO,WAAW,aAAa;AAI9C,SAAO,OAAO,aAAa;AAC3B,SAAO,KAAK;EAGZ,MAAM,kBAAkB,OAAO,KAAK,eAAe,SAAS;AAE5D,SAAO;CACR,SAAQC,OAAY;AACnB,UAAQ,MAAM,yBAAyB,MAAM;AAC7C,QAAM,IAAI,OAAO,kCAAkC,MAAM,WAAW,MAAM;CAC3E;AACF"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
//#region src/types/signatures.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents the Digest Method structure used within the signature.
|
|
4
|
+
*/
|
|
5
|
+
interface DigestMethod {
|
|
6
|
+
/** Algorithm used for digest. Should be http://www.w3.org/2001/04/xmlenc#sha256 */
|
|
7
|
+
Algorithm: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents the Cert Digest structure.
|
|
12
|
+
*/
|
|
13
|
+
interface CertDigest {
|
|
14
|
+
/** Digest method details. */
|
|
15
|
+
"ds:DigestMethod": DigestMethod;
|
|
16
|
+
/** Base64 encoded HEX-SHA256 certificate information (CertDigest). */
|
|
17
|
+
"ds:DigestValue": string; // base64binary
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Represents the Issuer Serial structure within the Signing Certificate.
|
|
22
|
+
*/
|
|
23
|
+
interface IssuerSerial {
|
|
24
|
+
/** CN of the certificate issuer (Organization name). */
|
|
25
|
+
"ds:X509IssuerName": string;
|
|
26
|
+
/** Digital certificate serial number. */
|
|
27
|
+
"ds:X509SerialNumber": string; // xsd:normalizedString -> string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Represents the Certificate structure within Signing Certificate.
|
|
32
|
+
*/
|
|
33
|
+
interface Cert {
|
|
34
|
+
/** Certificate digest details. */
|
|
35
|
+
"xades:CertDigest": CertDigest;
|
|
36
|
+
/** Issuer details. */
|
|
37
|
+
"xades:IssuerSerial": IssuerSerial;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Represents the Signing Certificate structure.
|
|
42
|
+
*/
|
|
43
|
+
interface SigningCertificate {
|
|
44
|
+
/** Certificate details. */
|
|
45
|
+
"xades:Cert": Cert;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Represents the Signed Signature Properties.
|
|
50
|
+
*/
|
|
51
|
+
interface SignedSignatureProperties {
|
|
52
|
+
/** UTC timestamp of signing (YYYY-MM-DDTHH:mm:ssZ). */
|
|
53
|
+
"xades:SigningTime": string; // dateTime
|
|
54
|
+
/** Signing certificate details. */
|
|
55
|
+
"xades:SigningCertificate": SigningCertificate;
|
|
56
|
+
// Note: Other optional properties like SignaturePolicyIdentifier might exist
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Represents the Signed Properties structure.
|
|
61
|
+
*/
|
|
62
|
+
interface SignedProperties {
|
|
63
|
+
/** Target attribute, should be 'signature'. */
|
|
64
|
+
Target: string;
|
|
65
|
+
/** ID attribute, should be 'id-xades-signed-props'. */
|
|
66
|
+
Id: string;
|
|
67
|
+
/** Signed signature properties. */
|
|
68
|
+
"xades:SignedSignatureProperties": SignedSignatureProperties;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Represents the Qualifying Properties structure (Object element).
|
|
73
|
+
*/
|
|
74
|
+
interface QualifyingProperties {
|
|
75
|
+
/** Target attribute, should be 'signature'. */
|
|
76
|
+
Target: string;
|
|
77
|
+
/** Signed properties details. */
|
|
78
|
+
"xades:SignedProperties": SignedProperties;
|
|
79
|
+
// Note: UnsignedProperties might exist but are not detailed in the mandatory part
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Represents the X509 Data structure within KeyInfo.
|
|
84
|
+
*/
|
|
85
|
+
interface X509Data {
|
|
86
|
+
/** Base64 encoded X509 certificate. */
|
|
87
|
+
"ds:X509Certificate": string; // base64binary
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Represents the Key Information structure.
|
|
92
|
+
*/
|
|
93
|
+
interface KeyInfo {
|
|
94
|
+
/** X509 certificate data. */
|
|
95
|
+
"ds:X509Data": X509Data;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Represents the Transform structure within Reference.
|
|
100
|
+
*/
|
|
101
|
+
interface Transform {
|
|
102
|
+
/** Algorithm attribute for the transform. */
|
|
103
|
+
Algorithm: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Represents a Reference within SignedInfo.
|
|
108
|
+
*/
|
|
109
|
+
interface Reference {
|
|
110
|
+
/** ID attribute for the reference (e.g., 'id-doc-signed-data', 'id-xades-signed-props'). */
|
|
111
|
+
Id?: string;
|
|
112
|
+
/** URI attribute for the reference (e.g., '', '#id-xades-signed-props'). */
|
|
113
|
+
URI: string;
|
|
114
|
+
/** Optional Transforms applied. */
|
|
115
|
+
"ds:Transforms"?: {
|
|
116
|
+
"ds:Transform": Transform | Transform[]; // Can be single or multiple transforms
|
|
117
|
+
};
|
|
118
|
+
/** Digest method details. */
|
|
119
|
+
"ds:DigestMethod": DigestMethod;
|
|
120
|
+
/** Base64 encoded digest value (DocDigest or PropsDigest). */
|
|
121
|
+
"ds:DigestValue": string; // base64binary
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Represents the Canonicalization Method structure.
|
|
126
|
+
*/
|
|
127
|
+
interface CanonicalizationMethod {
|
|
128
|
+
/** Algorithm used for canonicalization. Should be http://www.w3.org/2006/12/xml-c14n11 */
|
|
129
|
+
Algorithm: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Represents the Signature Method structure.
|
|
134
|
+
*/
|
|
135
|
+
interface SignatureMethod {
|
|
136
|
+
/** Algorithm used for signing. Should be http://www.w3.org/2001/04/xmldsig-more#rsa-sha256 */
|
|
137
|
+
Algorithm: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Represents the Signed Information structure.
|
|
142
|
+
*/
|
|
143
|
+
interface SignedInfo {
|
|
144
|
+
/** Canonicalization method details. */
|
|
145
|
+
"ds:CanonicalizationMethod": CanonicalizationMethod;
|
|
146
|
+
/** Signature method details. */
|
|
147
|
+
"ds:SignatureMethod": SignatureMethod;
|
|
148
|
+
/** References to signed data and properties. Should contain two references. */
|
|
149
|
+
"ds:Reference": [Reference, Reference]; // Expecting two: one for document, one for signed properties
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Represents the root Signature element (IssuerDigitalSignature).
|
|
154
|
+
* Based on the documentation: https://sdk.myinvois.hasil.gov.my/signature/
|
|
155
|
+
* Conforms to XAdES enveloped signature requirements for UBL.
|
|
156
|
+
*/
|
|
157
|
+
interface IssuerDigitalSignature {
|
|
158
|
+
/** ID attribute, should be 'DocSig'. */
|
|
159
|
+
Id: string;
|
|
160
|
+
/** Signed information details. */
|
|
161
|
+
"ds:SignedInfo": SignedInfo;
|
|
162
|
+
/** Base64 encoded signature value (Sig). */
|
|
163
|
+
"ds:SignatureValue": string; // base64binary
|
|
164
|
+
/** Public key information (certificate). */
|
|
165
|
+
"ds:KeyInfo": KeyInfo;
|
|
166
|
+
/** Object containing signed properties. */
|
|
167
|
+
"ds:Object": {
|
|
168
|
+
"xades:QualifyingProperties": QualifyingProperties;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
//#endregion
|
|
172
|
+
export { CanonicalizationMethod, Cert, CertDigest, DigestMethod, IssuerDigitalSignature, IssuerSerial, KeyInfo, QualifyingProperties, Reference, SignatureMethod, SignedInfo, SignedProperties, SignedSignatureProperties, SigningCertificate, Transform, X509Data };
|
|
173
|
+
//# sourceMappingURL=signatures-BKi9DP2K.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signatures-BKi9DP2K.d.cts","names":["DigestMethod","CertDigest","IssuerSerial","Cert","SigningCertificate","SignedSignatureProperties","SignedProperties","QualifyingProperties","X509Data","KeyInfo","Transform","Reference","CanonicalizationMethod","SignatureMethod","SignedInfo","IssuerDigitalSignature"],"sources":["../src/types/signatures.d.ts"],"sourcesContent":["/**\n * Represents the Digest Method structure used within the signature.\n */\nexport interface DigestMethod {\n /** Algorithm used for digest. Should be http://www.w3.org/2001/04/xmlenc#sha256 */\n Algorithm: string\n}\n\n/**\n * Represents the Cert Digest structure.\n */\nexport interface CertDigest {\n /** Digest method details. */\n \"ds:DigestMethod\": DigestMethod\n /** Base64 encoded HEX-SHA256 certificate information (CertDigest). */\n \"ds:DigestValue\": string // base64binary\n}\n\n/**\n * Represents the Issuer Serial structure within the Signing Certificate.\n */\nexport interface IssuerSerial {\n /** CN of the certificate issuer (Organization name). */\n \"ds:X509IssuerName\": string\n /** Digital certificate serial number. */\n \"ds:X509SerialNumber\": string // xsd:normalizedString -> string\n}\n\n/**\n * Represents the Certificate structure within Signing Certificate.\n */\nexport interface Cert {\n /** Certificate digest details. */\n \"xades:CertDigest\": CertDigest\n /** Issuer details. */\n \"xades:IssuerSerial\": IssuerSerial\n}\n\n/**\n * Represents the Signing Certificate structure.\n */\nexport interface SigningCertificate {\n /** Certificate details. */\n \"xades:Cert\": Cert\n}\n\n/**\n * Represents the Signed Signature Properties.\n */\nexport interface SignedSignatureProperties {\n /** UTC timestamp of signing (YYYY-MM-DDTHH:mm:ssZ). */\n \"xades:SigningTime\": string // dateTime\n /** Signing certificate details. */\n \"xades:SigningCertificate\": SigningCertificate\n // Note: Other optional properties like SignaturePolicyIdentifier might exist\n}\n\n/**\n * Represents the Signed Properties structure.\n */\nexport interface SignedProperties {\n /** Target attribute, should be 'signature'. */\n Target: string\n /** ID attribute, should be 'id-xades-signed-props'. */\n Id: string\n /** Signed signature properties. */\n \"xades:SignedSignatureProperties\": SignedSignatureProperties\n}\n\n/**\n * Represents the Qualifying Properties structure (Object element).\n */\nexport interface QualifyingProperties {\n /** Target attribute, should be 'signature'. */\n Target: string\n /** Signed properties details. */\n \"xades:SignedProperties\": SignedProperties\n // Note: UnsignedProperties might exist but are not detailed in the mandatory part\n}\n\n/**\n * Represents the X509 Data structure within KeyInfo.\n */\nexport interface X509Data {\n /** Base64 encoded X509 certificate. */\n \"ds:X509Certificate\": string // base64binary\n}\n\n/**\n * Represents the Key Information structure.\n */\nexport interface KeyInfo {\n /** X509 certificate data. */\n \"ds:X509Data\": X509Data\n}\n\n/**\n * Represents the Transform structure within Reference.\n */\nexport interface Transform {\n /** Algorithm attribute for the transform. */\n Algorithm: string\n}\n\n/**\n * Represents a Reference within SignedInfo.\n */\nexport interface Reference {\n /** ID attribute for the reference (e.g., 'id-doc-signed-data', 'id-xades-signed-props'). */\n Id?: string\n /** URI attribute for the reference (e.g., '', '#id-xades-signed-props'). */\n URI: string\n /** Optional Transforms applied. */\n \"ds:Transforms\"?: {\n \"ds:Transform\": Transform | Transform[] // Can be single or multiple transforms\n }\n /** Digest method details. */\n \"ds:DigestMethod\": DigestMethod\n /** Base64 encoded digest value (DocDigest or PropsDigest). */\n \"ds:DigestValue\": string // base64binary\n}\n\n/**\n * Represents the Canonicalization Method structure.\n */\nexport interface CanonicalizationMethod {\n /** Algorithm used for canonicalization. Should be http://www.w3.org/2006/12/xml-c14n11 */\n Algorithm: string\n}\n\n/**\n * Represents the Signature Method structure.\n */\nexport interface SignatureMethod {\n /** Algorithm used for signing. Should be http://www.w3.org/2001/04/xmldsig-more#rsa-sha256 */\n Algorithm: string\n}\n\n/**\n * Represents the Signed Information structure.\n */\nexport interface SignedInfo {\n /** Canonicalization method details. */\n \"ds:CanonicalizationMethod\": CanonicalizationMethod\n /** Signature method details. */\n \"ds:SignatureMethod\": SignatureMethod\n /** References to signed data and properties. Should contain two references. */\n \"ds:Reference\": [Reference, Reference] // Expecting two: one for document, one for signed properties\n}\n\n/**\n * Represents the root Signature element (IssuerDigitalSignature).\n * Based on the documentation: https://sdk.myinvois.hasil.gov.my/signature/\n * Conforms to XAdES enveloped signature requirements for UBL.\n */\nexport interface IssuerDigitalSignature {\n /** ID attribute, should be 'DocSig'. */\n Id: string\n /** Signed information details. */\n \"ds:SignedInfo\": SignedInfo\n /** Base64 encoded signature value (Sig). */\n \"ds:SignatureValue\": string // base64binary\n /** Public key information (certificate). */\n \"ds:KeyInfo\": KeyInfo\n /** Object containing signed properties. */\n \"ds:Object\": {\n \"xades:QualifyingProperties\": QualifyingProperties\n }\n}\n"],"mappings":";;AAGA;AAQA;AAUiBE,UAlBAF,YAAAA,CAkBY;EAU7B;EAAqB,SAAA,EAAA,MAAA;;;AAIe;AAMpC;AAQA;AAWiBM,UAjDAL,UAAAA,CAiDgB;EAYjC;EAWA,iBAAyB,EAtEJD,YAsEI;EAQzB;EAQA,gBAA0B,EAAA,MAAA,EAAA;AAQ1B;;;;;AAUiC,UAhGhBE,YAAAA,CAgGgB;EAQjC;EAQA,mBAAiBW,EAAe,MAAA;EAQhC;EAA2B,qBAAA,EAAA,MAAA,EAAA;;;;;AAMY;AAQtBE,UA5HAZ,IAAAA,CA4HAY;EAAsB;EAAA,kBAIpBD,EA9HGb,UA8HHa;EAAU;EAIN,oBAGWP,EAnIVL,YAmIUK;AAAoB;;;;;UA7HrCH,kBAAAA;;gBAEDD;;;;;;UAMCE,yBAAAA;;;;8BAIaD;;;;;;;UAObE,gBAAAA;;;;;;qCAMoBD;;;;;;UAMpBE,oBAAAA;;;;4BAIWD;;;;;;;UAOXE,QAAAA;;;;;;;;UAQAC,OAAAA;;iBAEAD;;;;;;UAMAE,SAAAA;;;;;;;;UAQAC,SAAAA;;;;;;;oBAOGD,YAAYA;;;qBAGXV;;;;;;;;UAQJY,sBAAAA;;;;;;;;UAQAC,eAAAA;;;;;;;;UAQAC,UAAAA;;+BAEcF;;wBAEPC;;mBAELF,WAAWA;;;;;;;;UAQbI,sBAAAA;;;;mBAIED;;;;gBAIHL;;;kCAGkBF"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
//#region src/types/signatures.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents the Digest Method structure used within the signature.
|
|
4
|
+
*/
|
|
5
|
+
interface DigestMethod {
|
|
6
|
+
/** Algorithm used for digest. Should be http://www.w3.org/2001/04/xmlenc#sha256 */
|
|
7
|
+
Algorithm: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents the Cert Digest structure.
|
|
12
|
+
*/
|
|
13
|
+
interface CertDigest {
|
|
14
|
+
/** Digest method details. */
|
|
15
|
+
"ds:DigestMethod": DigestMethod;
|
|
16
|
+
/** Base64 encoded HEX-SHA256 certificate information (CertDigest). */
|
|
17
|
+
"ds:DigestValue": string; // base64binary
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Represents the Issuer Serial structure within the Signing Certificate.
|
|
22
|
+
*/
|
|
23
|
+
interface IssuerSerial {
|
|
24
|
+
/** CN of the certificate issuer (Organization name). */
|
|
25
|
+
"ds:X509IssuerName": string;
|
|
26
|
+
/** Digital certificate serial number. */
|
|
27
|
+
"ds:X509SerialNumber": string; // xsd:normalizedString -> string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Represents the Certificate structure within Signing Certificate.
|
|
32
|
+
*/
|
|
33
|
+
interface Cert {
|
|
34
|
+
/** Certificate digest details. */
|
|
35
|
+
"xades:CertDigest": CertDigest;
|
|
36
|
+
/** Issuer details. */
|
|
37
|
+
"xades:IssuerSerial": IssuerSerial;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Represents the Signing Certificate structure.
|
|
42
|
+
*/
|
|
43
|
+
interface SigningCertificate {
|
|
44
|
+
/** Certificate details. */
|
|
45
|
+
"xades:Cert": Cert;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Represents the Signed Signature Properties.
|
|
50
|
+
*/
|
|
51
|
+
interface SignedSignatureProperties {
|
|
52
|
+
/** UTC timestamp of signing (YYYY-MM-DDTHH:mm:ssZ). */
|
|
53
|
+
"xades:SigningTime": string; // dateTime
|
|
54
|
+
/** Signing certificate details. */
|
|
55
|
+
"xades:SigningCertificate": SigningCertificate;
|
|
56
|
+
// Note: Other optional properties like SignaturePolicyIdentifier might exist
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Represents the Signed Properties structure.
|
|
61
|
+
*/
|
|
62
|
+
interface SignedProperties {
|
|
63
|
+
/** Target attribute, should be 'signature'. */
|
|
64
|
+
Target: string;
|
|
65
|
+
/** ID attribute, should be 'id-xades-signed-props'. */
|
|
66
|
+
Id: string;
|
|
67
|
+
/** Signed signature properties. */
|
|
68
|
+
"xades:SignedSignatureProperties": SignedSignatureProperties;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Represents the Qualifying Properties structure (Object element).
|
|
73
|
+
*/
|
|
74
|
+
interface QualifyingProperties {
|
|
75
|
+
/** Target attribute, should be 'signature'. */
|
|
76
|
+
Target: string;
|
|
77
|
+
/** Signed properties details. */
|
|
78
|
+
"xades:SignedProperties": SignedProperties;
|
|
79
|
+
// Note: UnsignedProperties might exist but are not detailed in the mandatory part
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Represents the X509 Data structure within KeyInfo.
|
|
84
|
+
*/
|
|
85
|
+
interface X509Data {
|
|
86
|
+
/** Base64 encoded X509 certificate. */
|
|
87
|
+
"ds:X509Certificate": string; // base64binary
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Represents the Key Information structure.
|
|
92
|
+
*/
|
|
93
|
+
interface KeyInfo {
|
|
94
|
+
/** X509 certificate data. */
|
|
95
|
+
"ds:X509Data": X509Data;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Represents the Transform structure within Reference.
|
|
100
|
+
*/
|
|
101
|
+
interface Transform {
|
|
102
|
+
/** Algorithm attribute for the transform. */
|
|
103
|
+
Algorithm: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Represents a Reference within SignedInfo.
|
|
108
|
+
*/
|
|
109
|
+
interface Reference {
|
|
110
|
+
/** ID attribute for the reference (e.g., 'id-doc-signed-data', 'id-xades-signed-props'). */
|
|
111
|
+
Id?: string;
|
|
112
|
+
/** URI attribute for the reference (e.g., '', '#id-xades-signed-props'). */
|
|
113
|
+
URI: string;
|
|
114
|
+
/** Optional Transforms applied. */
|
|
115
|
+
"ds:Transforms"?: {
|
|
116
|
+
"ds:Transform": Transform | Transform[]; // Can be single or multiple transforms
|
|
117
|
+
};
|
|
118
|
+
/** Digest method details. */
|
|
119
|
+
"ds:DigestMethod": DigestMethod;
|
|
120
|
+
/** Base64 encoded digest value (DocDigest or PropsDigest). */
|
|
121
|
+
"ds:DigestValue": string; // base64binary
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Represents the Canonicalization Method structure.
|
|
126
|
+
*/
|
|
127
|
+
interface CanonicalizationMethod {
|
|
128
|
+
/** Algorithm used for canonicalization. Should be http://www.w3.org/2006/12/xml-c14n11 */
|
|
129
|
+
Algorithm: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Represents the Signature Method structure.
|
|
134
|
+
*/
|
|
135
|
+
interface SignatureMethod {
|
|
136
|
+
/** Algorithm used for signing. Should be http://www.w3.org/2001/04/xmldsig-more#rsa-sha256 */
|
|
137
|
+
Algorithm: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Represents the Signed Information structure.
|
|
142
|
+
*/
|
|
143
|
+
interface SignedInfo {
|
|
144
|
+
/** Canonicalization method details. */
|
|
145
|
+
"ds:CanonicalizationMethod": CanonicalizationMethod;
|
|
146
|
+
/** Signature method details. */
|
|
147
|
+
"ds:SignatureMethod": SignatureMethod;
|
|
148
|
+
/** References to signed data and properties. Should contain two references. */
|
|
149
|
+
"ds:Reference": [Reference, Reference]; // Expecting two: one for document, one for signed properties
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Represents the root Signature element (IssuerDigitalSignature).
|
|
154
|
+
* Based on the documentation: https://sdk.myinvois.hasil.gov.my/signature/
|
|
155
|
+
* Conforms to XAdES enveloped signature requirements for UBL.
|
|
156
|
+
*/
|
|
157
|
+
interface IssuerDigitalSignature {
|
|
158
|
+
/** ID attribute, should be 'DocSig'. */
|
|
159
|
+
Id: string;
|
|
160
|
+
/** Signed information details. */
|
|
161
|
+
"ds:SignedInfo": SignedInfo;
|
|
162
|
+
/** Base64 encoded signature value (Sig). */
|
|
163
|
+
"ds:SignatureValue": string; // base64binary
|
|
164
|
+
/** Public key information (certificate). */
|
|
165
|
+
"ds:KeyInfo": KeyInfo;
|
|
166
|
+
/** Object containing signed properties. */
|
|
167
|
+
"ds:Object": {
|
|
168
|
+
"xades:QualifyingProperties": QualifyingProperties;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
//#endregion
|
|
172
|
+
export { CanonicalizationMethod, Cert, CertDigest, DigestMethod, IssuerDigitalSignature, IssuerSerial, KeyInfo, QualifyingProperties, Reference, SignatureMethod, SignedInfo, SignedProperties, SignedSignatureProperties, SigningCertificate, Transform, X509Data };
|
|
173
|
+
//# sourceMappingURL=signatures-C9QPZTQd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signatures-C9QPZTQd.d.ts","names":["DigestMethod","CertDigest","IssuerSerial","Cert","SigningCertificate","SignedSignatureProperties","SignedProperties","QualifyingProperties","X509Data","KeyInfo","Transform","Reference","CanonicalizationMethod","SignatureMethod","SignedInfo","IssuerDigitalSignature"],"sources":["../src/types/signatures.d.ts"],"sourcesContent":["/**\n * Represents the Digest Method structure used within the signature.\n */\nexport interface DigestMethod {\n /** Algorithm used for digest. Should be http://www.w3.org/2001/04/xmlenc#sha256 */\n Algorithm: string\n}\n\n/**\n * Represents the Cert Digest structure.\n */\nexport interface CertDigest {\n /** Digest method details. */\n \"ds:DigestMethod\": DigestMethod\n /** Base64 encoded HEX-SHA256 certificate information (CertDigest). */\n \"ds:DigestValue\": string // base64binary\n}\n\n/**\n * Represents the Issuer Serial structure within the Signing Certificate.\n */\nexport interface IssuerSerial {\n /** CN of the certificate issuer (Organization name). */\n \"ds:X509IssuerName\": string\n /** Digital certificate serial number. */\n \"ds:X509SerialNumber\": string // xsd:normalizedString -> string\n}\n\n/**\n * Represents the Certificate structure within Signing Certificate.\n */\nexport interface Cert {\n /** Certificate digest details. */\n \"xades:CertDigest\": CertDigest\n /** Issuer details. */\n \"xades:IssuerSerial\": IssuerSerial\n}\n\n/**\n * Represents the Signing Certificate structure.\n */\nexport interface SigningCertificate {\n /** Certificate details. */\n \"xades:Cert\": Cert\n}\n\n/**\n * Represents the Signed Signature Properties.\n */\nexport interface SignedSignatureProperties {\n /** UTC timestamp of signing (YYYY-MM-DDTHH:mm:ssZ). */\n \"xades:SigningTime\": string // dateTime\n /** Signing certificate details. */\n \"xades:SigningCertificate\": SigningCertificate\n // Note: Other optional properties like SignaturePolicyIdentifier might exist\n}\n\n/**\n * Represents the Signed Properties structure.\n */\nexport interface SignedProperties {\n /** Target attribute, should be 'signature'. */\n Target: string\n /** ID attribute, should be 'id-xades-signed-props'. */\n Id: string\n /** Signed signature properties. */\n \"xades:SignedSignatureProperties\": SignedSignatureProperties\n}\n\n/**\n * Represents the Qualifying Properties structure (Object element).\n */\nexport interface QualifyingProperties {\n /** Target attribute, should be 'signature'. */\n Target: string\n /** Signed properties details. */\n \"xades:SignedProperties\": SignedProperties\n // Note: UnsignedProperties might exist but are not detailed in the mandatory part\n}\n\n/**\n * Represents the X509 Data structure within KeyInfo.\n */\nexport interface X509Data {\n /** Base64 encoded X509 certificate. */\n \"ds:X509Certificate\": string // base64binary\n}\n\n/**\n * Represents the Key Information structure.\n */\nexport interface KeyInfo {\n /** X509 certificate data. */\n \"ds:X509Data\": X509Data\n}\n\n/**\n * Represents the Transform structure within Reference.\n */\nexport interface Transform {\n /** Algorithm attribute for the transform. */\n Algorithm: string\n}\n\n/**\n * Represents a Reference within SignedInfo.\n */\nexport interface Reference {\n /** ID attribute for the reference (e.g., 'id-doc-signed-data', 'id-xades-signed-props'). */\n Id?: string\n /** URI attribute for the reference (e.g., '', '#id-xades-signed-props'). */\n URI: string\n /** Optional Transforms applied. */\n \"ds:Transforms\"?: {\n \"ds:Transform\": Transform | Transform[] // Can be single or multiple transforms\n }\n /** Digest method details. */\n \"ds:DigestMethod\": DigestMethod\n /** Base64 encoded digest value (DocDigest or PropsDigest). */\n \"ds:DigestValue\": string // base64binary\n}\n\n/**\n * Represents the Canonicalization Method structure.\n */\nexport interface CanonicalizationMethod {\n /** Algorithm used for canonicalization. Should be http://www.w3.org/2006/12/xml-c14n11 */\n Algorithm: string\n}\n\n/**\n * Represents the Signature Method structure.\n */\nexport interface SignatureMethod {\n /** Algorithm used for signing. Should be http://www.w3.org/2001/04/xmldsig-more#rsa-sha256 */\n Algorithm: string\n}\n\n/**\n * Represents the Signed Information structure.\n */\nexport interface SignedInfo {\n /** Canonicalization method details. */\n \"ds:CanonicalizationMethod\": CanonicalizationMethod\n /** Signature method details. */\n \"ds:SignatureMethod\": SignatureMethod\n /** References to signed data and properties. Should contain two references. */\n \"ds:Reference\": [Reference, Reference] // Expecting two: one for document, one for signed properties\n}\n\n/**\n * Represents the root Signature element (IssuerDigitalSignature).\n * Based on the documentation: https://sdk.myinvois.hasil.gov.my/signature/\n * Conforms to XAdES enveloped signature requirements for UBL.\n */\nexport interface IssuerDigitalSignature {\n /** ID attribute, should be 'DocSig'. */\n Id: string\n /** Signed information details. */\n \"ds:SignedInfo\": SignedInfo\n /** Base64 encoded signature value (Sig). */\n \"ds:SignatureValue\": string // base64binary\n /** Public key information (certificate). */\n \"ds:KeyInfo\": KeyInfo\n /** Object containing signed properties. */\n \"ds:Object\": {\n \"xades:QualifyingProperties\": QualifyingProperties\n }\n}\n"],"mappings":";;AAGA;AAQA;AAUiBE,UAlBAF,YAAAA,CAkBY;EAU7B;EAAqB,SAAA,EAAA,MAAA;;;AAIe;AAMpC;AAQA;AAWiBM,UAjDAL,UAAAA,CAiDgB;EAYjC;EAWA,iBAAyB,EAtEJD,YAsEI;EAQzB;EAQA,gBAA0B,EAAA,MAAA,EAAA;AAQ1B;;;;;AAUiC,UAhGhBE,YAAAA,CAgGgB;EAQjC;EAQA,mBAAiBW,EAAe,MAAA;EAQhC;EAA2B,qBAAA,EAAA,MAAA,EAAA;;;;;AAMY;AAQtBE,UA5HAZ,IAAAA,CA4HAY;EAAsB;EAAA,kBAIpBD,EA9HGb,UA8HHa;EAAU;EAIN,oBAGWP,EAnIVL,YAmIUK;AAAoB;;;;;UA7HrCH,kBAAAA;;gBAEDD;;;;;;UAMCE,yBAAAA;;;;8BAIaD;;;;;;;UAObE,gBAAAA;;;;;;qCAMoBD;;;;;;UAMpBE,oBAAAA;;;;4BAIWD;;;;;;;UAOXE,QAAAA;;;;;;;;UAQAC,OAAAA;;iBAEAD;;;;;;UAMAE,SAAAA;;;;;;;;UAQAC,SAAAA;;;;;;;oBAOGD,YAAYA;;;qBAGXV;;;;;;;;UAQJY,sBAAAA;;;;;;;;UAQAC,eAAAA;;;;;;;;UAQAC,UAAAA;;+BAEcF;;wBAEPC;;mBAELF,WAAWA;;;;;;;;UAQbI,sBAAAA;;;;mBAIED;;;;gBAIHL;;;kCAGkBF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region src/types/state-codes.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents the allowed codes for Malaysian states and federal territories.
|
|
4
|
+
* Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/state-codes/
|
|
5
|
+
*/
|
|
6
|
+
type StateCode = '01' // Johor
|
|
7
|
+
| '02' // Kedah
|
|
8
|
+
| '03' // Kelantan
|
|
9
|
+
| '04' // Melaka
|
|
10
|
+
| '05' // Negeri Sembilan
|
|
11
|
+
| '06' // Pahang
|
|
12
|
+
| '07' // Pulau Pinang
|
|
13
|
+
| '08' // Perak
|
|
14
|
+
| '09' // Perlis
|
|
15
|
+
| '10' // Selangor
|
|
16
|
+
| '11' // Terengganu
|
|
17
|
+
| '12' // Sabah
|
|
18
|
+
| '13' // Sarawak
|
|
19
|
+
| '14' // Wilayah Persekutuan Kuala Lumpur
|
|
20
|
+
| '15' // Wilayah Persekutuan Labuan
|
|
21
|
+
| '16' // Wilayah Persekutuan Putrajaya
|
|
22
|
+
| '17'; // Not Applicable
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Enum representing the allowed state codes with descriptive names.
|
|
26
|
+
* Provides a more readable way to reference states.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* const code = StateCodeEnum.Selangor;
|
|
30
|
+
* console.log(code); // Output: "10"
|
|
31
|
+
*/
|
|
32
|
+
declare enum StateCodeEnum {
|
|
33
|
+
Johor = '01',
|
|
34
|
+
Kedah = '02',
|
|
35
|
+
Kelantan = '03',
|
|
36
|
+
Melaka = '04',
|
|
37
|
+
NegeriSembilan = '05',
|
|
38
|
+
Pahang = '06',
|
|
39
|
+
PulauPinang = '07',
|
|
40
|
+
Perak = '08',
|
|
41
|
+
Perlis = '09',
|
|
42
|
+
Selangor = '10',
|
|
43
|
+
Terengganu = '11',
|
|
44
|
+
Sabah = '12',
|
|
45
|
+
Sarawak = '13',
|
|
46
|
+
WPKualaLumpur = '14',
|
|
47
|
+
WPLabuan = '15',
|
|
48
|
+
WPPutrajaya = '16',
|
|
49
|
+
NotApplicable = '17',
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Interface representing a state code entry.
|
|
54
|
+
* Contains the code and its corresponding name.
|
|
55
|
+
*/
|
|
56
|
+
interface State {
|
|
57
|
+
code: StateCode;
|
|
58
|
+
name: string;
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { State, StateCode, StateCodeEnum };
|
|
62
|
+
//# sourceMappingURL=state-codes-CxG1S9YY.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-codes-CxG1S9YY.d.ts","names":["StateCode","StateCodeEnum","State"],"sources":["../src/types/state-codes.d.ts"],"sourcesContent":["/**\n * Represents the allowed codes for Malaysian states and federal territories.\n * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/state-codes/\n */\nexport type StateCode =\n | '01' // Johor\n | '02' // Kedah\n | '03' // Kelantan\n | '04' // Melaka\n | '05' // Negeri Sembilan\n | '06' // Pahang\n | '07' // Pulau Pinang\n | '08' // Perak\n | '09' // Perlis\n | '10' // Selangor\n | '11' // Terengganu\n | '12' // Sabah\n | '13' // Sarawak\n | '14' // Wilayah Persekutuan Kuala Lumpur\n | '15' // Wilayah Persekutuan Labuan\n | '16' // Wilayah Persekutuan Putrajaya\n | '17' // Not Applicable\n\n/**\n * Enum representing the allowed state codes with descriptive names.\n * Provides a more readable way to reference states.\n *\n * @example\n * const code = StateCodeEnum.Selangor;\n * console.log(code); // Output: \"10\"\n */\nexport enum StateCodeEnum {\n Johor = '01',\n Kedah = '02',\n Kelantan = '03',\n Melaka = '04',\n NegeriSembilan = '05',\n Pahang = '06',\n PulauPinang = '07',\n Perak = '08',\n Perlis = '09',\n Selangor = '10',\n Terengganu = '11',\n Sabah = '12',\n Sarawak = '13',\n WPKualaLumpur = '14',\n WPLabuan = '15',\n WPPutrajaya = '16',\n NotApplicable = '17',\n}\n\n/**\n * Interface representing a state code entry.\n * Contains the code and its corresponding name.\n */\nexport interface State {\n code: StateCode\n name: string\n}\n"],"mappings":";;AAIA;AA2BA;AAwBA;KAnDYA,SAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;aA2BAC,aAAAA;;;;;;;;;;;;;;;;;;;;;;;;UAwBKC,KAAAA;QACTF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region src/types/state-codes.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents the allowed codes for Malaysian states and federal territories.
|
|
4
|
+
* Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/state-codes/
|
|
5
|
+
*/
|
|
6
|
+
type StateCode = '01' // Johor
|
|
7
|
+
| '02' // Kedah
|
|
8
|
+
| '03' // Kelantan
|
|
9
|
+
| '04' // Melaka
|
|
10
|
+
| '05' // Negeri Sembilan
|
|
11
|
+
| '06' // Pahang
|
|
12
|
+
| '07' // Pulau Pinang
|
|
13
|
+
| '08' // Perak
|
|
14
|
+
| '09' // Perlis
|
|
15
|
+
| '10' // Selangor
|
|
16
|
+
| '11' // Terengganu
|
|
17
|
+
| '12' // Sabah
|
|
18
|
+
| '13' // Sarawak
|
|
19
|
+
| '14' // Wilayah Persekutuan Kuala Lumpur
|
|
20
|
+
| '15' // Wilayah Persekutuan Labuan
|
|
21
|
+
| '16' // Wilayah Persekutuan Putrajaya
|
|
22
|
+
| '17'; // Not Applicable
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Enum representing the allowed state codes with descriptive names.
|
|
26
|
+
* Provides a more readable way to reference states.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* const code = StateCodeEnum.Selangor;
|
|
30
|
+
* console.log(code); // Output: "10"
|
|
31
|
+
*/
|
|
32
|
+
declare enum StateCodeEnum {
|
|
33
|
+
Johor = '01',
|
|
34
|
+
Kedah = '02',
|
|
35
|
+
Kelantan = '03',
|
|
36
|
+
Melaka = '04',
|
|
37
|
+
NegeriSembilan = '05',
|
|
38
|
+
Pahang = '06',
|
|
39
|
+
PulauPinang = '07',
|
|
40
|
+
Perak = '08',
|
|
41
|
+
Perlis = '09',
|
|
42
|
+
Selangor = '10',
|
|
43
|
+
Terengganu = '11',
|
|
44
|
+
Sabah = '12',
|
|
45
|
+
Sarawak = '13',
|
|
46
|
+
WPKualaLumpur = '14',
|
|
47
|
+
WPLabuan = '15',
|
|
48
|
+
WPPutrajaya = '16',
|
|
49
|
+
NotApplicable = '17',
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Interface representing a state code entry.
|
|
54
|
+
* Contains the code and its corresponding name.
|
|
55
|
+
*/
|
|
56
|
+
interface State {
|
|
57
|
+
code: StateCode;
|
|
58
|
+
name: string;
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { State, StateCode, StateCodeEnum };
|
|
62
|
+
//# sourceMappingURL=state-codes-DXSWtE6a.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-codes-DXSWtE6a.d.cts","names":["StateCode","StateCodeEnum","State"],"sources":["../src/types/state-codes.d.ts"],"sourcesContent":["/**\n * Represents the allowed codes for Malaysian states and federal territories.\n * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/state-codes/\n */\nexport type StateCode =\n | '01' // Johor\n | '02' // Kedah\n | '03' // Kelantan\n | '04' // Melaka\n | '05' // Negeri Sembilan\n | '06' // Pahang\n | '07' // Pulau Pinang\n | '08' // Perak\n | '09' // Perlis\n | '10' // Selangor\n | '11' // Terengganu\n | '12' // Sabah\n | '13' // Sarawak\n | '14' // Wilayah Persekutuan Kuala Lumpur\n | '15' // Wilayah Persekutuan Labuan\n | '16' // Wilayah Persekutuan Putrajaya\n | '17' // Not Applicable\n\n/**\n * Enum representing the allowed state codes with descriptive names.\n * Provides a more readable way to reference states.\n *\n * @example\n * const code = StateCodeEnum.Selangor;\n * console.log(code); // Output: \"10\"\n */\nexport enum StateCodeEnum {\n Johor = '01',\n Kedah = '02',\n Kelantan = '03',\n Melaka = '04',\n NegeriSembilan = '05',\n Pahang = '06',\n PulauPinang = '07',\n Perak = '08',\n Perlis = '09',\n Selangor = '10',\n Terengganu = '11',\n Sabah = '12',\n Sarawak = '13',\n WPKualaLumpur = '14',\n WPLabuan = '15',\n WPPutrajaya = '16',\n NotApplicable = '17',\n}\n\n/**\n * Interface representing a state code entry.\n * Contains the code and its corresponding name.\n */\nexport interface State {\n code: StateCode\n name: string\n}\n"],"mappings":";;AAIA;AA2BA;AAwBA;KAnDYA,SAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;aA2BAC,aAAAA;;;;;;;;;;;;;;;;;;;;;;;;UAwBKC,KAAAA;QACTF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//#region src/types/tax-types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents the allowed codes for tax types.
|
|
4
|
+
* Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/tax-types/
|
|
5
|
+
*/
|
|
6
|
+
type TaxTypeCode = '01' // Sales Tax
|
|
7
|
+
| '02' // Service Tax
|
|
8
|
+
| '03' // Tourism Tax
|
|
9
|
+
| '04' // High-Value Goods Tax
|
|
10
|
+
| '05' // Sales Tax on Low Value Goods
|
|
11
|
+
| '06' // Not Applicable
|
|
12
|
+
| 'E'; // Tax exemption (where applicable)
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Enum representing the allowed tax type codes with descriptive names.
|
|
16
|
+
* Provides a more readable way to reference tax types.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* const code = TaxTypeCodeEnum.SalesTax;
|
|
20
|
+
* console.log(code); // Output: "01"
|
|
21
|
+
*/
|
|
22
|
+
declare enum TaxTypeCodeEnum {
|
|
23
|
+
SalesTax = '01',
|
|
24
|
+
ServiceTax = '02',
|
|
25
|
+
TourismTax = '03',
|
|
26
|
+
HighValueGoodsTax = '04',
|
|
27
|
+
SalesTaxLowValueGoods = '05',
|
|
28
|
+
NotApplicable = '06',
|
|
29
|
+
TaxExemption = 'E',
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Interface representing a tax type entry.
|
|
34
|
+
* Contains the code and its corresponding description.
|
|
35
|
+
*/
|
|
36
|
+
interface TaxType {
|
|
37
|
+
code: TaxTypeCode;
|
|
38
|
+
description: string;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { TaxType, TaxTypeCode, TaxTypeCodeEnum };
|
|
42
|
+
//# sourceMappingURL=tax-types-CEpfSh5P.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tax-types-CEpfSh5P.d.ts","names":["TaxTypeCode","TaxTypeCodeEnum","TaxType"],"sources":["../src/types/tax-types.d.ts"],"sourcesContent":["/**\n * Represents the allowed codes for tax types.\n * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/tax-types/\n */\nexport type TaxTypeCode =\n | '01' // Sales Tax\n | '02' // Service Tax\n | '03' // Tourism Tax\n | '04' // High-Value Goods Tax\n | '05' // Sales Tax on Low Value Goods\n | '06' // Not Applicable\n | 'E' // Tax exemption (where applicable)\n\n/**\n * Enum representing the allowed tax type codes with descriptive names.\n * Provides a more readable way to reference tax types.\n *\n * @example\n * const code = TaxTypeCodeEnum.SalesTax;\n * console.log(code); // Output: \"01\"\n */\nexport enum TaxTypeCodeEnum {\n SalesTax = '01',\n ServiceTax = '02',\n TourismTax = '03',\n HighValueGoodsTax = '04',\n SalesTaxLowValueGoods = '05',\n NotApplicable = '06',\n TaxExemption = 'E',\n}\n\n/**\n * Interface representing a tax type entry.\n * Contains the code and its corresponding description.\n */\nexport interface TaxType {\n code: TaxTypeCode\n description: string\n}\n"],"mappings":";;AAIA;AAiBA;AAcA;KA/BYA,WAAAA;;;;;;;;;;;;;;;;aAiBAC,eAAAA;;;;;;;;;;;;;;UAcKC,OAAAA;QACTF"}
|