@ripwords/myinvois-client 0.1.0 → 0.1.3
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/CHANGELOG.md +111 -0
- package/README.md +128 -4
- package/bun.lock +59 -0
- package/dist/{0X-Yw7mZEro.d.cts → 0X-CTIq3y3a.d.ts} +1 -2
- package/dist/{0X-C4IRh_fJ.d.ts → 0X-Cr3M7hci.d.cts} +1 -1
- package/dist/{1X-D_aUVsuM.d.cts → 1X-Bu4oiv8D.d.ts} +1 -2
- package/dist/{1X-C-_KHV-Q.d.ts → 1X-BywXCqtn.d.ts} +1 -2
- package/dist/{1X-Brnls9Jh.d.ts → 1X-CWwmfCzo.d.cts} +1 -1
- package/dist/{1X-BwpSoT3o.d.cts → 1X-ClnJ79HH.d.cts} +1 -1
- package/dist/{2X-DkS1BoE5.d.ts → 2X-3fSEGIuE.d.ts} +1 -2
- package/dist/{2X-Bb6elyzV.d.cts → 2X-CV9eYhog.d.cts} +1 -1
- package/dist/{2X-UdQcQW24.d.ts → 2X-DNtkJ0tj.d.cts} +1 -1
- package/dist/{2X-hClUyw26.d.cts → 2X-DnG3FY1f.d.ts} +1 -2
- package/dist/{3X-C7VFD-n-.d.cts → 3X--VWVsC84.d.cts} +1 -1
- package/dist/{3X-CLMESDvz.d.cts → 3X-BOxfatu3.d.cts} +1 -1
- package/dist/{3X-DVDyspgb.d.ts → 3X-CLdmoel1.d.ts} +1 -2
- package/dist/{3X-DFI-4RQQ.d.ts → 3X-Ynjfgoll.d.ts} +1 -2
- package/dist/{4X-DIfvpU6V.d.cts → 4X-B5ePdMky.d.ts} +1 -2
- package/dist/{4X-CvScPJTf.d.cts → 4X-BTG6o1Gn.d.ts} +1 -2
- package/dist/{4X-CIJ2JJ2w.d.ts → 4X-By9PzHaY.d.cts} +1 -1
- package/dist/{4X-CUR8jlaZ.d.ts → 4X-C7fzDWJ_.d.cts} +1 -1
- package/dist/{5X-BOUxhadJ.d.cts → 5X-B5M0Cv_K.d.cts} +1 -1
- package/dist/{5X-C6db432h.d.ts → 5X-CNAFsDm2.d.cts} +1 -1
- package/dist/{5X-CkLu7Vyd.d.cts → 5X-CjSz1zxJ.d.ts} +1 -2
- package/dist/{5X-COsZHUaQ.d.ts → 5X-dhP6fyou.d.ts} +1 -2
- package/dist/{6X-Mf32k1d0.d.cts → 6X-B9KP_vEn.d.ts} +1 -2
- package/dist/{6X-DE7RJeV6.d.cts → 6X-BHaY0TCf.d.ts} +1 -2
- package/dist/{6X-ClZDKOTC.d.ts → 6X-C3elgd-n.d.cts} +1 -1
- package/dist/{6X-C_fFIcJC.d.ts → 6X-uObUP4VG.d.cts} +1 -1
- package/dist/{7X-DoCUcp-J.d.cts → 7X-BifJnY24.d.cts} +1 -1
- package/dist/{7X-Chtd6B66.d.cts → 7X-C4eX_tAk.d.ts} +1 -2
- package/dist/{7X-BZyesooz.d.ts → 7X-D3idQBl9.d.cts} +1 -1
- package/dist/{7X-kot_VccM.d.ts → 7X-DtkQutx2.d.ts} +1 -2
- package/dist/{8X-Dr9RunRw.d.cts → 8X-5n9seY3z.d.ts} +1 -2
- package/dist/{8X-DkuKAkHz.d.ts → 8X-C6UMFvQW.d.cts} +1 -1
- package/dist/{8X-DqZyMvyV.d.cts → 8X-D6HTLShY.d.ts} +1 -2
- package/dist/{8X-Df4DOBOe.d.ts → 8X-DioBXCJ0.d.cts} +1 -1
- package/dist/{9X-BaoZtjWF.d.cts → 9X-BjffnXuq.d.cts} +1 -1
- package/dist/{9X-BDgifncF.d.ts → 9X-CHZKsIdD.d.ts} +1 -2
- package/dist/{9X-BcAb6Uso.d.cts → 9X-CJjPJgIG.d.cts} +1 -1
- package/dist/{9X-BhBWlgxG.d.ts → 9X-Cpb6V4JC.d.ts} +1 -2
- package/dist/{AX-D6XHWdrY.d.ts → AX-C0w_r3PA.d.ts} +1 -2
- package/dist/{AX-BY72FohC.d.cts → AX-DrEd2Ov6.d.cts} +1 -1
- package/dist/{BX-D_0C8Qbd.d.ts → BX-C5jc6myN.d.cts} +1 -1
- package/dist/{BX-CA0OmrUZ.d.cts → BX-RadlZ-6m.d.ts} +1 -2
- package/dist/{CX-glpQSL8x.d.cts → CX-CT1Zzb9D.d.ts} +1 -2
- package/dist/{CX-HH4cSZRX.d.ts → CX-oSgvmn3h.d.cts} +1 -1
- package/dist/{DX-Dx22ax_I.d.ts → DX-CtUeTKMM.d.ts} +1 -2
- package/dist/{DX-DimL1MDM.d.cts → DX-ZIG0enmK.d.cts} +1 -1
- package/dist/{EX-BRWh1wFc.d.ts → EX-084Yu7Wt.d.ts} +1 -2
- package/dist/{EX-Cx87Ruxl.d.cts → EX-BpWZ5ADq.d.cts} +1 -1
- package/dist/{FX-RmjwAr40.d.ts → FX-BrbQM0CW.d.ts} +1 -2
- package/dist/{FX-D81UlxNN.d.cts → FX-CvYBEc51.d.cts} +1 -1
- package/dist/{GX-CJyo7oDp.d.ts → GX-CU8PZy0G.d.cts} +1 -1
- package/dist/{GX-9i7piP9G.d.cts → GX-gKj8iAAh.d.ts} +1 -2
- package/dist/{HX-XALBTdLA.d.ts → HX-9D-ZXTy5.d.ts} +1 -2
- package/dist/{HX-20GVJAvl.d.cts → HX-DoEErDeE.d.cts} +1 -1
- package/dist/{IX-D54NGPsc.d.cts → IX-DR4Fc92A.d.ts} +1 -2
- package/dist/{IX-6SZ55QKb.d.ts → IX-jLAUHe8i.d.cts} +1 -1
- package/dist/{JX-hQ1XRmLp.d.ts → JX-DIKa9ma-.d.ts} +1 -2
- package/dist/{JX-C1RYcwQX.d.cts → JX-DX8BjYQC.d.cts} +1 -1
- package/dist/{KX-BNwunEfn.d.ts → KX-DpsJ_unT.d.ts} +1 -2
- package/dist/{KX-gQHCIgtQ.d.cts → KX-fZb4_vhw.d.cts} +1 -1
- package/dist/{LX-CHYX3X3J.d.ts → LX-D_mI1bk-.d.cts} +1 -1
- package/dist/{LX-CPurJGIh.d.cts → LX-DeXPPWUX.d.ts} +1 -2
- package/dist/{MX-BnyW5eHf.d.cts → MX-CKMjg_zK.d.ts} +1 -2
- package/dist/{MX-BPGLWSUz.d.ts → MX-DlYZhpkT.d.cts} +1 -1
- package/dist/{NX-B11fQuco.d.cts → NX-DELEEbad.d.cts} +1 -1
- package/dist/{NX-RulN5Ml3.d.ts → NX-oYdb4NDo.d.ts} +1 -2
- package/dist/{OX-T-ydRXQS.d.cts → OX-Bid9es3D.d.ts} +1 -2
- package/dist/{OX-DgKVSp7I.d.ts → OX-CKPyrIFf.d.cts} +1 -1
- package/dist/{PX-DA4A2kEv.d.ts → PX-D7jy9CFk.d.ts} +1 -2
- package/dist/{PX-p0n1SzvU.d.cts → PX-SP6NxBtG.d.cts} +1 -1
- package/dist/{QX-DrFqsMEs.d.ts → QX-BFWOR4g3.d.ts} +1 -2
- package/dist/{QX-CI1NccIB.d.cts → QX-QZA7E2O-.d.cts} +1 -1
- package/dist/{RX-Cm7vFcFN.d.ts → RX-DBcgbdeE.d.cts} +1 -1
- package/dist/{RX-DnNKol22.d.cts → RX-XHgCyMV1.d.ts} +1 -2
- package/dist/{SX-CsPPTu-W.d.ts → SX-Cl8RN8oH.d.ts} +1 -2
- package/dist/{SX-BUjiWQYz.d.cts → SX-DmiJeCMN.d.cts} +1 -1
- package/dist/{TX-DCY25MdR.d.ts → TX-C1SoDobK.d.cts} +1 -1
- package/dist/{TX-DOEpsf05.d.cts → TX-ZymoIbtr.d.ts} +1 -2
- package/dist/{UX-DgUOnTFK.d.cts → UX-D-Ndd1ov.d.ts} +1 -2
- package/dist/{UX-DauyagHy.d.ts → UX-DFVynFhQ.d.cts} +1 -1
- package/dist/{VX-kUX6LM-3.d.cts → VX-B-1b34r7.d.ts} +1 -2
- package/dist/{VX-DD4scgCe.d.ts → VX-DsRum5k3.d.cts} +1 -1
- package/dist/{WX-DPfyPFFh.d.cts → WX-0GuMjPNZ.d.ts} +1 -2
- package/dist/{WX-CjkoppdY.d.ts → WX-VReU5R5M.d.cts} +1 -1
- package/dist/{XX-C4C1gQZH.d.cts → XX-CF2NANsy.d.ts} +1 -2
- package/dist/{XX-sbsIUOnA.d.ts → XX-ChAviUMj.d.cts} +1 -1
- package/dist/{YX-DUdO8mRC.d.ts → YX-B51BbNSg.d.ts} +1 -2
- package/dist/{YX-BeT-LsiA.d.cts → YX-QfzeMEKx.d.cts} +1 -1
- package/dist/{ZX-DwfcSA-D.d.ts → ZX-BMJS1iAv.d.ts} +1 -2
- package/dist/{ZX-BuVTTq-D.d.cts → ZX-Ca2E726a.d.cts} +1 -1
- package/dist/api/platform/platformLogin.d.ts +58 -60
- package/dist/api/platform/platformLogin.js +1 -1
- package/dist/certificate-DFK-788s.cjs +62 -0
- package/dist/certificate-DFK-788s.cjs.map +1 -0
- package/dist/certificate-aooIRf9A.js +49 -0
- package/dist/{classification-codes-C2X4xW5-.d.ts → classification-codes-BKxV-rO9.d.ts} +1 -2
- package/dist/{country-code-DsI8Mbzx.d.ts → country-code-CQuaiQm2.d.ts} +1 -2
- package/dist/{currencies-DKuDflOO.d.ts → currencies-BYJK-m6v.d.ts} +1 -2
- package/dist/document-CARHiGdp.cjs +472 -0
- package/dist/document-CARHiGdp.cjs.map +1 -0
- package/dist/document-D6VKMAtx.js +405 -0
- package/dist/documents-CJ8hqIGH.d.ts +858 -0
- package/dist/documents-MGs0EvXh.d.cts +859 -0
- package/dist/{e-invoice-C2TxhyrK.d.ts → e-invoice-CmbLQkHw.d.ts} +1 -2
- package/dist/{getBaseUrl-Dx6RDC8I.js → getBaseUrl-R3IdgCu3.js} +1 -2
- package/dist/{index-B1DSs-wd.d.cts → index-0-EvC6Nv.d.ts} +1 -2
- package/dist/{index-FTgB2nM6.d.ts → index-D2_HVwCz.d.cts} +1 -1
- package/dist/index.cjs +308 -12
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +233 -60
- package/dist/index.js +306 -11
- package/dist/index10.cjs +0 -34
- package/dist/index11.cjs +25 -15
- package/dist/index11.cjs.map +1 -1
- package/dist/index12.cjs +24 -0
- package/dist/index12.cjs.map +1 -0
- package/dist/index13.cjs +0 -13
- package/dist/index15.cjs +3 -2
- package/dist/index16.cjs +12 -16
- package/dist/index17.cjs +2 -2
- package/dist/index18.cjs +336 -204
- package/dist/index18.cjs.map +1 -1
- package/dist/index19.cjs +325 -105
- package/dist/index19.cjs.map +1 -1
- package/dist/index20.cjs +136 -133
- package/dist/index20.cjs.map +1 -1
- package/dist/index21.cjs +203 -59
- package/dist/index21.cjs.map +1 -1
- package/dist/index22.cjs +104 -262
- package/dist/index22.cjs.map +1 -1
- package/dist/index23.cjs +132 -74
- package/dist/index23.cjs.map +1 -1
- package/dist/index24.cjs +59 -102
- package/dist/index24.cjs.map +1 -1
- package/dist/index25.cjs +262 -68
- package/dist/index25.cjs.map +1 -1
- package/dist/index26.cjs +74 -107
- package/dist/index26.cjs.map +1 -1
- package/dist/index27.cjs +102 -95
- package/dist/index27.cjs.map +1 -1
- package/dist/index28.cjs +68 -13
- package/dist/index28.cjs.map +1 -1
- package/dist/index29.cjs +107 -33
- package/dist/index29.cjs.map +1 -1
- package/dist/index30.cjs +95 -14
- package/dist/index30.cjs.map +1 -1
- package/dist/index31.cjs +11 -22
- package/dist/index31.cjs.map +1 -1
- package/dist/index32.cjs +31 -13
- package/dist/index32.cjs.map +1 -1
- package/dist/index33.cjs +12 -7
- package/dist/index33.cjs.map +1 -1
- package/dist/index34.cjs +22 -7
- package/dist/index34.cjs.map +1 -1
- package/dist/index35.cjs +13 -10
- package/dist/index35.cjs.map +1 -1
- package/dist/index36.cjs +7 -6
- package/dist/index36.cjs.map +1 -1
- package/dist/index37.cjs +7 -101
- package/dist/index37.cjs.map +1 -1
- package/dist/index38.cjs +10 -106
- package/dist/index38.cjs.map +1 -1
- package/dist/index39.cjs +6 -119
- package/dist/index39.cjs.map +1 -1
- package/dist/index40.cjs +101 -106
- package/dist/index40.cjs.map +1 -1
- package/dist/index41.cjs +106 -98
- package/dist/index41.cjs.map +1 -1
- package/dist/index42.cjs +119 -118
- package/dist/index42.cjs.map +1 -1
- package/dist/index43.cjs +106 -127
- package/dist/index43.cjs.map +1 -1
- package/dist/index44.cjs +98 -117
- package/dist/index44.cjs.map +1 -1
- package/dist/index45.cjs +118 -14
- package/dist/index45.cjs.map +1 -1
- package/dist/index46.cjs +127 -95
- package/dist/index46.cjs.map +1 -1
- package/dist/index47.cjs +117 -142
- package/dist/index47.cjs.map +1 -1
- package/dist/index48.cjs +14 -114
- package/dist/index48.cjs.map +1 -1
- package/dist/index49.cjs +95 -144
- package/dist/index49.cjs.map +1 -1
- package/dist/index5.cjs +0 -25
- package/dist/index50.cjs +142 -113
- package/dist/index50.cjs.map +1 -1
- package/dist/index51.cjs +114 -17
- package/dist/index51.cjs.map +1 -1
- package/dist/index52.cjs +144 -112
- package/dist/index52.cjs.map +1 -1
- package/dist/index53.cjs +113 -47
- package/dist/index53.cjs.map +1 -1
- package/dist/index54.cjs +17 -14
- package/dist/index54.cjs.map +1 -1
- package/dist/index55.cjs +112 -28
- package/dist/index55.cjs.map +1 -1
- package/dist/index56.cjs +47 -22
- package/dist/index56.cjs.map +1 -1
- package/dist/index57.cjs +14 -9
- package/dist/index57.cjs.map +1 -1
- package/dist/index58.cjs +28 -8
- package/dist/index58.cjs.map +1 -1
- package/dist/index58.cts.map +1 -0
- package/dist/index59.cjs +22 -17
- package/dist/index59.cjs.map +1 -1
- package/dist/index59.cts.map +1 -1
- package/dist/index6.cjs +25 -0
- package/dist/{index5.cjs.map → index6.cjs.map} +1 -1
- package/dist/index60.cjs +9 -412
- package/dist/index60.cjs.map +1 -1
- package/dist/index60.cts.map +1 -0
- package/dist/index61.cjs +8 -8
- package/dist/index61.cjs.map +1 -1
- package/dist/index61.cts.map +1 -0
- package/dist/index62.cjs +17 -9
- package/dist/index62.cjs.map +1 -1
- package/dist/index62.cts.map +1 -1
- package/dist/index63.cjs +419 -0
- package/dist/index63.cjs.map +1 -0
- package/dist/index63.cts.map +1 -1
- package/dist/index64.cjs +15 -0
- package/dist/index64.cjs.map +1 -0
- package/dist/index64.cts.map +1 -1
- package/dist/index65.cjs +10 -116
- package/dist/index65.cjs.map +1 -1
- package/dist/index65.cts.map +1 -1
- package/dist/index66.cjs +2 -228
- package/dist/index66.cts.map +1 -1
- package/dist/index8.cjs +0 -25
- package/dist/index9.cjs +25 -0
- package/dist/{index8.cjs.map → index9.cjs.map} +1 -1
- package/dist/msic-codes-C8PJVOaA.d.ts +25 -0
- package/dist/{msic-codes-B_1W6lZF.d.cts → msic-codes-CIKdPqag.d.cts} +11 -11
- package/dist/{payment-modes-DHihrywe.d.cts → payment-modes-BOTSRC_X.d.ts} +1 -2
- package/dist/{payment-modes-B8dNy3SM.d.ts → payment-modes-ghFEXnUl.d.cts} +1 -1
- package/dist/platformLogin-PGzMhw1X.cjs.map +1 -1
- package/dist/{platformLogin-DsxWWUXr.js → platformLogin-f0bNAoZI.js} +1 -2
- package/dist/{signatures-C9QPZTQd.d.ts → signatures-W-_brwdb.d.ts} +1 -2
- package/dist/{signatures-BKi9DP2K.d.cts → signatures-hFbt_std.d.cts} +1 -1
- package/dist/{state-codes-DXSWtE6a.d.cts → state-codes-BlILGZ9d.d.cts} +1 -1
- package/dist/{state-codes-CxG1S9YY.d.ts → state-codes-oeFKlwXZ.d.ts} +1 -2
- package/dist/{tax-types-CgwxONDS.d.cts → tax-types-B5sQ8UyN.d.cts} +1 -1
- package/dist/{tax-types-CEpfSh5P.d.ts → tax-types-CsQ76JMf.d.ts} +1 -2
- package/dist/types/classification-codes.d.ts +1 -1
- package/dist/types/country-code.d.ts +1 -1
- package/dist/types/currencies.d.ts +1 -1
- package/dist/types/documents.d.ts +18 -0
- package/dist/types/e-invoice.d.ts +1 -1
- package/dist/types/index.d.ts +58 -59
- package/dist/types/msic/0X.d.ts +1 -1
- package/dist/types/msic/1X.d.ts +1 -1
- package/dist/types/msic/2X.d.ts +1 -1
- package/dist/types/msic/3X.d.ts +1 -1
- package/dist/types/msic/4X.d.ts +1 -1
- package/dist/types/msic/5X.d.ts +1 -1
- package/dist/types/msic/6X.d.ts +1 -1
- package/dist/types/msic/7X.d.ts +1 -1
- package/dist/types/msic/8X.d.ts +1 -1
- package/dist/types/msic/9X.d.ts +1 -1
- package/dist/types/msic-codes.d.ts +11 -11
- package/dist/types/payment-modes.d.ts +1 -1
- package/dist/types/signatures.d.ts +1 -1
- package/dist/types/state-codes.d.ts +1 -1
- package/dist/types/tax-types.d.ts +1 -1
- package/dist/types/unit/1X.d.ts +1 -1
- package/dist/types/unit/2X.d.ts +1 -1
- package/dist/types/unit/3X.d.ts +1 -1
- package/dist/types/unit/4X.d.ts +1 -1
- package/dist/types/unit/5X.d.ts +1 -1
- package/dist/types/unit/6X.d.ts +1 -1
- package/dist/types/unit/7X.d.ts +1 -1
- package/dist/types/unit/8X.d.ts +1 -1
- package/dist/types/unit/9X.d.ts +1 -1
- package/dist/types/unit/AX.d.ts +1 -1
- package/dist/types/unit/BX.d.ts +1 -1
- package/dist/types/unit/CX.d.ts +1 -1
- package/dist/types/unit/DX.d.ts +1 -1
- package/dist/types/unit/EX.d.ts +1 -1
- package/dist/types/unit/FX.d.ts +1 -1
- package/dist/types/unit/GX.d.ts +1 -1
- package/dist/types/unit/HX.d.ts +1 -1
- package/dist/types/unit/IX.d.ts +1 -1
- package/dist/types/unit/JX.d.ts +1 -1
- package/dist/types/unit/KX.d.ts +1 -1
- package/dist/types/unit/LX.d.ts +1 -1
- package/dist/types/unit/MX.d.ts +1 -1
- package/dist/types/unit/NX.d.ts +1 -1
- package/dist/types/unit/OX.d.ts +1 -1
- package/dist/types/unit/PX.d.ts +1 -1
- package/dist/types/unit/QX.d.ts +1 -1
- package/dist/types/unit/RX.d.ts +1 -1
- package/dist/types/unit/SX.d.ts +1 -1
- package/dist/types/unit/TX.d.ts +1 -1
- package/dist/types/unit/UX.d.ts +1 -1
- package/dist/types/unit/VX.d.ts +1 -1
- package/dist/types/unit/WX.d.ts +1 -1
- package/dist/types/unit/XX.d.ts +1 -1
- package/dist/types/unit/YX.d.ts +1 -1
- package/dist/types/unit/ZX.d.ts +1 -1
- package/dist/types/unit-types.d.ts +36 -36
- package/dist/unit-types-B41YFOLT.d.ts +55 -0
- package/dist/unit-types-CjWNk2wS.d.cts +56 -0
- package/dist/utils/base64.d.ts +1 -2
- package/dist/utils/base64.js +1 -2
- package/dist/utils/certificate.d.ts +22 -0
- package/dist/utils/certificate.js +3 -0
- package/dist/utils/document.d.ts +135 -0
- package/dist/utils/document.js +3 -0
- package/dist/utils/getBaseUrl.d.ts +1 -2
- package/dist/utils/getBaseUrl.js +1 -1
- package/dist/utils/helpers.d.ts +271 -0
- package/dist/utils/helpers.js +330 -0
- package/dist/utils/signature-diagnostics.d.ts +93 -0
- package/dist/utils/signature-diagnostics.js +326 -0
- package/dist/utils/validation.d.ts +46 -0
- package/dist/utils/validation.js +134 -0
- package/myinvois-cert.conf.template +23 -0
- package/package.json +9 -3
- package/scripts/gen-cert.sh +159 -0
- package/src/api/platform/platformLogin.ts +1 -1
- package/src/index.ts +528 -1
- package/src/types/documents.d.ts +870 -0
- package/src/types/index.d.ts +1 -1
- package/src/utils/certificate.ts +60 -0
- package/src/utils/document.ts +852 -0
- package/src/utils/helpers.ts +552 -0
- package/src/utils/signature-diagnostics.ts +583 -0
- package/src/utils/validation.ts +268 -0
- package/test/MyInvoiClientWithRealData.test.ts +9 -1
- package/test/MyInvoisClient.test.ts +7 -1
- package/test/dynamicInvoiceFeatures.test.ts +451 -0
- package/test/signAndSubmitInvoice.test.ts +271 -734
- package/test/signature-diagnostics.test.ts +130 -0
- package/tsconfig.json +0 -3
- package/dist/0X-C4IRh_fJ.d.ts.map +0 -1
- package/dist/0X-Yw7mZEro.d.cts.map +0 -1
- package/dist/1X-Brnls9Jh.d.ts.map +0 -1
- package/dist/1X-BwpSoT3o.d.cts.map +0 -1
- package/dist/1X-C-_KHV-Q.d.ts.map +0 -1
- package/dist/1X-D_aUVsuM.d.cts.map +0 -1
- package/dist/2X-Bb6elyzV.d.cts.map +0 -1
- package/dist/2X-DkS1BoE5.d.ts.map +0 -1
- package/dist/2X-UdQcQW24.d.ts.map +0 -1
- package/dist/2X-hClUyw26.d.cts.map +0 -1
- package/dist/3X-C7VFD-n-.d.cts.map +0 -1
- package/dist/3X-CLMESDvz.d.cts.map +0 -1
- package/dist/3X-DFI-4RQQ.d.ts.map +0 -1
- package/dist/3X-DVDyspgb.d.ts.map +0 -1
- package/dist/4X-CIJ2JJ2w.d.ts.map +0 -1
- package/dist/4X-CUR8jlaZ.d.ts.map +0 -1
- package/dist/4X-CvScPJTf.d.cts.map +0 -1
- package/dist/4X-DIfvpU6V.d.cts.map +0 -1
- package/dist/5X-BOUxhadJ.d.cts.map +0 -1
- package/dist/5X-C6db432h.d.ts.map +0 -1
- package/dist/5X-COsZHUaQ.d.ts.map +0 -1
- package/dist/5X-CkLu7Vyd.d.cts.map +0 -1
- package/dist/6X-C_fFIcJC.d.ts.map +0 -1
- package/dist/6X-ClZDKOTC.d.ts.map +0 -1
- package/dist/6X-DE7RJeV6.d.cts.map +0 -1
- package/dist/6X-Mf32k1d0.d.cts.map +0 -1
- package/dist/7X-BZyesooz.d.ts.map +0 -1
- package/dist/7X-Chtd6B66.d.cts.map +0 -1
- package/dist/7X-DoCUcp-J.d.cts.map +0 -1
- package/dist/7X-kot_VccM.d.ts.map +0 -1
- package/dist/8X-Df4DOBOe.d.ts.map +0 -1
- package/dist/8X-DkuKAkHz.d.ts.map +0 -1
- package/dist/8X-DqZyMvyV.d.cts.map +0 -1
- package/dist/8X-Dr9RunRw.d.cts.map +0 -1
- package/dist/9X-BDgifncF.d.ts.map +0 -1
- package/dist/9X-BaoZtjWF.d.cts.map +0 -1
- package/dist/9X-BcAb6Uso.d.cts.map +0 -1
- package/dist/9X-BhBWlgxG.d.ts.map +0 -1
- package/dist/AX-BY72FohC.d.cts.map +0 -1
- package/dist/AX-D6XHWdrY.d.ts.map +0 -1
- package/dist/BX-CA0OmrUZ.d.cts.map +0 -1
- package/dist/BX-D_0C8Qbd.d.ts.map +0 -1
- package/dist/CX-HH4cSZRX.d.ts.map +0 -1
- package/dist/CX-glpQSL8x.d.cts.map +0 -1
- package/dist/DX-DimL1MDM.d.cts.map +0 -1
- package/dist/DX-Dx22ax_I.d.ts.map +0 -1
- package/dist/EX-BRWh1wFc.d.ts.map +0 -1
- package/dist/EX-Cx87Ruxl.d.cts.map +0 -1
- package/dist/FX-D81UlxNN.d.cts.map +0 -1
- package/dist/FX-RmjwAr40.d.ts.map +0 -1
- package/dist/GX-9i7piP9G.d.cts.map +0 -1
- package/dist/GX-CJyo7oDp.d.ts.map +0 -1
- package/dist/HX-20GVJAvl.d.cts.map +0 -1
- package/dist/HX-XALBTdLA.d.ts.map +0 -1
- package/dist/IX-6SZ55QKb.d.ts.map +0 -1
- package/dist/IX-D54NGPsc.d.cts.map +0 -1
- package/dist/JX-C1RYcwQX.d.cts.map +0 -1
- package/dist/JX-hQ1XRmLp.d.ts.map +0 -1
- package/dist/KX-BNwunEfn.d.ts.map +0 -1
- package/dist/KX-gQHCIgtQ.d.cts.map +0 -1
- package/dist/LX-CHYX3X3J.d.ts.map +0 -1
- package/dist/LX-CPurJGIh.d.cts.map +0 -1
- package/dist/MX-BPGLWSUz.d.ts.map +0 -1
- package/dist/MX-BnyW5eHf.d.cts.map +0 -1
- package/dist/MyInvoisClient-BrNyMjS-.d.cts +0 -178
- package/dist/MyInvoisClient-BrNyMjS-.d.cts.map +0 -1
- package/dist/MyInvoisClient-CXu4pdl-.d.ts +0 -178
- package/dist/MyInvoisClient-CXu4pdl-.d.ts.map +0 -1
- package/dist/MyInvoisClient-Cnvb5iUC.js +0 -299
- package/dist/MyInvoisClient-Cnvb5iUC.js.map +0 -1
- package/dist/MyInvoisClient-DO1dJfQq.cjs +0 -304
- package/dist/MyInvoisClient-DO1dJfQq.cjs.map +0 -1
- package/dist/NX-B11fQuco.d.cts.map +0 -1
- package/dist/NX-RulN5Ml3.d.ts.map +0 -1
- package/dist/OX-DgKVSp7I.d.ts.map +0 -1
- package/dist/OX-T-ydRXQS.d.cts.map +0 -1
- package/dist/PX-DA4A2kEv.d.ts.map +0 -1
- package/dist/PX-p0n1SzvU.d.cts.map +0 -1
- package/dist/QX-CI1NccIB.d.cts.map +0 -1
- package/dist/QX-DrFqsMEs.d.ts.map +0 -1
- package/dist/RX-Cm7vFcFN.d.ts.map +0 -1
- package/dist/RX-DnNKol22.d.cts.map +0 -1
- package/dist/SX-BUjiWQYz.d.cts.map +0 -1
- package/dist/SX-CsPPTu-W.d.ts.map +0 -1
- package/dist/TX-DCY25MdR.d.ts.map +0 -1
- package/dist/TX-DOEpsf05.d.cts.map +0 -1
- package/dist/UX-DauyagHy.d.ts.map +0 -1
- package/dist/UX-DgUOnTFK.d.cts.map +0 -1
- package/dist/VX-DD4scgCe.d.ts.map +0 -1
- package/dist/VX-kUX6LM-3.d.cts.map +0 -1
- package/dist/WX-CjkoppdY.d.ts.map +0 -1
- package/dist/WX-DPfyPFFh.d.cts.map +0 -1
- package/dist/XX-C4C1gQZH.d.cts.map +0 -1
- package/dist/XX-sbsIUOnA.d.ts.map +0 -1
- package/dist/YX-BeT-LsiA.d.cts.map +0 -1
- package/dist/YX-DUdO8mRC.d.ts.map +0 -1
- package/dist/ZX-BuVTTq-D.d.cts.map +0 -1
- package/dist/ZX-DwfcSA-D.d.ts.map +0 -1
- package/dist/api/platform/platformLogin.d.ts.map +0 -1
- package/dist/canonicalize-C_fNNpYr.cjs +0 -80
- package/dist/canonicalize-C_fNNpYr.cjs.map +0 -1
- package/dist/canonicalize-DNUrCGad.js +0 -68
- package/dist/canonicalize-DNUrCGad.js.map +0 -1
- package/dist/classification-codes-B15PbWxz.d.cts.map +0 -1
- package/dist/classification-codes-C2X4xW5-.d.ts.map +0 -1
- package/dist/country-code-DPeNFMMi.d.cts.map +0 -1
- package/dist/country-code-DsI8Mbzx.d.ts.map +0 -1
- package/dist/currencies-DKuDflOO.d.ts.map +0 -1
- package/dist/currencies-S5g1gzBU.d.cts.map +0 -1
- package/dist/e-invoice-BuwtFnlI.d.cts.map +0 -1
- package/dist/e-invoice-C2TxhyrK.d.ts.map +0 -1
- package/dist/getBaseUrl-Dx6RDC8I.js.map +0 -1
- package/dist/hashCert-Bol7lIh2.js +0 -62
- package/dist/hashCert-Bol7lIh2.js.map +0 -1
- package/dist/hashCert-mlYEuYex.cjs +0 -68
- package/dist/hashCert-mlYEuYex.cjs.map +0 -1
- package/dist/hashSignedProperties-9vj5wlYR.js +0 -83
- package/dist/hashSignedProperties-9vj5wlYR.js.map +0 -1
- package/dist/hashSignedProperties-CU_ZqqmY.cjs +0 -95
- package/dist/hashSignedProperties-CU_ZqqmY.cjs.map +0 -1
- package/dist/index-B1DSs-wd.d.cts.map +0 -1
- package/dist/index-CJNLQVjx.d.ts +0 -1
- package/dist/index-FTgB2nM6.d.ts.map +0 -1
- package/dist/index-Wy1ONBjV.d.cts +0 -1
- package/dist/index10.cjs.map +0 -1
- package/dist/index66.cjs.map +0 -1
- package/dist/index67.cjs +0 -4
- package/dist/index67.cts.map +0 -1
- package/dist/index68.cjs +0 -3
- package/dist/index68.cts.map +0 -1
- package/dist/index69.cjs +0 -4
- package/dist/index69.cts.map +0 -1
- package/dist/index70.cjs +0 -3
- package/dist/index70.cts.map +0 -1
- package/dist/index71.cjs +0 -3
- package/dist/index71.cts.map +0 -1
- package/dist/index72.cjs +0 -3
- package/dist/index72.cts.map +0 -1
- package/dist/index73.cjs +0 -3
- package/dist/index73.cts.map +0 -1
- package/dist/invoice-1_1-BJVcw-oE.d.ts +0 -432
- package/dist/invoice-1_1-BJVcw-oE.d.ts.map +0 -1
- package/dist/invoice-1_1-DWdNPRzr.d.cts +0 -432
- package/dist/invoice-1_1-DWdNPRzr.d.cts.map +0 -1
- package/dist/invoice1-1-8S-QQn7P.cjs +0 -547
- package/dist/invoice1-1-8S-QQn7P.cjs.map +0 -1
- package/dist/invoice1-1-CHuLpkFz.js +0 -504
- package/dist/invoice1-1-CHuLpkFz.js.map +0 -1
- package/dist/msic-codes-B_1W6lZF.d.cts.map +0 -1
- package/dist/msic-codes-bs0lTfSZ.d.ts +0 -26
- package/dist/msic-codes-bs0lTfSZ.d.ts.map +0 -1
- package/dist/payment-modes-B8dNy3SM.d.ts.map +0 -1
- package/dist/payment-modes-DHihrywe.d.cts.map +0 -1
- package/dist/platformLogin-DsxWWUXr.js.map +0 -1
- package/dist/populateFinalDocument-BdyYzz5Y.cjs +0 -96
- package/dist/populateFinalDocument-BdyYzz5Y.cjs.map +0 -1
- package/dist/populateFinalDocument-BpLXmgLv.js +0 -90
- package/dist/populateFinalDocument-BpLXmgLv.js.map +0 -1
- package/dist/populateSignedProperties-BJMcBQ6S.cjs +0 -58
- package/dist/populateSignedProperties-BJMcBQ6S.cjs.map +0 -1
- package/dist/populateSignedProperties-BvGN-YZH.js +0 -52
- package/dist/populateSignedProperties-BvGN-YZH.js.map +0 -1
- package/dist/sign-B61Cy3gO.cjs +0 -40
- package/dist/sign-B61Cy3gO.cjs.map +0 -1
- package/dist/sign-DzHK7UhR.js +0 -34
- package/dist/sign-DzHK7UhR.js.map +0 -1
- package/dist/signatures-BKi9DP2K.d.cts.map +0 -1
- package/dist/signatures-C9QPZTQd.d.ts.map +0 -1
- package/dist/state-codes-CxG1S9YY.d.ts.map +0 -1
- package/dist/state-codes-DXSWtE6a.d.cts.map +0 -1
- package/dist/tax-types-CEpfSh5P.d.ts.map +0 -1
- package/dist/tax-types-CgwxONDS.d.cts.map +0 -1
- package/dist/transform-BLz0S687.cjs +0 -72
- package/dist/transform-BLz0S687.cjs.map +0 -1
- package/dist/transform-D1q-U6Zj.js +0 -66
- package/dist/transform-D1q-U6Zj.js.map +0 -1
- package/dist/types/documents/index.d.ts +0 -57
- package/dist/types/documents/invoice-1_1.d.ts +0 -56
- package/dist/unit-types-1bF0KhIp.d.ts +0 -56
- package/dist/unit-types-1bF0KhIp.d.ts.map +0 -1
- package/dist/unit-types-CsrkvgfG.d.cts +0 -56
- package/dist/unit-types-CsrkvgfG.d.cts.map +0 -1
- package/dist/utils/MyInvoisClient.d.ts +0 -60
- package/dist/utils/MyInvoisClient.js +0 -13
- package/dist/utils/base64.d.ts.map +0 -1
- package/dist/utils/base64.js.map +0 -1
- package/dist/utils/debug/debug-document-hash.d.ts +0 -100
- package/dist/utils/debug/debug-document-hash.d.ts.map +0 -1
- package/dist/utils/debug/debug-document-hash.js +0 -120
- package/dist/utils/debug/debug-document-hash.js.map +0 -1
- package/dist/utils/debug/debug-invoice-submission.d.ts +0 -152
- package/dist/utils/debug/debug-invoice-submission.d.ts.map +0 -1
- package/dist/utils/debug/debug-invoice-submission.js +0 -226
- package/dist/utils/debug/debug-invoice-submission.js.map +0 -1
- package/dist/utils/getBaseUrl.d.ts.map +0 -1
- package/dist/utils/invoice1-1.d.ts +0 -117
- package/dist/utils/invoice1-1.d.ts.map +0 -1
- package/dist/utils/invoice1-1.js +0 -10
- package/dist/utils/signature/canonicalize.d.ts +0 -26
- package/dist/utils/signature/canonicalize.d.ts.map +0 -1
- package/dist/utils/signature/canonicalize.js +0 -3
- package/dist/utils/signature/hashCert.d.ts +0 -15
- package/dist/utils/signature/hashCert.d.ts.map +0 -1
- package/dist/utils/signature/hashCert.js +0 -3
- package/dist/utils/signature/hashSignedProperties.d.ts +0 -25
- package/dist/utils/signature/hashSignedProperties.d.ts.map +0 -1
- package/dist/utils/signature/hashSignedProperties.js +0 -3
- package/dist/utils/signature/populateFinalDocument.d.ts +0 -23
- package/dist/utils/signature/populateFinalDocument.d.ts.map +0 -1
- package/dist/utils/signature/populateFinalDocument.js +0 -3
- package/dist/utils/signature/populateSignedProperties.d.ts +0 -23
- package/dist/utils/signature/populateSignedProperties.d.ts.map +0 -1
- package/dist/utils/signature/populateSignedProperties.js +0 -3
- package/dist/utils/signature/sign.d.ts +0 -16
- package/dist/utils/signature/sign.d.ts.map +0 -1
- package/dist/utils/signature/sign.js +0 -3
- package/dist/utils/signature/transform.d.ts +0 -16
- package/dist/utils/signature/transform.d.ts.map +0 -1
- package/dist/utils/signature/transform.js +0 -3
- package/src/types/documents/index.d.ts +0 -1
- package/src/types/documents/invoice-1_1.d.ts +0 -439
- package/src/utils/MyInvoisClient.ts +0 -501
- package/src/utils/debug/debug-document-hash.ts +0 -249
- package/src/utils/debug/debug-invoice-submission.ts +0 -355
- package/src/utils/invoice1-1.ts +0 -671
- package/src/utils/signature/canonicalize.ts +0 -104
- package/src/utils/signature/hashCert.ts +0 -115
- package/src/utils/signature/hashSignedProperties.ts +0 -155
- package/src/utils/signature/populateFinalDocument.ts +0 -187
- package/src/utils/signature/populateSignedProperties.ts +0 -87
- package/src/utils/signature/sign.ts +0 -51
- package/src/utils/signature/transform.ts +0 -99
- package/test/canonicalize.test.ts +0 -110
- package/test/hashCert.test.ts +0 -95
- package/test/hashSignedProperties.test.ts +0 -140
- package/test/populateFinalDocument.test.ts +0 -218
- package/test/populateSignedProperties.test.ts +0 -155
- package/test/sign.test.ts +0 -70
- package/test/transform.test.ts +0 -158
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transform-BLz0S687.cjs","names":["xmlString: string","doc: Document","errors: string[]","msg: string","DOMParserImpl","e: any","xpath","path: string","XMLSerializerImpl"],"sources":["../src/utils/signature/transform.ts"],"sourcesContent":["// Import necessary components from xmldom-ts and xpath-ts\nimport { DOMParserImpl, XMLSerializerImpl } from 'xmldom-ts'\nimport * as xpath from 'xpath-ts'\n// Assuming Node and Document types are correctly exposed by xmldom-ts/xpath-ts globally or via import\n\n/**\n * Transforms an XML invoice string according to specific rules using xmldom-ts and xpath-ts:\n * - Removes the XML declaration.\n * - Removes UBLExtensions and Signature elements within the Invoice element.\n * Assumes the input XML is UTF-8 encoded.\n *\n * @param xmlString The raw XML invoice string.\n * @returns The transformed XML string.\n * @throws {Error} If parsing fails.\n */\nexport function transformXmlInvoice(xmlString: string): string {\n let doc: Document // Use the standard Document type, assuming compatibility\n const errors: string[] = []\n\n // Define separate handlers for each error level as likely expected by xmldom-ts\n const handleError = (msg: string) => {\n errors.push(`ERROR: ${msg}`)\n }\n const handleFatalError = (msg: string) => {\n errors.push(`FATALERROR: ${msg}`)\n }\n const handleWarning = (msg: string) => {\n console.warn(`WARNING: ${msg}`)\n }\n\n // Use DOMParserImpl from xmldom-ts with the specific error handler structure\n const parser = new DOMParserImpl({\n locator: {}, // Keep locator, might be useful for error context\n errorHandler: {\n error: handleError,\n fatalError: handleFatalError,\n warning: handleWarning,\n },\n })\n\n try {\n // Use the standard mime type string directly\n doc = parser.parseFromString(xmlString, 'application/xml') // Or 'text/xml'\n } catch (e: any) {\n throw new Error(`XML Parsing Initialization Error: ${e.message || e}`)\n }\n\n // Check for parsererror element\n const parserErrors = doc.getElementsByTagName('parsererror')\n if (parserErrors.length > 0) {\n const errorElement = parserErrors[0]\n if (errorElement) {\n const errorContent = errorElement.textContent\n ? errorElement.textContent.trim()\n : 'Unknown parsing error reported by parsererror tag.'\n throw new Error(`XML Parsing Error: ${errorContent}`)\n } else {\n throw new Error('XML Parsing Error: Malformed parsererror tag found.')\n }\n }\n\n // If the errorHandler collected errors, throw the first one.\n if (errors.length > 0) {\n throw new Error(errors[0])\n }\n\n // Use xpath.select from xpath-ts\n const select = xpath.select\n\n // Helper function to remove nodes found by XPath\n const removeNodesByXPath = (path: string) => {\n const nodesToRemove = select(path, doc) as Node[]\n\n if (nodesToRemove && nodesToRemove instanceof Array) {\n nodesToRemove.forEach(node => {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node)\n }\n })\n }\n }\n\n // 2. Find and remove UBLExtensions elements\n removeNodesByXPath(\n \"//*[local-name()='Invoice']//*[local-name()='UBLExtensions']\",\n )\n\n // 3. Find and remove Signature elements\n removeNodesByXPath(\"//*[local-name()='Invoice']//*[local-name()='Signature']\")\n\n // 4. Serialize the modified DOM back to string using XMLSerializerImpl\n const serializer = new XMLSerializerImpl()\n let transformedXml = serializer.serializeToString(doc)\n\n // 5. Remove the XML declaration (if present)\n transformedXml = transformedXml.replace(/^<\\?xml [^>]*\\?>\\s*/i, '')\n\n return transformedXml\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAgB,oBAAoBA,WAA2B;CAC7D,IAAIC;CACJ,MAAMC,SAAmB,CAAE;CAG3B,MAAM,cAAc,CAACC,QAAgB;AACnC,SAAO,MAAM,SAAS,IAAI,EAAE;CAC7B;CACD,MAAM,mBAAmB,CAACA,QAAgB;AACxC,SAAO,MAAM,cAAc,IAAI,EAAE;CAClC;CACD,MAAM,gBAAgB,CAACA,QAAgB;AACrC,UAAQ,MAAM,WAAW,IAAI,EAAE;CAChC;CAGD,MAAM,SAAS,IAAIC,wBAAc;EAC/B,SAAS,CAAE;EACX,cAAc;GACZ,OAAO;GACP,YAAY;GACZ,SAAS;EACV;CACF;AAED,KAAI;AAEF,QAAM,OAAO,gBAAgB,WAAW,kBAAkB;CAC3D,SAAQC,GAAQ;AACf,QAAM,IAAI,OAAO,oCAAoC,EAAE,WAAW,EAAE;CACrE;CAGD,MAAM,eAAe,IAAI,qBAAqB,cAAc;AAC5D,KAAI,aAAa,SAAS,GAAG;EAC3B,MAAM,eAAe,aAAa;AAClC,MAAI,cAAc;GAChB,MAAM,eAAe,aAAa,cAC9B,aAAa,YAAY,MAAM,GAC/B;AACJ,SAAM,IAAI,OAAO,qBAAqB,aAAa;EACpD,MACC,OAAM,IAAI,MAAM;CAEnB;AAGD,KAAI,OAAO,SAAS,EAClB,OAAM,IAAI,MAAM,OAAO;CAIzB,MAAM,SAASC,SAAM;CAGrB,MAAM,qBAAqB,CAACC,SAAiB;EAC3C,MAAM,gBAAgB,OAAO,MAAM,IAAI;AAEvC,MAAI,iBAAiB,yBAAyB,MAC5C,eAAc,QAAQ,UAAQ;AAC5B,OAAI,QAAQ,KAAK,WACf,MAAK,WAAW,YAAY,KAAK;EAEpC,EAAC;CAEL;AAGD,oBACE,+DACD;AAGD,oBAAmB,2DAA2D;CAG9E,MAAM,aAAa,IAAIC;CACvB,IAAI,iBAAiB,WAAW,kBAAkB,IAAI;AAGtD,kBAAiB,eAAe,QAAQ,wBAAwB,GAAG;AAEnE,QAAO;AACR"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { DOMParserImpl, XMLSerializerImpl } from "xmldom-ts";
|
|
2
|
-
import * as xpath from "xpath-ts";
|
|
3
|
-
|
|
4
|
-
//#region src/utils/signature/transform.ts
|
|
5
|
-
/**
|
|
6
|
-
* Transforms an XML invoice string according to specific rules using xmldom-ts and xpath-ts:
|
|
7
|
-
* - Removes the XML declaration.
|
|
8
|
-
* - Removes UBLExtensions and Signature elements within the Invoice element.
|
|
9
|
-
* Assumes the input XML is UTF-8 encoded.
|
|
10
|
-
*
|
|
11
|
-
* @param xmlString The raw XML invoice string.
|
|
12
|
-
* @returns The transformed XML string.
|
|
13
|
-
* @throws {Error} If parsing fails.
|
|
14
|
-
*/
|
|
15
|
-
function transformXmlInvoice(xmlString) {
|
|
16
|
-
let doc;
|
|
17
|
-
const errors = [];
|
|
18
|
-
const handleError = (msg) => {
|
|
19
|
-
errors.push(`ERROR: ${msg}`);
|
|
20
|
-
};
|
|
21
|
-
const handleFatalError = (msg) => {
|
|
22
|
-
errors.push(`FATALERROR: ${msg}`);
|
|
23
|
-
};
|
|
24
|
-
const handleWarning = (msg) => {
|
|
25
|
-
console.warn(`WARNING: ${msg}`);
|
|
26
|
-
};
|
|
27
|
-
const parser = new DOMParserImpl({
|
|
28
|
-
locator: {},
|
|
29
|
-
errorHandler: {
|
|
30
|
-
error: handleError,
|
|
31
|
-
fatalError: handleFatalError,
|
|
32
|
-
warning: handleWarning
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
try {
|
|
36
|
-
doc = parser.parseFromString(xmlString, "application/xml");
|
|
37
|
-
} catch (e) {
|
|
38
|
-
throw new Error(`XML Parsing Initialization Error: ${e.message || e}`);
|
|
39
|
-
}
|
|
40
|
-
const parserErrors = doc.getElementsByTagName("parsererror");
|
|
41
|
-
if (parserErrors.length > 0) {
|
|
42
|
-
const errorElement = parserErrors[0];
|
|
43
|
-
if (errorElement) {
|
|
44
|
-
const errorContent = errorElement.textContent ? errorElement.textContent.trim() : "Unknown parsing error reported by parsererror tag.";
|
|
45
|
-
throw new Error(`XML Parsing Error: ${errorContent}`);
|
|
46
|
-
} else throw new Error("XML Parsing Error: Malformed parsererror tag found.");
|
|
47
|
-
}
|
|
48
|
-
if (errors.length > 0) throw new Error(errors[0]);
|
|
49
|
-
const select = xpath.select;
|
|
50
|
-
const removeNodesByXPath = (path) => {
|
|
51
|
-
const nodesToRemove = select(path, doc);
|
|
52
|
-
if (nodesToRemove && nodesToRemove instanceof Array) nodesToRemove.forEach((node) => {
|
|
53
|
-
if (node && node.parentNode) node.parentNode.removeChild(node);
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
removeNodesByXPath("//*[local-name()='Invoice']//*[local-name()='UBLExtensions']");
|
|
57
|
-
removeNodesByXPath("//*[local-name()='Invoice']//*[local-name()='Signature']");
|
|
58
|
-
const serializer = new XMLSerializerImpl();
|
|
59
|
-
let transformedXml = serializer.serializeToString(doc);
|
|
60
|
-
transformedXml = transformedXml.replace(/^<\?xml [^>]*\?>\s*/i, "");
|
|
61
|
-
return transformedXml;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
//#endregion
|
|
65
|
-
export { transformXmlInvoice };
|
|
66
|
-
//# sourceMappingURL=transform-D1q-U6Zj.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transform-D1q-U6Zj.js","names":["xmlString: string","doc: Document","errors: string[]","msg: string","e: any","path: string"],"sources":["../src/utils/signature/transform.ts"],"sourcesContent":["// Import necessary components from xmldom-ts and xpath-ts\nimport { DOMParserImpl, XMLSerializerImpl } from 'xmldom-ts'\nimport * as xpath from 'xpath-ts'\n// Assuming Node and Document types are correctly exposed by xmldom-ts/xpath-ts globally or via import\n\n/**\n * Transforms an XML invoice string according to specific rules using xmldom-ts and xpath-ts:\n * - Removes the XML declaration.\n * - Removes UBLExtensions and Signature elements within the Invoice element.\n * Assumes the input XML is UTF-8 encoded.\n *\n * @param xmlString The raw XML invoice string.\n * @returns The transformed XML string.\n * @throws {Error} If parsing fails.\n */\nexport function transformXmlInvoice(xmlString: string): string {\n let doc: Document // Use the standard Document type, assuming compatibility\n const errors: string[] = []\n\n // Define separate handlers for each error level as likely expected by xmldom-ts\n const handleError = (msg: string) => {\n errors.push(`ERROR: ${msg}`)\n }\n const handleFatalError = (msg: string) => {\n errors.push(`FATALERROR: ${msg}`)\n }\n const handleWarning = (msg: string) => {\n console.warn(`WARNING: ${msg}`)\n }\n\n // Use DOMParserImpl from xmldom-ts with the specific error handler structure\n const parser = new DOMParserImpl({\n locator: {}, // Keep locator, might be useful for error context\n errorHandler: {\n error: handleError,\n fatalError: handleFatalError,\n warning: handleWarning,\n },\n })\n\n try {\n // Use the standard mime type string directly\n doc = parser.parseFromString(xmlString, 'application/xml') // Or 'text/xml'\n } catch (e: any) {\n throw new Error(`XML Parsing Initialization Error: ${e.message || e}`)\n }\n\n // Check for parsererror element\n const parserErrors = doc.getElementsByTagName('parsererror')\n if (parserErrors.length > 0) {\n const errorElement = parserErrors[0]\n if (errorElement) {\n const errorContent = errorElement.textContent\n ? errorElement.textContent.trim()\n : 'Unknown parsing error reported by parsererror tag.'\n throw new Error(`XML Parsing Error: ${errorContent}`)\n } else {\n throw new Error('XML Parsing Error: Malformed parsererror tag found.')\n }\n }\n\n // If the errorHandler collected errors, throw the first one.\n if (errors.length > 0) {\n throw new Error(errors[0])\n }\n\n // Use xpath.select from xpath-ts\n const select = xpath.select\n\n // Helper function to remove nodes found by XPath\n const removeNodesByXPath = (path: string) => {\n const nodesToRemove = select(path, doc) as Node[]\n\n if (nodesToRemove && nodesToRemove instanceof Array) {\n nodesToRemove.forEach(node => {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node)\n }\n })\n }\n }\n\n // 2. Find and remove UBLExtensions elements\n removeNodesByXPath(\n \"//*[local-name()='Invoice']//*[local-name()='UBLExtensions']\",\n )\n\n // 3. Find and remove Signature elements\n removeNodesByXPath(\"//*[local-name()='Invoice']//*[local-name()='Signature']\")\n\n // 4. Serialize the modified DOM back to string using XMLSerializerImpl\n const serializer = new XMLSerializerImpl()\n let transformedXml = serializer.serializeToString(doc)\n\n // 5. Remove the XML declaration (if present)\n transformedXml = transformedXml.replace(/^<\\?xml [^>]*\\?>\\s*/i, '')\n\n return transformedXml\n}\n"],"mappings":";;;;;;;;;;;;;;AAeA,SAAgB,oBAAoBA,WAA2B;CAC7D,IAAIC;CACJ,MAAMC,SAAmB,CAAE;CAG3B,MAAM,cAAc,CAACC,QAAgB;AACnC,SAAO,MAAM,SAAS,IAAI,EAAE;CAC7B;CACD,MAAM,mBAAmB,CAACA,QAAgB;AACxC,SAAO,MAAM,cAAc,IAAI,EAAE;CAClC;CACD,MAAM,gBAAgB,CAACA,QAAgB;AACrC,UAAQ,MAAM,WAAW,IAAI,EAAE;CAChC;CAGD,MAAM,SAAS,IAAI,cAAc;EAC/B,SAAS,CAAE;EACX,cAAc;GACZ,OAAO;GACP,YAAY;GACZ,SAAS;EACV;CACF;AAED,KAAI;AAEF,QAAM,OAAO,gBAAgB,WAAW,kBAAkB;CAC3D,SAAQC,GAAQ;AACf,QAAM,IAAI,OAAO,oCAAoC,EAAE,WAAW,EAAE;CACrE;CAGD,MAAM,eAAe,IAAI,qBAAqB,cAAc;AAC5D,KAAI,aAAa,SAAS,GAAG;EAC3B,MAAM,eAAe,aAAa;AAClC,MAAI,cAAc;GAChB,MAAM,eAAe,aAAa,cAC9B,aAAa,YAAY,MAAM,GAC/B;AACJ,SAAM,IAAI,OAAO,qBAAqB,aAAa;EACpD,MACC,OAAM,IAAI,MAAM;CAEnB;AAGD,KAAI,OAAO,SAAS,EAClB,OAAM,IAAI,MAAM,OAAO;CAIzB,MAAM,SAAS,MAAM;CAGrB,MAAM,qBAAqB,CAACC,SAAiB;EAC3C,MAAM,gBAAgB,OAAO,MAAM,IAAI;AAEvC,MAAI,iBAAiB,yBAAyB,MAC5C,eAAc,QAAQ,UAAQ;AAC5B,OAAI,QAAQ,KAAK,WACf,MAAK,WAAW,YAAY,KAAK;EAEpC,EAAC;CAEL;AAGD,oBACE,+DACD;AAGD,oBAAmB,2DAA2D;CAG9E,MAAM,aAAa,IAAI;CACvB,IAAI,iBAAiB,WAAW,kBAAkB,IAAI;AAGtD,kBAAiB,eAAe,QAAQ,wBAAwB,GAAG;AAEnE,QAAO;AACR"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import "../../classification-codes-C2X4xW5-.js";
|
|
2
|
-
import "../../country-code-DsI8Mbzx.js";
|
|
3
|
-
import "../../currencies-DKuDflOO.js";
|
|
4
|
-
import "../../e-invoice-C2TxhyrK.js";
|
|
5
|
-
import "../../signatures-C9QPZTQd.js";
|
|
6
|
-
import "../../tax-types-CEpfSh5P.js";
|
|
7
|
-
import "../../1X-C-_KHV-Q.js";
|
|
8
|
-
import "../../2X-DkS1BoE5.js";
|
|
9
|
-
import "../../3X-DFI-4RQQ.js";
|
|
10
|
-
import "../../4X-CIJ2JJ2w.js";
|
|
11
|
-
import "../../5X-COsZHUaQ.js";
|
|
12
|
-
import "../../6X-ClZDKOTC.js";
|
|
13
|
-
import "../../7X-BZyesooz.js";
|
|
14
|
-
import "../../8X-DkuKAkHz.js";
|
|
15
|
-
import "../../9X-BDgifncF.js";
|
|
16
|
-
import "../../AX-D6XHWdrY.js";
|
|
17
|
-
import "../../BX-D_0C8Qbd.js";
|
|
18
|
-
import "../../CX-HH4cSZRX.js";
|
|
19
|
-
import "../../DX-Dx22ax_I.js";
|
|
20
|
-
import "../../EX-BRWh1wFc.js";
|
|
21
|
-
import "../../FX-RmjwAr40.js";
|
|
22
|
-
import "../../GX-CJyo7oDp.js";
|
|
23
|
-
import "../../HX-XALBTdLA.js";
|
|
24
|
-
import "../../IX-6SZ55QKb.js";
|
|
25
|
-
import "../../JX-hQ1XRmLp.js";
|
|
26
|
-
import "../../KX-BNwunEfn.js";
|
|
27
|
-
import "../../LX-CHYX3X3J.js";
|
|
28
|
-
import "../../MX-BPGLWSUz.js";
|
|
29
|
-
import "../../NX-RulN5Ml3.js";
|
|
30
|
-
import "../../OX-DgKVSp7I.js";
|
|
31
|
-
import "../../PX-DA4A2kEv.js";
|
|
32
|
-
import "../../QX-DrFqsMEs.js";
|
|
33
|
-
import "../../RX-Cm7vFcFN.js";
|
|
34
|
-
import "../../SX-CsPPTu-W.js";
|
|
35
|
-
import "../../TX-DCY25MdR.js";
|
|
36
|
-
import "../../UX-DauyagHy.js";
|
|
37
|
-
import "../../VX-DD4scgCe.js";
|
|
38
|
-
import "../../WX-CjkoppdY.js";
|
|
39
|
-
import "../../YX-DUdO8mRC.js";
|
|
40
|
-
import "../../ZX-DwfcSA-D.js";
|
|
41
|
-
import "../../XX-sbsIUOnA.js";
|
|
42
|
-
import "../../unit-types-1bF0KhIp.js";
|
|
43
|
-
import "../../payment-modes-B8dNy3SM.js";
|
|
44
|
-
import "../../0X-C4IRh_fJ.js";
|
|
45
|
-
import "../../1X-Brnls9Jh.js";
|
|
46
|
-
import "../../2X-UdQcQW24.js";
|
|
47
|
-
import "../../3X-DVDyspgb.js";
|
|
48
|
-
import "../../4X-CUR8jlaZ.js";
|
|
49
|
-
import "../../5X-C6db432h.js";
|
|
50
|
-
import "../../6X-C_fFIcJC.js";
|
|
51
|
-
import "../../7X-kot_VccM.js";
|
|
52
|
-
import "../../8X-Df4DOBOe.js";
|
|
53
|
-
import "../../9X-BhBWlgxG.js";
|
|
54
|
-
import "../../msic-codes-bs0lTfSZ.js";
|
|
55
|
-
import { Address, AllowanceCharge, Buyer, Delivery, DocumentStatus, DocumentSummary, DocumentValidationResult, DocumentValidationStepResult, GetSubmissionResponse, InvoiceLineItem, InvoiceV1_1, LegalMonetaryTotal, PaymentMeans, ResponseDocument, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal } from "../../invoice-1_1-BJVcw-oE.js";
|
|
56
|
-
import "../../index-CJNLQVjx.js";
|
|
57
|
-
export { Address, AllowanceCharge, Buyer, Delivery, DocumentStatus, DocumentSummary, DocumentValidationResult, DocumentValidationStepResult, GetSubmissionResponse, InvoiceLineItem, InvoiceV1_1, LegalMonetaryTotal, PaymentMeans, ResponseDocument, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import "../../classification-codes-C2X4xW5-.js";
|
|
2
|
-
import "../../country-code-DsI8Mbzx.js";
|
|
3
|
-
import "../../currencies-DKuDflOO.js";
|
|
4
|
-
import "../../e-invoice-C2TxhyrK.js";
|
|
5
|
-
import "../../signatures-C9QPZTQd.js";
|
|
6
|
-
import "../../tax-types-CEpfSh5P.js";
|
|
7
|
-
import "../../1X-C-_KHV-Q.js";
|
|
8
|
-
import "../../2X-DkS1BoE5.js";
|
|
9
|
-
import "../../3X-DFI-4RQQ.js";
|
|
10
|
-
import "../../4X-CIJ2JJ2w.js";
|
|
11
|
-
import "../../5X-COsZHUaQ.js";
|
|
12
|
-
import "../../6X-ClZDKOTC.js";
|
|
13
|
-
import "../../7X-BZyesooz.js";
|
|
14
|
-
import "../../8X-DkuKAkHz.js";
|
|
15
|
-
import "../../9X-BDgifncF.js";
|
|
16
|
-
import "../../AX-D6XHWdrY.js";
|
|
17
|
-
import "../../BX-D_0C8Qbd.js";
|
|
18
|
-
import "../../CX-HH4cSZRX.js";
|
|
19
|
-
import "../../DX-Dx22ax_I.js";
|
|
20
|
-
import "../../EX-BRWh1wFc.js";
|
|
21
|
-
import "../../FX-RmjwAr40.js";
|
|
22
|
-
import "../../GX-CJyo7oDp.js";
|
|
23
|
-
import "../../HX-XALBTdLA.js";
|
|
24
|
-
import "../../IX-6SZ55QKb.js";
|
|
25
|
-
import "../../JX-hQ1XRmLp.js";
|
|
26
|
-
import "../../KX-BNwunEfn.js";
|
|
27
|
-
import "../../LX-CHYX3X3J.js";
|
|
28
|
-
import "../../MX-BPGLWSUz.js";
|
|
29
|
-
import "../../NX-RulN5Ml3.js";
|
|
30
|
-
import "../../OX-DgKVSp7I.js";
|
|
31
|
-
import "../../PX-DA4A2kEv.js";
|
|
32
|
-
import "../../QX-DrFqsMEs.js";
|
|
33
|
-
import "../../RX-Cm7vFcFN.js";
|
|
34
|
-
import "../../SX-CsPPTu-W.js";
|
|
35
|
-
import "../../TX-DCY25MdR.js";
|
|
36
|
-
import "../../UX-DauyagHy.js";
|
|
37
|
-
import "../../VX-DD4scgCe.js";
|
|
38
|
-
import "../../WX-CjkoppdY.js";
|
|
39
|
-
import "../../YX-DUdO8mRC.js";
|
|
40
|
-
import "../../ZX-DwfcSA-D.js";
|
|
41
|
-
import "../../XX-sbsIUOnA.js";
|
|
42
|
-
import "../../unit-types-1bF0KhIp.js";
|
|
43
|
-
import "../../payment-modes-B8dNy3SM.js";
|
|
44
|
-
import "../../0X-C4IRh_fJ.js";
|
|
45
|
-
import "../../1X-Brnls9Jh.js";
|
|
46
|
-
import "../../2X-UdQcQW24.js";
|
|
47
|
-
import "../../3X-DVDyspgb.js";
|
|
48
|
-
import "../../4X-CUR8jlaZ.js";
|
|
49
|
-
import "../../5X-C6db432h.js";
|
|
50
|
-
import "../../6X-C_fFIcJC.js";
|
|
51
|
-
import "../../7X-kot_VccM.js";
|
|
52
|
-
import "../../8X-Df4DOBOe.js";
|
|
53
|
-
import "../../9X-BhBWlgxG.js";
|
|
54
|
-
import "../../msic-codes-bs0lTfSZ.js";
|
|
55
|
-
import { Address, AllowanceCharge, Buyer, Delivery, DocumentStatus, DocumentSummary, DocumentValidationResult, DocumentValidationStepResult, GetSubmissionResponse, InvoiceLineItem, InvoiceV1_1, LegalMonetaryTotal, PaymentMeans, ResponseDocument, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal } from "../../invoice-1_1-BJVcw-oE.js";
|
|
56
|
-
export { Address, AllowanceCharge, Buyer, Delivery, DocumentStatus, DocumentSummary, DocumentValidationResult, DocumentValidationStepResult, GetSubmissionResponse, InvoiceLineItem, InvoiceV1_1, LegalMonetaryTotal, PaymentMeans, ResponseDocument, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { UnitTypeCode_1X } from "./1X-C-_KHV-Q.js";
|
|
2
|
-
import { UnitTypeCode_2X } from "./2X-DkS1BoE5.js";
|
|
3
|
-
import { UnitTypeCode_3X } from "./3X-DFI-4RQQ.js";
|
|
4
|
-
import { UnitTypeCode_4X } from "./4X-CIJ2JJ2w.js";
|
|
5
|
-
import { UnitTypeCode_5X } from "./5X-COsZHUaQ.js";
|
|
6
|
-
import { UnitTypeCode_6X } from "./6X-ClZDKOTC.js";
|
|
7
|
-
import { UnitTypeCode_7X } from "./7X-BZyesooz.js";
|
|
8
|
-
import { UnitTypeCode_8X } from "./8X-DkuKAkHz.js";
|
|
9
|
-
import { UnitTypeCode_9X } from "./9X-BDgifncF.js";
|
|
10
|
-
import { UnitTypeCode_AX } from "./AX-D6XHWdrY.js";
|
|
11
|
-
import { UnitTypeCode_BX } from "./BX-D_0C8Qbd.js";
|
|
12
|
-
import { UnitTypeCode_CX } from "./CX-HH4cSZRX.js";
|
|
13
|
-
import { UnitTypeCode_DX } from "./DX-Dx22ax_I.js";
|
|
14
|
-
import { UnitTypeCode_EX } from "./EX-BRWh1wFc.js";
|
|
15
|
-
import { UnitTypeCode_FX } from "./FX-RmjwAr40.js";
|
|
16
|
-
import { UnitTypeCode_GX } from "./GX-CJyo7oDp.js";
|
|
17
|
-
import { UnitTypeCode_HX } from "./HX-XALBTdLA.js";
|
|
18
|
-
import { UnitTypeCode_IX } from "./IX-6SZ55QKb.js";
|
|
19
|
-
import { UnitTypeCode_JX } from "./JX-hQ1XRmLp.js";
|
|
20
|
-
import { UnitTypeCode_KX } from "./KX-BNwunEfn.js";
|
|
21
|
-
import { UnitTypeCode_LX } from "./LX-CHYX3X3J.js";
|
|
22
|
-
import { UnitTypeCode_MX } from "./MX-BPGLWSUz.js";
|
|
23
|
-
import { UnitTypeCode_NX } from "./NX-RulN5Ml3.js";
|
|
24
|
-
import { UnitTypeCode_OX } from "./OX-DgKVSp7I.js";
|
|
25
|
-
import { UnitTypeCode_PX } from "./PX-DA4A2kEv.js";
|
|
26
|
-
import { UnitTypeCode_QX } from "./QX-DrFqsMEs.js";
|
|
27
|
-
import { UnitTypeCode_RX } from "./RX-Cm7vFcFN.js";
|
|
28
|
-
import { UnitTypeCode_SX } from "./SX-CsPPTu-W.js";
|
|
29
|
-
import { UnitTypeCode_TX } from "./TX-DCY25MdR.js";
|
|
30
|
-
import { UnitTypeCode_UX } from "./UX-DauyagHy.js";
|
|
31
|
-
import { UnitTypeCode_VX } from "./VX-DD4scgCe.js";
|
|
32
|
-
import { UnitTypeCode_WX } from "./WX-CjkoppdY.js";
|
|
33
|
-
import { UnitTypeCode_YX } from "./YX-DUdO8mRC.js";
|
|
34
|
-
import { UnitTypeCode_ZX } from "./ZX-DwfcSA-D.js";
|
|
35
|
-
import { UnitTypeCode_XX } from "./XX-sbsIUOnA.js";
|
|
36
|
-
|
|
37
|
-
//#region src/types/unit-types.d.ts
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Represents the allowed codes for Unit of Measurement types.
|
|
41
|
-
* Based on UN/ECE Recommendation 20, Revision 17 (2021) as per the documentation:
|
|
42
|
-
* https://sdk.myinvois.hasil.gov.my/codes/unit-types/
|
|
43
|
-
*/
|
|
44
|
-
type UnitTypeCode = UnitTypeCode_1X | UnitTypeCode_2X | UnitTypeCode_3X | UnitTypeCode_4X | UnitTypeCode_5X | UnitTypeCode_6X | UnitTypeCode_7X | UnitTypeCode_8X | UnitTypeCode_9X | UnitTypeCode_AX | UnitTypeCode_BX | UnitTypeCode_CX | UnitTypeCode_DX | UnitTypeCode_EX | UnitTypeCode_FX | UnitTypeCode_GX | UnitTypeCode_HX | UnitTypeCode_IX | UnitTypeCode_JX | UnitTypeCode_KX | UnitTypeCode_LX | UnitTypeCode_MX | UnitTypeCode_NX | UnitTypeCode_OX | UnitTypeCode_PX | UnitTypeCode_QX | UnitTypeCode_RX | UnitTypeCode_SX | UnitTypeCode_TX | UnitTypeCode_UX | UnitTypeCode_VX | UnitTypeCode_WX | UnitTypeCode_YX | UnitTypeCode_ZX | UnitTypeCode_XX;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Interface representing a Unit of Measurement entry.
|
|
48
|
-
* Contains the code and its corresponding name.
|
|
49
|
-
*/
|
|
50
|
-
interface UnitType {
|
|
51
|
-
code: UnitTypeCode;
|
|
52
|
-
name: string;
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
export { UnitType, UnitTypeCode };
|
|
56
|
-
//# sourceMappingURL=unit-types-1bF0KhIp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unit-types-1bF0KhIp.d.ts","names":["UnitTypeCode_1X","UnitTypeCode_2X","UnitTypeCode_3X","UnitTypeCode_4X","UnitTypeCode_5X","UnitTypeCode_6X","UnitTypeCode_7X","UnitTypeCode_8X","UnitTypeCode_9X","UnitTypeCode_AX","UnitTypeCode_BX","UnitTypeCode_CX","UnitTypeCode_DX","UnitTypeCode_EX","UnitTypeCode_FX","UnitTypeCode_GX","UnitTypeCode_HX","UnitTypeCode_IX","UnitTypeCode_JX","UnitTypeCode_KX","UnitTypeCode_LX","UnitTypeCode_MX","UnitTypeCode_NX","UnitTypeCode_OX","UnitTypeCode_PX","UnitTypeCode_QX","UnitTypeCode_RX","UnitTypeCode_SX","UnitTypeCode_TX","UnitTypeCode_UX","UnitTypeCode_VX","UnitTypeCode_WX","UnitTypeCode_YX","UnitTypeCode_ZX","UnitTypeCode_XX","UnitTypeCode","UnitType"],"sources":["../src/types/unit-types.d.ts"],"sourcesContent":["import type { UnitTypeCode_1X } from './unit/1X.d.ts'\nimport type { UnitTypeCode_2X } from './unit/2X.d.ts'\nimport type { UnitTypeCode_3X } from './unit/3X.d.ts'\nimport type { UnitTypeCode_4X } from './unit/4X.d.ts'\nimport type { UnitTypeCode_5X } from './unit/5X.d.ts'\nimport type { UnitTypeCode_6X } from './unit/6X.d.ts'\nimport type { UnitTypeCode_7X } from './unit/7X.d.ts'\nimport type { UnitTypeCode_8X } from './unit/8X.d.ts'\nimport type { UnitTypeCode_9X } from './unit/9X.d.ts'\nimport type { UnitTypeCode_AX } from './unit/AX.d.ts'\nimport type { UnitTypeCode_BX } from './unit/BX.d.ts'\nimport type { UnitTypeCode_CX } from './unit/CX.d.ts'\nimport type { UnitTypeCode_DX } from './unit/DX.d.ts'\nimport type { UnitTypeCode_EX } from './unit/EX.d.ts'\nimport type { UnitTypeCode_FX } from './unit/FX.d.ts'\nimport type { UnitTypeCode_GX } from './unit/GX.d.ts'\nimport type { UnitTypeCode_HX } from './unit/HX.d.ts'\nimport type { UnitTypeCode_IX } from './unit/IX.d.ts'\nimport type { UnitTypeCode_JX } from './unit/JX.d.ts'\nimport type { UnitTypeCode_KX } from './unit/KX.d.ts'\nimport type { UnitTypeCode_LX } from './unit/LX.d.ts'\nimport type { UnitTypeCode_MX } from './unit/MX.d.ts'\nimport type { UnitTypeCode_NX } from './unit/NX.d.ts'\nimport type { UnitTypeCode_OX } from './unit/OX.d.ts'\nimport type { UnitTypeCode_PX } from './unit/PX.d.ts'\nimport type { UnitTypeCode_QX } from './unit/QX.d.ts'\nimport type { UnitTypeCode_RX } from './unit/RX.d.ts'\nimport type { UnitTypeCode_SX } from './unit/SX.d.ts'\nimport type { UnitTypeCode_TX } from './unit/TX.d.ts'\nimport type { UnitTypeCode_UX } from './unit/UX.d.ts'\nimport type { UnitTypeCode_VX } from './unit/VX.d.ts'\nimport type { UnitTypeCode_WX } from './unit/WX.d.ts'\nimport type { UnitTypeCode_YX } from './unit/YX.d.ts'\nimport type { UnitTypeCode_ZX } from './unit/ZX.d.ts'\nimport type { UnitTypeCode_XX } from './unit/XX.d.ts'\n\n/**\n * Represents the allowed codes for Unit of Measurement types.\n * Based on UN/ECE Recommendation 20, Revision 17 (2021) as per the documentation:\n * https://sdk.myinvois.hasil.gov.my/codes/unit-types/\n */\nexport type UnitTypeCode =\n | UnitTypeCode_1X\n | UnitTypeCode_2X\n | UnitTypeCode_3X\n | UnitTypeCode_4X\n | UnitTypeCode_5X\n | UnitTypeCode_6X\n | UnitTypeCode_7X\n | UnitTypeCode_8X\n | UnitTypeCode_9X\n | UnitTypeCode_AX\n | UnitTypeCode_BX\n | UnitTypeCode_CX\n | UnitTypeCode_DX\n | UnitTypeCode_EX\n | UnitTypeCode_FX\n | UnitTypeCode_GX\n | UnitTypeCode_HX\n | UnitTypeCode_IX\n | UnitTypeCode_JX\n | UnitTypeCode_KX\n | UnitTypeCode_LX\n | UnitTypeCode_MX\n | UnitTypeCode_NX\n | UnitTypeCode_OX\n | UnitTypeCode_PX\n | UnitTypeCode_QX\n | UnitTypeCode_RX\n | UnitTypeCode_SX\n | UnitTypeCode_TX\n | UnitTypeCode_UX\n | UnitTypeCode_VX\n | UnitTypeCode_WX\n | UnitTypeCode_YX\n | UnitTypeCode_ZX\n | UnitTypeCode_XX\n\n/**\n * Interface representing a Unit of Measurement entry.\n * Contains the code and its corresponding name.\n */\nexport interface UnitType {\n code: UnitTypeCode\n name: string\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA;;;;AAGIE,KAHQiC,YAAAA,GACRnC,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAEe,GADfC,eAOqB,GANrBC;;;;;;UAMaE,QAAAA;QACTD"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { UnitTypeCode_1X } from "./1X-BwpSoT3o.cjs";
|
|
2
|
-
import { UnitTypeCode_2X } from "./2X-Bb6elyzV.cjs";
|
|
3
|
-
import { UnitTypeCode_3X } from "./3X-C7VFD-n-.cjs";
|
|
4
|
-
import { UnitTypeCode_4X } from "./4X-DIfvpU6V.cjs";
|
|
5
|
-
import { UnitTypeCode_5X } from "./5X-BOUxhadJ.cjs";
|
|
6
|
-
import { UnitTypeCode_6X } from "./6X-DE7RJeV6.cjs";
|
|
7
|
-
import { UnitTypeCode_7X } from "./7X-Chtd6B66.cjs";
|
|
8
|
-
import { UnitTypeCode_8X } from "./8X-DqZyMvyV.cjs";
|
|
9
|
-
import { UnitTypeCode_9X } from "./9X-BcAb6Uso.cjs";
|
|
10
|
-
import { UnitTypeCode_AX } from "./AX-BY72FohC.cjs";
|
|
11
|
-
import { UnitTypeCode_BX } from "./BX-CA0OmrUZ.cjs";
|
|
12
|
-
import { UnitTypeCode_CX } from "./CX-glpQSL8x.cjs";
|
|
13
|
-
import { UnitTypeCode_DX } from "./DX-DimL1MDM.cjs";
|
|
14
|
-
import { UnitTypeCode_EX } from "./EX-Cx87Ruxl.cjs";
|
|
15
|
-
import { UnitTypeCode_FX } from "./FX-D81UlxNN.cjs";
|
|
16
|
-
import { UnitTypeCode_GX } from "./GX-9i7piP9G.cjs";
|
|
17
|
-
import { UnitTypeCode_HX } from "./HX-20GVJAvl.cjs";
|
|
18
|
-
import { UnitTypeCode_IX } from "./IX-D54NGPsc.cjs";
|
|
19
|
-
import { UnitTypeCode_JX } from "./JX-C1RYcwQX.cjs";
|
|
20
|
-
import { UnitTypeCode_KX } from "./KX-gQHCIgtQ.cjs";
|
|
21
|
-
import { UnitTypeCode_LX } from "./LX-CPurJGIh.cjs";
|
|
22
|
-
import { UnitTypeCode_MX } from "./MX-BnyW5eHf.cjs";
|
|
23
|
-
import { UnitTypeCode_NX } from "./NX-B11fQuco.cjs";
|
|
24
|
-
import { UnitTypeCode_OX } from "./OX-T-ydRXQS.cjs";
|
|
25
|
-
import { UnitTypeCode_PX } from "./PX-p0n1SzvU.cjs";
|
|
26
|
-
import { UnitTypeCode_QX } from "./QX-CI1NccIB.cjs";
|
|
27
|
-
import { UnitTypeCode_RX } from "./RX-DnNKol22.cjs";
|
|
28
|
-
import { UnitTypeCode_SX } from "./SX-BUjiWQYz.cjs";
|
|
29
|
-
import { UnitTypeCode_TX } from "./TX-DOEpsf05.cjs";
|
|
30
|
-
import { UnitTypeCode_UX } from "./UX-DgUOnTFK.cjs";
|
|
31
|
-
import { UnitTypeCode_VX } from "./VX-kUX6LM-3.cjs";
|
|
32
|
-
import { UnitTypeCode_WX } from "./WX-DPfyPFFh.cjs";
|
|
33
|
-
import { UnitTypeCode_YX } from "./YX-BeT-LsiA.cjs";
|
|
34
|
-
import { UnitTypeCode_ZX } from "./ZX-BuVTTq-D.cjs";
|
|
35
|
-
import { UnitTypeCode_XX } from "./XX-C4C1gQZH.cjs";
|
|
36
|
-
|
|
37
|
-
//#region src/types/unit-types.d.ts
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Represents the allowed codes for Unit of Measurement types.
|
|
41
|
-
* Based on UN/ECE Recommendation 20, Revision 17 (2021) as per the documentation:
|
|
42
|
-
* https://sdk.myinvois.hasil.gov.my/codes/unit-types/
|
|
43
|
-
*/
|
|
44
|
-
type UnitTypeCode = UnitTypeCode_1X | UnitTypeCode_2X | UnitTypeCode_3X | UnitTypeCode_4X | UnitTypeCode_5X | UnitTypeCode_6X | UnitTypeCode_7X | UnitTypeCode_8X | UnitTypeCode_9X | UnitTypeCode_AX | UnitTypeCode_BX | UnitTypeCode_CX | UnitTypeCode_DX | UnitTypeCode_EX | UnitTypeCode_FX | UnitTypeCode_GX | UnitTypeCode_HX | UnitTypeCode_IX | UnitTypeCode_JX | UnitTypeCode_KX | UnitTypeCode_LX | UnitTypeCode_MX | UnitTypeCode_NX | UnitTypeCode_OX | UnitTypeCode_PX | UnitTypeCode_QX | UnitTypeCode_RX | UnitTypeCode_SX | UnitTypeCode_TX | UnitTypeCode_UX | UnitTypeCode_VX | UnitTypeCode_WX | UnitTypeCode_YX | UnitTypeCode_ZX | UnitTypeCode_XX;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Interface representing a Unit of Measurement entry.
|
|
48
|
-
* Contains the code and its corresponding name.
|
|
49
|
-
*/
|
|
50
|
-
interface UnitType {
|
|
51
|
-
code: UnitTypeCode;
|
|
52
|
-
name: string;
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
export { UnitType, UnitTypeCode };
|
|
56
|
-
//# sourceMappingURL=unit-types-CsrkvgfG.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unit-types-CsrkvgfG.d.cts","names":["UnitTypeCode_1X","UnitTypeCode_2X","UnitTypeCode_3X","UnitTypeCode_4X","UnitTypeCode_5X","UnitTypeCode_6X","UnitTypeCode_7X","UnitTypeCode_8X","UnitTypeCode_9X","UnitTypeCode_AX","UnitTypeCode_BX","UnitTypeCode_CX","UnitTypeCode_DX","UnitTypeCode_EX","UnitTypeCode_FX","UnitTypeCode_GX","UnitTypeCode_HX","UnitTypeCode_IX","UnitTypeCode_JX","UnitTypeCode_KX","UnitTypeCode_LX","UnitTypeCode_MX","UnitTypeCode_NX","UnitTypeCode_OX","UnitTypeCode_PX","UnitTypeCode_QX","UnitTypeCode_RX","UnitTypeCode_SX","UnitTypeCode_TX","UnitTypeCode_UX","UnitTypeCode_VX","UnitTypeCode_WX","UnitTypeCode_YX","UnitTypeCode_ZX","UnitTypeCode_XX","UnitTypeCode","UnitType"],"sources":["../src/types/unit-types.d.ts"],"sourcesContent":["import type { UnitTypeCode_1X } from './unit/1X.d.ts'\nimport type { UnitTypeCode_2X } from './unit/2X.d.ts'\nimport type { UnitTypeCode_3X } from './unit/3X.d.ts'\nimport type { UnitTypeCode_4X } from './unit/4X.d.ts'\nimport type { UnitTypeCode_5X } from './unit/5X.d.ts'\nimport type { UnitTypeCode_6X } from './unit/6X.d.ts'\nimport type { UnitTypeCode_7X } from './unit/7X.d.ts'\nimport type { UnitTypeCode_8X } from './unit/8X.d.ts'\nimport type { UnitTypeCode_9X } from './unit/9X.d.ts'\nimport type { UnitTypeCode_AX } from './unit/AX.d.ts'\nimport type { UnitTypeCode_BX } from './unit/BX.d.ts'\nimport type { UnitTypeCode_CX } from './unit/CX.d.ts'\nimport type { UnitTypeCode_DX } from './unit/DX.d.ts'\nimport type { UnitTypeCode_EX } from './unit/EX.d.ts'\nimport type { UnitTypeCode_FX } from './unit/FX.d.ts'\nimport type { UnitTypeCode_GX } from './unit/GX.d.ts'\nimport type { UnitTypeCode_HX } from './unit/HX.d.ts'\nimport type { UnitTypeCode_IX } from './unit/IX.d.ts'\nimport type { UnitTypeCode_JX } from './unit/JX.d.ts'\nimport type { UnitTypeCode_KX } from './unit/KX.d.ts'\nimport type { UnitTypeCode_LX } from './unit/LX.d.ts'\nimport type { UnitTypeCode_MX } from './unit/MX.d.ts'\nimport type { UnitTypeCode_NX } from './unit/NX.d.ts'\nimport type { UnitTypeCode_OX } from './unit/OX.d.ts'\nimport type { UnitTypeCode_PX } from './unit/PX.d.ts'\nimport type { UnitTypeCode_QX } from './unit/QX.d.ts'\nimport type { UnitTypeCode_RX } from './unit/RX.d.ts'\nimport type { UnitTypeCode_SX } from './unit/SX.d.ts'\nimport type { UnitTypeCode_TX } from './unit/TX.d.ts'\nimport type { UnitTypeCode_UX } from './unit/UX.d.ts'\nimport type { UnitTypeCode_VX } from './unit/VX.d.ts'\nimport type { UnitTypeCode_WX } from './unit/WX.d.ts'\nimport type { UnitTypeCode_YX } from './unit/YX.d.ts'\nimport type { UnitTypeCode_ZX } from './unit/ZX.d.ts'\nimport type { UnitTypeCode_XX } from './unit/XX.d.ts'\n\n/**\n * Represents the allowed codes for Unit of Measurement types.\n * Based on UN/ECE Recommendation 20, Revision 17 (2021) as per the documentation:\n * https://sdk.myinvois.hasil.gov.my/codes/unit-types/\n */\nexport type UnitTypeCode =\n | UnitTypeCode_1X\n | UnitTypeCode_2X\n | UnitTypeCode_3X\n | UnitTypeCode_4X\n | UnitTypeCode_5X\n | UnitTypeCode_6X\n | UnitTypeCode_7X\n | UnitTypeCode_8X\n | UnitTypeCode_9X\n | UnitTypeCode_AX\n | UnitTypeCode_BX\n | UnitTypeCode_CX\n | UnitTypeCode_DX\n | UnitTypeCode_EX\n | UnitTypeCode_FX\n | UnitTypeCode_GX\n | UnitTypeCode_HX\n | UnitTypeCode_IX\n | UnitTypeCode_JX\n | UnitTypeCode_KX\n | UnitTypeCode_LX\n | UnitTypeCode_MX\n | UnitTypeCode_NX\n | UnitTypeCode_OX\n | UnitTypeCode_PX\n | UnitTypeCode_QX\n | UnitTypeCode_RX\n | UnitTypeCode_SX\n | UnitTypeCode_TX\n | UnitTypeCode_UX\n | UnitTypeCode_VX\n | UnitTypeCode_WX\n | UnitTypeCode_YX\n | UnitTypeCode_ZX\n | UnitTypeCode_XX\n\n/**\n * Interface representing a Unit of Measurement entry.\n * Contains the code and its corresponding name.\n */\nexport interface UnitType {\n code: UnitTypeCode\n name: string\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA;;;;AAGIE,KAHQiC,YAAAA,GACRnC,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAGAG,GAFAF,eAEe,GADfC,eAOqB,GANrBC;;;;;;UAMaE,QAAAA;QACTD"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import "../classification-codes-C2X4xW5-.js";
|
|
2
|
-
import "../country-code-DsI8Mbzx.js";
|
|
3
|
-
import "../currencies-DKuDflOO.js";
|
|
4
|
-
import "../e-invoice-C2TxhyrK.js";
|
|
5
|
-
import "../signatures-C9QPZTQd.js";
|
|
6
|
-
import "../tax-types-CEpfSh5P.js";
|
|
7
|
-
import "../1X-C-_KHV-Q.js";
|
|
8
|
-
import "../2X-DkS1BoE5.js";
|
|
9
|
-
import "../3X-DFI-4RQQ.js";
|
|
10
|
-
import "../4X-CIJ2JJ2w.js";
|
|
11
|
-
import "../5X-COsZHUaQ.js";
|
|
12
|
-
import "../6X-ClZDKOTC.js";
|
|
13
|
-
import "../7X-BZyesooz.js";
|
|
14
|
-
import "../8X-DkuKAkHz.js";
|
|
15
|
-
import "../9X-BDgifncF.js";
|
|
16
|
-
import "../AX-D6XHWdrY.js";
|
|
17
|
-
import "../BX-D_0C8Qbd.js";
|
|
18
|
-
import "../CX-HH4cSZRX.js";
|
|
19
|
-
import "../DX-Dx22ax_I.js";
|
|
20
|
-
import "../EX-BRWh1wFc.js";
|
|
21
|
-
import "../FX-RmjwAr40.js";
|
|
22
|
-
import "../GX-CJyo7oDp.js";
|
|
23
|
-
import "../HX-XALBTdLA.js";
|
|
24
|
-
import "../IX-6SZ55QKb.js";
|
|
25
|
-
import "../JX-hQ1XRmLp.js";
|
|
26
|
-
import "../KX-BNwunEfn.js";
|
|
27
|
-
import "../LX-CHYX3X3J.js";
|
|
28
|
-
import "../MX-BPGLWSUz.js";
|
|
29
|
-
import "../NX-RulN5Ml3.js";
|
|
30
|
-
import "../OX-DgKVSp7I.js";
|
|
31
|
-
import "../PX-DA4A2kEv.js";
|
|
32
|
-
import "../QX-DrFqsMEs.js";
|
|
33
|
-
import "../RX-Cm7vFcFN.js";
|
|
34
|
-
import "../SX-CsPPTu-W.js";
|
|
35
|
-
import "../TX-DCY25MdR.js";
|
|
36
|
-
import "../UX-DauyagHy.js";
|
|
37
|
-
import "../VX-DD4scgCe.js";
|
|
38
|
-
import "../WX-CjkoppdY.js";
|
|
39
|
-
import "../YX-DUdO8mRC.js";
|
|
40
|
-
import "../ZX-DwfcSA-D.js";
|
|
41
|
-
import "../XX-sbsIUOnA.js";
|
|
42
|
-
import "../unit-types-1bF0KhIp.js";
|
|
43
|
-
import "../payment-modes-B8dNy3SM.js";
|
|
44
|
-
import "../0X-C4IRh_fJ.js";
|
|
45
|
-
import "../1X-Brnls9Jh.js";
|
|
46
|
-
import "../2X-UdQcQW24.js";
|
|
47
|
-
import "../3X-DVDyspgb.js";
|
|
48
|
-
import "../4X-CUR8jlaZ.js";
|
|
49
|
-
import "../5X-C6db432h.js";
|
|
50
|
-
import "../6X-C_fFIcJC.js";
|
|
51
|
-
import "../7X-kot_VccM.js";
|
|
52
|
-
import "../8X-Df4DOBOe.js";
|
|
53
|
-
import "../9X-BhBWlgxG.js";
|
|
54
|
-
import "../msic-codes-bs0lTfSZ.js";
|
|
55
|
-
import "../invoice-1_1-BJVcw-oE.js";
|
|
56
|
-
import "../index-CJNLQVjx.js";
|
|
57
|
-
import "../state-codes-CxG1S9YY.js";
|
|
58
|
-
import "../index-FTgB2nM6.js";
|
|
59
|
-
import { MyInvoisClient } from "../MyInvoisClient-CXu4pdl-.js";
|
|
60
|
-
export { MyInvoisClient };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import "../invoice1-1-CHuLpkFz.js";
|
|
2
|
-
import "../platformLogin-DsxWWUXr.js";
|
|
3
|
-
import "../getBaseUrl-Dx6RDC8I.js";
|
|
4
|
-
import "../canonicalize-DNUrCGad.js";
|
|
5
|
-
import "../hashCert-Bol7lIh2.js";
|
|
6
|
-
import "../hashSignedProperties-9vj5wlYR.js";
|
|
7
|
-
import "../populateFinalDocument-BpLXmgLv.js";
|
|
8
|
-
import "../populateSignedProperties-BvGN-YZH.js";
|
|
9
|
-
import "../sign-DzHK7UhR.js";
|
|
10
|
-
import "../transform-D1q-U6Zj.js";
|
|
11
|
-
import { MyInvoisClient } from "../MyInvoisClient-Cnvb5iUC.js";
|
|
12
|
-
|
|
13
|
-
export { MyInvoisClient };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base64.d.ts","names":["content: string"],"sources":["../../src/utils/base64.ts"],"sourcesContent":[],"mappings":";iBAAgB,cAAA;AAAA,iBAIA,gBAAA,CAJA,OAAA,EAAA,MAAA,CAAA,EAAA,MAAA"}
|
package/dist/utils/base64.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base64.js","names":["content: string"],"sources":["../../src/utils/base64.ts"],"sourcesContent":["export function encodeToBase64(content: string): string {\n return Buffer.from(content).toString('base64')\n}\n\nexport function decodeFromBase64(content: string): string {\n return Buffer.from(content, 'base64').toString('utf-8')\n}\n"],"mappings":";AAAA,SAAgB,eAAeA,SAAyB;AACtD,QAAO,OAAO,KAAK,QAAQ,CAAC,SAAS,SAAS;AAC/C;AAED,SAAgB,iBAAiBA,SAAyB;AACxD,QAAO,OAAO,KAAK,SAAS,SAAS,CAAC,SAAS,QAAQ;AACxD"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import "../../classification-codes-C2X4xW5-.js";
|
|
2
|
-
import "../../country-code-DsI8Mbzx.js";
|
|
3
|
-
import "../../currencies-DKuDflOO.js";
|
|
4
|
-
import "../../e-invoice-C2TxhyrK.js";
|
|
5
|
-
import "../../signatures-C9QPZTQd.js";
|
|
6
|
-
import "../../tax-types-CEpfSh5P.js";
|
|
7
|
-
import "../../1X-C-_KHV-Q.js";
|
|
8
|
-
import "../../2X-DkS1BoE5.js";
|
|
9
|
-
import "../../3X-DFI-4RQQ.js";
|
|
10
|
-
import "../../4X-CIJ2JJ2w.js";
|
|
11
|
-
import "../../5X-COsZHUaQ.js";
|
|
12
|
-
import "../../6X-ClZDKOTC.js";
|
|
13
|
-
import "../../7X-BZyesooz.js";
|
|
14
|
-
import "../../8X-DkuKAkHz.js";
|
|
15
|
-
import "../../9X-BDgifncF.js";
|
|
16
|
-
import "../../AX-D6XHWdrY.js";
|
|
17
|
-
import "../../BX-D_0C8Qbd.js";
|
|
18
|
-
import "../../CX-HH4cSZRX.js";
|
|
19
|
-
import "../../DX-Dx22ax_I.js";
|
|
20
|
-
import "../../EX-BRWh1wFc.js";
|
|
21
|
-
import "../../FX-RmjwAr40.js";
|
|
22
|
-
import "../../GX-CJyo7oDp.js";
|
|
23
|
-
import "../../HX-XALBTdLA.js";
|
|
24
|
-
import "../../IX-6SZ55QKb.js";
|
|
25
|
-
import "../../JX-hQ1XRmLp.js";
|
|
26
|
-
import "../../KX-BNwunEfn.js";
|
|
27
|
-
import "../../LX-CHYX3X3J.js";
|
|
28
|
-
import "../../MX-BPGLWSUz.js";
|
|
29
|
-
import "../../NX-RulN5Ml3.js";
|
|
30
|
-
import "../../OX-DgKVSp7I.js";
|
|
31
|
-
import "../../PX-DA4A2kEv.js";
|
|
32
|
-
import "../../QX-DrFqsMEs.js";
|
|
33
|
-
import "../../RX-Cm7vFcFN.js";
|
|
34
|
-
import "../../SX-CsPPTu-W.js";
|
|
35
|
-
import "../../TX-DCY25MdR.js";
|
|
36
|
-
import "../../UX-DauyagHy.js";
|
|
37
|
-
import "../../VX-DD4scgCe.js";
|
|
38
|
-
import "../../WX-CjkoppdY.js";
|
|
39
|
-
import "../../YX-DUdO8mRC.js";
|
|
40
|
-
import "../../ZX-DwfcSA-D.js";
|
|
41
|
-
import "../../XX-sbsIUOnA.js";
|
|
42
|
-
import "../../unit-types-1bF0KhIp.js";
|
|
43
|
-
import "../../payment-modes-B8dNy3SM.js";
|
|
44
|
-
import "../../0X-C4IRh_fJ.js";
|
|
45
|
-
import "../../1X-Brnls9Jh.js";
|
|
46
|
-
import "../../2X-UdQcQW24.js";
|
|
47
|
-
import "../../3X-DVDyspgb.js";
|
|
48
|
-
import "../../4X-CUR8jlaZ.js";
|
|
49
|
-
import "../../5X-C6db432h.js";
|
|
50
|
-
import "../../6X-C_fFIcJC.js";
|
|
51
|
-
import "../../7X-kot_VccM.js";
|
|
52
|
-
import "../../8X-Df4DOBOe.js";
|
|
53
|
-
import "../../9X-BhBWlgxG.js";
|
|
54
|
-
import "../../msic-codes-bs0lTfSZ.js";
|
|
55
|
-
import { InvoiceV1_1, SigningCredentials } from "../../invoice-1_1-BJVcw-oE.js";
|
|
56
|
-
import "../../index-CJNLQVjx.js";
|
|
57
|
-
import "../../state-codes-CxG1S9YY.js";
|
|
58
|
-
import "../../index-FTgB2nM6.js";
|
|
59
|
-
|
|
60
|
-
//#region src/utils/debug/debug-document-hash.d.ts
|
|
61
|
-
/**
|
|
62
|
-
* Debug Document Hash Issues
|
|
63
|
-
*
|
|
64
|
-
* This helps identify why MyInvois is rejecting the document hash
|
|
65
|
-
*/
|
|
66
|
-
/**
|
|
67
|
-
* Compare different hash calculation methods to identify the correct approach
|
|
68
|
-
*/
|
|
69
|
-
declare function debugDocumentHash(invoiceData: InvoiceV1_1, signingCredentials: SigningCredentials): Promise<{
|
|
70
|
-
signedXML: string;
|
|
71
|
-
documentHashes: {
|
|
72
|
-
submissionHash: string;
|
|
73
|
-
signatureDocDigest: string;
|
|
74
|
-
rawDocumentHash: string;
|
|
75
|
-
minifiedDocumentHash: string;
|
|
76
|
-
transformedDocumentHash: string;
|
|
77
|
-
};
|
|
78
|
-
areEqual: {
|
|
79
|
-
submissionVsSignature: boolean;
|
|
80
|
-
submissionVsRaw: boolean;
|
|
81
|
-
submissionVsMinified: boolean;
|
|
82
|
-
submissionVsTransformed: boolean;
|
|
83
|
-
};
|
|
84
|
-
recommendations: string[];
|
|
85
|
-
}>;
|
|
86
|
-
/**
|
|
87
|
-
* Test different approaches to calculate the submission hash
|
|
88
|
-
*/
|
|
89
|
-
declare function testSubmissionHashMethods(invoiceData: InvoiceV1_1, signingCredentials: SigningCredentials): Promise<{
|
|
90
|
-
methods: {
|
|
91
|
-
current: string;
|
|
92
|
-
signatureDigest: string;
|
|
93
|
-
canonicalized: string;
|
|
94
|
-
transformed: string;
|
|
95
|
-
};
|
|
96
|
-
recommendations: string[];
|
|
97
|
-
}>;
|
|
98
|
-
//#endregion
|
|
99
|
-
export { debugDocumentHash, testSubmissionHashMethods };
|
|
100
|
-
//# sourceMappingURL=debug-document-hash.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debug-document-hash.d.ts","names":["invoiceData: InvoiceV1_1","signingCredentials: SigningCredentials"],"sources":["../../../src/utils/debug/debug-document-hash.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAesB,iBAAA,cACP,iCACO,qBACnB;;;;;;;;;;;;;;;;;;;;iBA4JmB,yBAAA,cACP,iCACO,qBACnB"}
|