@ripwords/myinvois-client 0.1.4 → 0.1.6
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 +25 -0
- package/bun.lock +460 -0
- package/dist/0X-CTIq3y3a.d.ts +210 -0
- package/dist/0X-Cr3M7hci.d.cts +211 -0
- package/dist/1X-Bu4oiv8D.d.ts +111 -0
- package/dist/1X-BywXCqtn.d.ts +19 -0
- package/dist/1X-CWwmfCzo.d.cts +112 -0
- package/dist/1X-ClnJ79HH.d.cts +20 -0
- package/dist/2X-3fSEGIuE.d.ts +39 -0
- package/dist/2X-CV9eYhog.d.cts +40 -0
- package/dist/2X-DNtkJ0tj.d.cts +140 -0
- package/dist/2X-DnG3FY1f.d.ts +139 -0
- package/dist/3X--VWVsC84.d.cts +21 -0
- package/dist/3X-BOxfatu3.d.cts +62 -0
- package/dist/3X-CLdmoel1.d.ts +61 -0
- package/dist/3X-Ynjfgoll.d.ts +20 -0
- package/dist/4X-B5ePdMky.d.ts +30 -0
- package/dist/4X-BTG6o1Gn.d.ts +264 -0
- package/dist/4X-By9PzHaY.d.cts +31 -0
- package/dist/4X-C7fzDWJ_.d.cts +265 -0
- package/dist/5X-B5M0Cv_K.d.cts +22 -0
- package/dist/5X-CNAFsDm2.d.cts +77 -0
- package/dist/5X-CjSz1zxJ.d.ts +76 -0
- package/dist/5X-dhP6fyou.d.ts +21 -0
- package/dist/6X-B9KP_vEn.d.ts +104 -0
- package/dist/6X-BHaY0TCf.d.ts +15 -0
- package/dist/6X-C3elgd-n.d.cts +16 -0
- package/dist/6X-uObUP4VG.d.cts +105 -0
- package/dist/7X-BifJnY24.d.cts +71 -0
- package/dist/7X-C4eX_tAk.d.ts +15 -0
- package/dist/7X-D3idQBl9.d.cts +16 -0
- package/dist/7X-DtkQutx2.d.ts +70 -0
- package/dist/8X-5n9seY3z.d.ts +109 -0
- package/dist/8X-C6UMFvQW.d.cts +19 -0
- package/dist/8X-D6HTLShY.d.ts +18 -0
- package/dist/8X-DioBXCJ0.d.cts +110 -0
- package/dist/9X-BjffnXuq.d.cts +98 -0
- package/dist/9X-CHZKsIdD.d.ts +14 -0
- package/dist/9X-CJjPJgIG.d.cts +15 -0
- package/dist/9X-Cpb6V4JC.d.ts +97 -0
- package/dist/AX-C0w_r3PA.d.ts +110 -0
- package/dist/AX-DrEd2Ov6.d.cts +111 -0
- package/dist/BX-C5jc6myN.d.cts +115 -0
- package/dist/BX-RadlZ-6m.d.ts +114 -0
- package/dist/CX-CT1Zzb9D.d.ts +127 -0
- package/dist/CX-oSgvmn3h.d.cts +128 -0
- package/dist/DX-CtUeTKMM.d.ts +114 -0
- package/dist/DX-ZIG0enmK.d.cts +115 -0
- package/dist/EX-084Yu7Wt.d.ts +106 -0
- package/dist/EX-BpWZ5ADq.d.cts +107 -0
- package/dist/FX-BrbQM0CW.d.ts +126 -0
- package/dist/FX-CvYBEc51.d.cts +127 -0
- package/dist/GX-CU8PZy0G.d.cts +136 -0
- package/dist/GX-gKj8iAAh.d.ts +135 -0
- package/dist/HX-9D-ZXTy5.d.ts +125 -0
- package/dist/HX-DoEErDeE.d.cts +126 -0
- package/dist/IX-DR4Fc92A.d.ts +22 -0
- package/dist/IX-jLAUHe8i.d.cts +23 -0
- package/dist/JX-DIKa9ma-.d.ts +103 -0
- package/dist/JX-DX8BjYQC.d.cts +104 -0
- package/dist/KX-DpsJ_unT.d.ts +150 -0
- package/dist/KX-fZb4_vhw.d.cts +151 -0
- package/dist/LX-D_mI1bk-.d.cts +123 -0
- package/dist/LX-DeXPPWUX.d.ts +122 -0
- package/dist/MX-CKMjg_zK.d.ts +152 -0
- package/dist/MX-DlYZhpkT.d.cts +153 -0
- package/dist/NX-DELEEbad.d.cts +122 -0
- package/dist/NX-oYdb4NDo.d.ts +121 -0
- package/dist/OX-Bid9es3D.d.ts +25 -0
- package/dist/OX-CKPyrIFf.d.cts +26 -0
- package/dist/PX-D7jy9CFk.d.ts +120 -0
- package/dist/PX-SP6NxBtG.d.cts +121 -0
- package/dist/QX-BFWOR4g3.d.ts +58 -0
- package/dist/QX-QZA7E2O-.d.cts +59 -0
- package/dist/RX-DBcgbdeE.d.cts +23 -0
- package/dist/RX-XHgCyMV1.d.ts +22 -0
- package/dist/SX-Cl8RN8oH.d.ts +39 -0
- package/dist/SX-DmiJeCMN.d.cts +40 -0
- package/dist/TX-C1SoDobK.d.cts +31 -0
- package/dist/TX-ZymoIbtr.d.ts +30 -0
- package/dist/UX-D-Ndd1ov.d.ts +17 -0
- package/dist/UX-DFVynFhQ.d.cts +18 -0
- package/dist/VX-B-1b34r7.d.ts +16 -0
- package/dist/VX-DsRum5k3.d.cts +17 -0
- package/dist/WX-0GuMjPNZ.d.ts +25 -0
- package/dist/WX-VReU5R5M.d.cts +26 -0
- package/dist/XX-CF2NANsy.d.ts +827 -0
- package/dist/XX-ChAviUMj.d.cts +828 -0
- package/dist/YX-B51BbNSg.d.ts +19 -0
- package/dist/YX-QfzeMEKx.d.cts +20 -0
- package/dist/ZX-BMJS1iAv.d.ts +21 -0
- package/dist/ZX-Ca2E726a.d.cts +22 -0
- package/dist/api/platform/platformLogin.d.ts +65 -0
- package/dist/api/platform/platformLogin.js +3 -0
- 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/chunk-CUT6urMc.cjs +30 -0
- package/dist/classification-codes-B15PbWxz.d.cts +118 -0
- package/dist/classification-codes-BKxV-rO9.d.ts +117 -0
- package/dist/country-code-CQuaiQm2.d.ts +542 -0
- package/dist/country-code-DPeNFMMi.d.cts +543 -0
- package/dist/currencies-BYJK-m6v.d.ts +207 -0
- package/dist/currencies-S5g1gzBU.d.cts +208 -0
- 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-CQy_uB6C.d.cts +858 -0
- package/dist/documents-i5EV868Y.d.ts +857 -0
- package/dist/e-invoice-BuwtFnlI.d.cts +44 -0
- package/dist/e-invoice-CmbLQkHw.d.ts +43 -0
- package/dist/getBaseUrl-CO7Jp27d.cjs +14 -0
- package/dist/getBaseUrl-CO7Jp27d.cjs.map +1 -0
- package/dist/getBaseUrl-R3IdgCu3.js +7 -0
- package/dist/index-0-EvC6Nv.d.ts +15 -0
- package/dist/index-D2_HVwCz.d.cts +16 -0
- package/dist/index.cjs +309 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +233 -0
- package/dist/index.js +308 -0
- package/dist/index10.cjs +0 -0
- package/dist/index11.cjs +34 -0
- package/dist/index11.cjs.map +1 -0
- package/dist/index12.cjs +24 -0
- package/dist/index12.cjs.map +1 -0
- package/dist/index13.cjs +0 -0
- package/dist/index14.cjs +13 -0
- package/dist/index14.cjs.map +1 -0
- package/dist/index15.cjs +4 -0
- package/dist/index16.cjs +13 -0
- package/dist/index17.cjs +3 -0
- package/dist/index18.cjs +340 -0
- package/dist/index18.cjs.map +1 -0
- package/dist/index19.cjs +329 -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 +140 -0
- package/dist/index20.cjs.map +1 -0
- package/dist/index21.cjs +3 -0
- package/dist/index22.cjs +208 -0
- package/dist/index22.cjs.map +1 -0
- package/dist/index23.cjs +109 -0
- package/dist/index23.cjs.map +1 -0
- package/dist/index24.cjs +137 -0
- package/dist/index24.cjs.map +1 -0
- package/dist/index25.cjs +64 -0
- package/dist/index25.cjs.map +1 -0
- package/dist/index26.cjs +267 -0
- package/dist/index26.cjs.map +1 -0
- package/dist/index27.cjs +79 -0
- package/dist/index27.cjs.map +1 -0
- package/dist/index28.cjs +107 -0
- package/dist/index28.cjs.map +1 -0
- package/dist/index29.cjs +73 -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 +112 -0
- package/dist/index30.cjs.map +1 -0
- package/dist/index31.cjs +100 -0
- package/dist/index31.cjs.map +1 -0
- package/dist/index32.cjs +18 -0
- package/dist/index32.cjs.map +1 -0
- package/dist/index33.cjs +38 -0
- package/dist/index33.cjs.map +1 -0
- package/dist/index34.cjs +19 -0
- package/dist/index34.cjs.map +1 -0
- package/dist/index35.cjs +29 -0
- package/dist/index35.cjs.map +1 -0
- package/dist/index36.cjs +20 -0
- package/dist/index36.cjs.map +1 -0
- package/dist/index37.cjs +14 -0
- package/dist/index37.cjs.map +1 -0
- package/dist/index38.cjs +14 -0
- package/dist/index38.cjs.map +1 -0
- package/dist/index39.cjs +17 -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 +13 -0
- package/dist/index40.cjs.map +1 -0
- package/dist/index41.cjs +108 -0
- package/dist/index41.cjs.map +1 -0
- package/dist/index42.cjs +113 -0
- package/dist/index42.cjs.map +1 -0
- package/dist/index43.cjs +126 -0
- package/dist/index43.cjs.map +1 -0
- package/dist/index44.cjs +113 -0
- package/dist/index44.cjs.map +1 -0
- package/dist/index45.cjs +105 -0
- package/dist/index45.cjs.map +1 -0
- package/dist/index46.cjs +125 -0
- package/dist/index46.cjs.map +1 -0
- package/dist/index47.cjs +134 -0
- package/dist/index47.cjs.map +1 -0
- package/dist/index48.cjs +124 -0
- package/dist/index48.cjs.map +1 -0
- package/dist/index49.cjs +21 -0
- package/dist/index49.cjs.map +1 -0
- package/dist/index5.cjs +0 -0
- package/dist/index50.cjs +102 -0
- package/dist/index50.cjs.map +1 -0
- package/dist/index51.cjs +149 -0
- package/dist/index51.cjs.map +1 -0
- package/dist/index52.cjs +121 -0
- package/dist/index52.cjs.map +1 -0
- package/dist/index53.cjs +151 -0
- package/dist/index53.cjs.map +1 -0
- package/dist/index54.cjs +120 -0
- package/dist/index54.cjs.map +1 -0
- package/dist/index55.cjs +24 -0
- package/dist/index55.cjs.map +1 -0
- package/dist/index56.cjs +119 -0
- package/dist/index56.cjs.map +1 -0
- package/dist/index57.cjs +54 -0
- package/dist/index57.cjs.map +1 -0
- package/dist/index58.cjs +21 -0
- package/dist/index58.cjs.map +1 -0
- package/dist/index58.cts.map +1 -0
- package/dist/index59.cjs +35 -0
- package/dist/index59.cjs.map +1 -0
- package/dist/index59.cts.map +1 -0
- package/dist/index6.cjs +25 -0
- package/dist/index6.cjs.map +1 -0
- package/dist/index60.cjs +29 -0
- package/dist/index60.cjs.map +1 -0
- package/dist/index60.cts.map +1 -0
- package/dist/index61.cjs +16 -0
- package/dist/index61.cjs.map +1 -0
- package/dist/index61.cts.map +1 -0
- package/dist/index62.cjs +15 -0
- package/dist/index62.cjs.map +1 -0
- package/dist/index62.cts.map +1 -0
- package/dist/index63.cjs +24 -0
- package/dist/index63.cjs.map +1 -0
- package/dist/index63.cts.map +1 -0
- package/dist/index64.cjs +419 -0
- package/dist/index64.cjs.map +1 -0
- package/dist/index64.cts.map +1 -0
- package/dist/index65.cjs +15 -0
- package/dist/index65.cjs.map +1 -0
- package/dist/index65.cts.map +1 -0
- package/dist/index66.cjs +16 -0
- package/dist/index66.cjs.map +1 -0
- package/dist/index66.cts.map +1 -0
- package/dist/index7.cjs +0 -0
- package/dist/index8.cjs +0 -0
- package/dist/index9.cjs +25 -0
- package/dist/index9.cjs.map +1 -0
- package/dist/msic-codes-C8PJVOaA.d.ts +25 -0
- package/dist/msic-codes-CIKdPqag.d.cts +26 -0
- package/dist/payment-modes-BOTSRC_X.d.ts +43 -0
- package/dist/payment-modes-ghFEXnUl.d.cts +44 -0
- package/dist/platformLogin-PGzMhw1X.cjs +37 -0
- package/dist/platformLogin-PGzMhw1X.cjs.map +1 -0
- package/dist/platformLogin-f0bNAoZI.js +30 -0
- package/dist/signatures-W-_brwdb.d.ts +172 -0
- package/dist/signatures-hFbt_std.d.cts +173 -0
- package/dist/state-codes-BlILGZ9d.d.cts +62 -0
- package/dist/state-codes-oeFKlwXZ.d.ts +61 -0
- package/dist/tax-types-B5sQ8UyN.d.cts +42 -0
- package/dist/tax-types-CsQ76JMf.d.ts +41 -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.d.ts +18 -0
- package/dist/types/e-invoice.d.ts +2 -0
- package/dist/types/index.d.ts +58 -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-B41YFOLT.d.ts +55 -0
- package/dist/unit-types-CjWNk2wS.d.cts +56 -0
- package/dist/utils/base64.d.ts +5 -0
- package/dist/utils/base64.js +10 -0
- 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 +4 -0
- package/dist/utils/getBaseUrl.js +3 -0
- 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/package.json +4 -4
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "../1X-BywXCqtn.js";
|
|
2
|
+
import "../2X-3fSEGIuE.js";
|
|
3
|
+
import "../3X-Ynjfgoll.js";
|
|
4
|
+
import "../4X-B5ePdMky.js";
|
|
5
|
+
import "../5X-dhP6fyou.js";
|
|
6
|
+
import "../6X-BHaY0TCf.js";
|
|
7
|
+
import "../7X-C4eX_tAk.js";
|
|
8
|
+
import "../8X-D6HTLShY.js";
|
|
9
|
+
import "../9X-CHZKsIdD.js";
|
|
10
|
+
import "../AX-C0w_r3PA.js";
|
|
11
|
+
import "../BX-RadlZ-6m.js";
|
|
12
|
+
import "../CX-CT1Zzb9D.js";
|
|
13
|
+
import "../DX-CtUeTKMM.js";
|
|
14
|
+
import "../EX-084Yu7Wt.js";
|
|
15
|
+
import "../FX-BrbQM0CW.js";
|
|
16
|
+
import "../GX-gKj8iAAh.js";
|
|
17
|
+
import "../HX-9D-ZXTy5.js";
|
|
18
|
+
import "../IX-DR4Fc92A.js";
|
|
19
|
+
import "../JX-DIKa9ma-.js";
|
|
20
|
+
import "../KX-DpsJ_unT.js";
|
|
21
|
+
import "../LX-DeXPPWUX.js";
|
|
22
|
+
import "../MX-CKMjg_zK.js";
|
|
23
|
+
import "../NX-oYdb4NDo.js";
|
|
24
|
+
import "../OX-Bid9es3D.js";
|
|
25
|
+
import "../PX-D7jy9CFk.js";
|
|
26
|
+
import "../QX-BFWOR4g3.js";
|
|
27
|
+
import "../RX-XHgCyMV1.js";
|
|
28
|
+
import "../SX-Cl8RN8oH.js";
|
|
29
|
+
import "../TX-ZymoIbtr.js";
|
|
30
|
+
import "../UX-D-Ndd1ov.js";
|
|
31
|
+
import "../VX-B-1b34r7.js";
|
|
32
|
+
import "../WX-0GuMjPNZ.js";
|
|
33
|
+
import "../YX-B51BbNSg.js";
|
|
34
|
+
import "../ZX-BMJS1iAv.js";
|
|
35
|
+
import "../XX-CF2NANsy.js";
|
|
36
|
+
import { UnitType, UnitTypeCode } from "../unit-types-B41YFOLT.js";
|
|
37
|
+
export { UnitType, UnitTypeCode };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { UnitTypeCode_1X } from "./1X-BywXCqtn.js";
|
|
2
|
+
import { UnitTypeCode_2X } from "./2X-3fSEGIuE.js";
|
|
3
|
+
import { UnitTypeCode_3X } from "./3X-Ynjfgoll.js";
|
|
4
|
+
import { UnitTypeCode_4X } from "./4X-B5ePdMky.js";
|
|
5
|
+
import { UnitTypeCode_5X } from "./5X-dhP6fyou.js";
|
|
6
|
+
import { UnitTypeCode_6X } from "./6X-BHaY0TCf.js";
|
|
7
|
+
import { UnitTypeCode_7X } from "./7X-C4eX_tAk.js";
|
|
8
|
+
import { UnitTypeCode_8X } from "./8X-D6HTLShY.js";
|
|
9
|
+
import { UnitTypeCode_9X } from "./9X-CHZKsIdD.js";
|
|
10
|
+
import { UnitTypeCode_AX } from "./AX-C0w_r3PA.js";
|
|
11
|
+
import { UnitTypeCode_BX } from "./BX-RadlZ-6m.js";
|
|
12
|
+
import { UnitTypeCode_CX } from "./CX-CT1Zzb9D.js";
|
|
13
|
+
import { UnitTypeCode_DX } from "./DX-CtUeTKMM.js";
|
|
14
|
+
import { UnitTypeCode_EX } from "./EX-084Yu7Wt.js";
|
|
15
|
+
import { UnitTypeCode_FX } from "./FX-BrbQM0CW.js";
|
|
16
|
+
import { UnitTypeCode_GX } from "./GX-gKj8iAAh.js";
|
|
17
|
+
import { UnitTypeCode_HX } from "./HX-9D-ZXTy5.js";
|
|
18
|
+
import { UnitTypeCode_IX } from "./IX-DR4Fc92A.js";
|
|
19
|
+
import { UnitTypeCode_JX } from "./JX-DIKa9ma-.js";
|
|
20
|
+
import { UnitTypeCode_KX } from "./KX-DpsJ_unT.js";
|
|
21
|
+
import { UnitTypeCode_LX } from "./LX-DeXPPWUX.js";
|
|
22
|
+
import { UnitTypeCode_MX } from "./MX-CKMjg_zK.js";
|
|
23
|
+
import { UnitTypeCode_NX } from "./NX-oYdb4NDo.js";
|
|
24
|
+
import { UnitTypeCode_OX } from "./OX-Bid9es3D.js";
|
|
25
|
+
import { UnitTypeCode_PX } from "./PX-D7jy9CFk.js";
|
|
26
|
+
import { UnitTypeCode_QX } from "./QX-BFWOR4g3.js";
|
|
27
|
+
import { UnitTypeCode_RX } from "./RX-XHgCyMV1.js";
|
|
28
|
+
import { UnitTypeCode_SX } from "./SX-Cl8RN8oH.js";
|
|
29
|
+
import { UnitTypeCode_TX } from "./TX-ZymoIbtr.js";
|
|
30
|
+
import { UnitTypeCode_UX } from "./UX-D-Ndd1ov.js";
|
|
31
|
+
import { UnitTypeCode_VX } from "./VX-B-1b34r7.js";
|
|
32
|
+
import { UnitTypeCode_WX } from "./WX-0GuMjPNZ.js";
|
|
33
|
+
import { UnitTypeCode_YX } from "./YX-B51BbNSg.js";
|
|
34
|
+
import { UnitTypeCode_ZX } from "./ZX-BMJS1iAv.js";
|
|
35
|
+
import { UnitTypeCode_XX } from "./XX-CF2NANsy.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 };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { UnitTypeCode_1X } from "./1X-ClnJ79HH.cjs";
|
|
2
|
+
import { UnitTypeCode_2X } from "./2X-CV9eYhog.cjs";
|
|
3
|
+
import { UnitTypeCode_3X } from "./3X--VWVsC84.cjs";
|
|
4
|
+
import { UnitTypeCode_4X } from "./4X-By9PzHaY.cjs";
|
|
5
|
+
import { UnitTypeCode_5X } from "./5X-B5M0Cv_K.cjs";
|
|
6
|
+
import { UnitTypeCode_6X } from "./6X-C3elgd-n.cjs";
|
|
7
|
+
import { UnitTypeCode_7X } from "./7X-D3idQBl9.cjs";
|
|
8
|
+
import { UnitTypeCode_8X } from "./8X-C6UMFvQW.cjs";
|
|
9
|
+
import { UnitTypeCode_9X } from "./9X-CJjPJgIG.cjs";
|
|
10
|
+
import { UnitTypeCode_AX } from "./AX-DrEd2Ov6.cjs";
|
|
11
|
+
import { UnitTypeCode_BX } from "./BX-C5jc6myN.cjs";
|
|
12
|
+
import { UnitTypeCode_CX } from "./CX-oSgvmn3h.cjs";
|
|
13
|
+
import { UnitTypeCode_DX } from "./DX-ZIG0enmK.cjs";
|
|
14
|
+
import { UnitTypeCode_EX } from "./EX-BpWZ5ADq.cjs";
|
|
15
|
+
import { UnitTypeCode_FX } from "./FX-CvYBEc51.cjs";
|
|
16
|
+
import { UnitTypeCode_GX } from "./GX-CU8PZy0G.cjs";
|
|
17
|
+
import { UnitTypeCode_HX } from "./HX-DoEErDeE.cjs";
|
|
18
|
+
import { UnitTypeCode_IX } from "./IX-jLAUHe8i.cjs";
|
|
19
|
+
import { UnitTypeCode_JX } from "./JX-DX8BjYQC.cjs";
|
|
20
|
+
import { UnitTypeCode_KX } from "./KX-fZb4_vhw.cjs";
|
|
21
|
+
import { UnitTypeCode_LX } from "./LX-D_mI1bk-.cjs";
|
|
22
|
+
import { UnitTypeCode_MX } from "./MX-DlYZhpkT.cjs";
|
|
23
|
+
import { UnitTypeCode_NX } from "./NX-DELEEbad.cjs";
|
|
24
|
+
import { UnitTypeCode_OX } from "./OX-CKPyrIFf.cjs";
|
|
25
|
+
import { UnitTypeCode_PX } from "./PX-SP6NxBtG.cjs";
|
|
26
|
+
import { UnitTypeCode_QX } from "./QX-QZA7E2O-.cjs";
|
|
27
|
+
import { UnitTypeCode_RX } from "./RX-DBcgbdeE.cjs";
|
|
28
|
+
import { UnitTypeCode_SX } from "./SX-DmiJeCMN.cjs";
|
|
29
|
+
import { UnitTypeCode_TX } from "./TX-C1SoDobK.cjs";
|
|
30
|
+
import { UnitTypeCode_UX } from "./UX-DFVynFhQ.cjs";
|
|
31
|
+
import { UnitTypeCode_VX } from "./VX-DsRum5k3.cjs";
|
|
32
|
+
import { UnitTypeCode_WX } from "./WX-VReU5R5M.cjs";
|
|
33
|
+
import { UnitTypeCode_YX } from "./YX-QfzeMEKx.cjs";
|
|
34
|
+
import { UnitTypeCode_ZX } from "./ZX-Ca2E726a.cjs";
|
|
35
|
+
import { UnitTypeCode_XX } from "./XX-ChAviUMj.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-CjWNk2wS.d.cts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/utils/base64.ts
|
|
2
|
+
function encodeToBase64(content) {
|
|
3
|
+
return Buffer.from(content).toString("base64");
|
|
4
|
+
}
|
|
5
|
+
function decodeFromBase64(content) {
|
|
6
|
+
return Buffer.from(content, "base64").toString("utf-8");
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { decodeFromBase64, encodeToBase64 };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/utils/certificate.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Extracts certificate information from PEM certificate
|
|
4
|
+
* Converts hex serial number to decimal as required by MyInvois
|
|
5
|
+
*
|
|
6
|
+
* @param certificatePem - Certificate in PEM format
|
|
7
|
+
* @returns Object with issuer name and decimal serial number
|
|
8
|
+
*/
|
|
9
|
+
declare const extractCertificateInfo: (certificatePem: string) => {
|
|
10
|
+
issuerName: string;
|
|
11
|
+
serialNumber: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Validates that certificate and private key form a valid pair
|
|
15
|
+
*
|
|
16
|
+
* @param certificatePem - Certificate in PEM format
|
|
17
|
+
* @param privateKeyPem - Private key in PEM format
|
|
18
|
+
* @returns Boolean indicating if key pair is valid
|
|
19
|
+
*/
|
|
20
|
+
declare const validateKeyPair: (certificatePem: string, privateKeyPem: string) => boolean;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { extractCertificateInfo, validateKeyPair };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import "../classification-codes-BKxV-rO9.js";
|
|
2
|
+
import "../country-code-CQuaiQm2.js";
|
|
3
|
+
import "../currencies-BYJK-m6v.js";
|
|
4
|
+
import "../e-invoice-CmbLQkHw.js";
|
|
5
|
+
import "../0X-CTIq3y3a.js";
|
|
6
|
+
import "../1X-Bu4oiv8D.js";
|
|
7
|
+
import "../2X-DnG3FY1f.js";
|
|
8
|
+
import "../3X-CLdmoel1.js";
|
|
9
|
+
import "../4X-BTG6o1Gn.js";
|
|
10
|
+
import "../5X-CjSz1zxJ.js";
|
|
11
|
+
import "../6X-B9KP_vEn.js";
|
|
12
|
+
import "../7X-DtkQutx2.js";
|
|
13
|
+
import "../8X-5n9seY3z.js";
|
|
14
|
+
import "../9X-Cpb6V4JC.js";
|
|
15
|
+
import "../msic-codes-C8PJVOaA.js";
|
|
16
|
+
import "../signatures-W-_brwdb.js";
|
|
17
|
+
import "../tax-types-CsQ76JMf.js";
|
|
18
|
+
import { CompleteInvoice, InvoiceSubmission, InvoiceV1_1, SignedInfoObject, SignedPropertiesObject, SigningCredentials, UBLDocument } from "../documents-i5EV868Y.js";
|
|
19
|
+
import "../payment-modes-BOTSRC_X.js";
|
|
20
|
+
import "../1X-BywXCqtn.js";
|
|
21
|
+
import "../2X-3fSEGIuE.js";
|
|
22
|
+
import "../3X-Ynjfgoll.js";
|
|
23
|
+
import "../4X-B5ePdMky.js";
|
|
24
|
+
import "../5X-dhP6fyou.js";
|
|
25
|
+
import "../6X-BHaY0TCf.js";
|
|
26
|
+
import "../7X-C4eX_tAk.js";
|
|
27
|
+
import "../8X-D6HTLShY.js";
|
|
28
|
+
import "../9X-CHZKsIdD.js";
|
|
29
|
+
import "../AX-C0w_r3PA.js";
|
|
30
|
+
import "../BX-RadlZ-6m.js";
|
|
31
|
+
import "../CX-CT1Zzb9D.js";
|
|
32
|
+
import "../DX-CtUeTKMM.js";
|
|
33
|
+
import "../EX-084Yu7Wt.js";
|
|
34
|
+
import "../FX-BrbQM0CW.js";
|
|
35
|
+
import "../GX-gKj8iAAh.js";
|
|
36
|
+
import "../HX-9D-ZXTy5.js";
|
|
37
|
+
import "../IX-DR4Fc92A.js";
|
|
38
|
+
import "../JX-DIKa9ma-.js";
|
|
39
|
+
import "../KX-DpsJ_unT.js";
|
|
40
|
+
import "../LX-DeXPPWUX.js";
|
|
41
|
+
import "../MX-CKMjg_zK.js";
|
|
42
|
+
import "../NX-oYdb4NDo.js";
|
|
43
|
+
import "../OX-Bid9es3D.js";
|
|
44
|
+
import "../PX-D7jy9CFk.js";
|
|
45
|
+
import "../QX-BFWOR4g3.js";
|
|
46
|
+
import "../RX-XHgCyMV1.js";
|
|
47
|
+
import "../SX-Cl8RN8oH.js";
|
|
48
|
+
import "../TX-ZymoIbtr.js";
|
|
49
|
+
import "../UX-D-Ndd1ov.js";
|
|
50
|
+
import "../VX-B-1b34r7.js";
|
|
51
|
+
import "../WX-0GuMjPNZ.js";
|
|
52
|
+
import "../YX-B51BbNSg.js";
|
|
53
|
+
import "../ZX-BMJS1iAv.js";
|
|
54
|
+
import "../XX-CF2NANsy.js";
|
|
55
|
+
import "../unit-types-B41YFOLT.js";
|
|
56
|
+
import "../state-codes-oeFKlwXZ.js";
|
|
57
|
+
import "../index-0-EvC6Nv.js";
|
|
58
|
+
|
|
59
|
+
//#region src/utils/document.d.ts
|
|
60
|
+
/**
|
|
61
|
+
* MyInvois v1.1 Document Generation and Signing Utilities
|
|
62
|
+
* Strictly follows: https://sdk.myinvois.hasil.gov.my/documents/invoice-v1-1
|
|
63
|
+
* JSON Signature Guide: https://sdk.myinvois.hasil.gov.my/signature-creation-json/
|
|
64
|
+
*/
|
|
65
|
+
/**
|
|
66
|
+
* Helper function to recursively sort object keys for JSON canonicalization
|
|
67
|
+
*/
|
|
68
|
+
declare function sortObjectKeys(obj: unknown): unknown;
|
|
69
|
+
/**
|
|
70
|
+
* Enhanced canonicalization following MyInvois specification exactly
|
|
71
|
+
* Key changes: ensure consistent ordering and formatting
|
|
72
|
+
*/
|
|
73
|
+
declare const canonicalizeJSON: (obj: unknown) => string;
|
|
74
|
+
/**
|
|
75
|
+
* Generates a clean invoice object following MyInvois v1.1 specification exactly
|
|
76
|
+
* This is the base invoice structure WITHOUT signature elements (for hash calculation)
|
|
77
|
+
*
|
|
78
|
+
* Key requirements from working documents:
|
|
79
|
+
* - All mandatory fields must be present
|
|
80
|
+
* - Many optional fields must be present even if empty
|
|
81
|
+
* - Specific field ordering and structure
|
|
82
|
+
* - Correct listID values (e.g., "3166-1" not "ISO3166-1")
|
|
83
|
+
*/
|
|
84
|
+
declare const generateCleanInvoiceObject: (invoice: InvoiceV1_1) => InvoiceSubmission;
|
|
85
|
+
/**
|
|
86
|
+
* Generates the complete UBL document structure with namespace declarations
|
|
87
|
+
*/
|
|
88
|
+
declare const generateCleanUBLDocument: (invoices: InvoiceV1_1[]) => UBLDocument;
|
|
89
|
+
/**
|
|
90
|
+
* Step 2: Calculate Document Digest
|
|
91
|
+
* FIXED: Remove UBLExtensions and Signature before hashing (DS322)
|
|
92
|
+
* Based on working implementation pattern
|
|
93
|
+
*/
|
|
94
|
+
declare const calculateDocumentDigest: (invoices: InvoiceV1_1[]) => string;
|
|
95
|
+
/**
|
|
96
|
+
* Step 4: Calculate Certificate Digest
|
|
97
|
+
* Enhanced to handle certificate content properly
|
|
98
|
+
*/
|
|
99
|
+
declare const calculateCertificateDigest: (certificatePem: string) => string;
|
|
100
|
+
/**
|
|
101
|
+
* Enhanced certificate info extraction with better error handling
|
|
102
|
+
* FIXED: Normalize issuer name format to match MyInvois expectations (DS326)
|
|
103
|
+
*/
|
|
104
|
+
declare const extractCertificateInfo: (certificatePem: string) => {
|
|
105
|
+
issuerName: string;
|
|
106
|
+
serialNumber: string;
|
|
107
|
+
subjectName: string;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Step 5: Create SignedProperties with enhanced structure
|
|
111
|
+
* FIXED: Simplified structure to match MyInvois expectations (DS320)
|
|
112
|
+
* Following MyInvois JSON signature specification exactly
|
|
113
|
+
*/
|
|
114
|
+
declare const createSignedProperties: (certificateDigest: string, signingTime: string, issuerName: string, serialNumber: string) => SignedPropertiesObject;
|
|
115
|
+
/**
|
|
116
|
+
* Step 6: Calculate SignedProperties Digest
|
|
117
|
+
* FIXED: Add Target wrapper and use direct JSON stringify (DS320)
|
|
118
|
+
* Based on working implementation pattern
|
|
119
|
+
*/
|
|
120
|
+
declare const calculateSignedPropertiesDigest: (signedProperties: SignedPropertiesObject) => string;
|
|
121
|
+
/**
|
|
122
|
+
* Step 3: Create SignedInfo and calculate signature
|
|
123
|
+
* Enhanced with better structure and signature generation
|
|
124
|
+
*/
|
|
125
|
+
declare const createSignedInfoAndSign: (docDigest: string, propsDigest: string, privateKeyPem: string) => {
|
|
126
|
+
signedInfo: SignedInfoObject;
|
|
127
|
+
signatureValue: string;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Complete document generation with signatures
|
|
131
|
+
* Follows the complete MyInvois JSON signature creation process (Steps 1-7)
|
|
132
|
+
*/
|
|
133
|
+
declare const generateCompleteDocument: (invoices: InvoiceV1_1[], signingCredentials: SigningCredentials) => CompleteInvoice;
|
|
134
|
+
//#endregion
|
|
135
|
+
export { calculateCertificateDigest, calculateDocumentDigest, calculateSignedPropertiesDigest, canonicalizeJSON, createSignedInfoAndSign, createSignedProperties, extractCertificateInfo, generateCleanInvoiceObject, generateCleanUBLDocument, generateCompleteDocument, sortObjectKeys };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { calculateCertificateDigest, calculateDocumentDigest, calculateSignedPropertiesDigest, canonicalizeJSON, createSignedInfoAndSign, createSignedProperties, extractCertificateInfo, generateCleanInvoiceObject, generateCleanUBLDocument, generateCompleteDocument, sortObjectKeys } from "../document-D6VKMAtx.js";
|
|
2
|
+
|
|
3
|
+
export { calculateCertificateDigest, calculateDocumentDigest, calculateSignedPropertiesDigest, canonicalizeJSON, createSignedInfoAndSign, createSignedProperties, extractCertificateInfo, generateCleanInvoiceObject, generateCleanUBLDocument, generateCompleteDocument, sortObjectKeys };
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { AdditionalDocumentReference, AllowanceCharge, CurrencyExchangeRate, Delivery, InvoiceV1_1, PaymentMeans } from "../types/documents/index.js";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/helpers.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* MyInvois Invoice Helper Functions
|
|
7
|
+
*
|
|
8
|
+
* Provides convenient utilities for common invoice scenarios and business patterns.
|
|
9
|
+
* These helpers simplify the creation of compliant MyInvois documents.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Payment Method Helpers
|
|
13
|
+
*/
|
|
14
|
+
declare const PaymentHelpers: {
|
|
15
|
+
/**
|
|
16
|
+
* Creates cash payment means
|
|
17
|
+
*/
|
|
18
|
+
cash(): PaymentMeans;
|
|
19
|
+
/**
|
|
20
|
+
* Creates cheque payment means
|
|
21
|
+
*/
|
|
22
|
+
cheque(accountId?: string): PaymentMeans;
|
|
23
|
+
/**
|
|
24
|
+
* Creates bank transfer payment means
|
|
25
|
+
*/
|
|
26
|
+
bankTransfer(accountId: string, dueDate?: string): PaymentMeans;
|
|
27
|
+
/**
|
|
28
|
+
* Creates credit card payment means
|
|
29
|
+
*/
|
|
30
|
+
creditCard(): PaymentMeans;
|
|
31
|
+
/**
|
|
32
|
+
* Creates e-wallet payment means
|
|
33
|
+
*/
|
|
34
|
+
eWallet(accountId?: string): PaymentMeans;
|
|
35
|
+
/**
|
|
36
|
+
* Creates custom payment terms with specific due date
|
|
37
|
+
*/
|
|
38
|
+
net(days: number, accountId?: string): PaymentMeans;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Currency and Exchange Rate Helpers
|
|
42
|
+
*/
|
|
43
|
+
declare const CurrencyHelpers: {
|
|
44
|
+
/**
|
|
45
|
+
* Creates domestic MYR transaction (no exchange rate needed)
|
|
46
|
+
*/
|
|
47
|
+
domestic(): CurrencyExchangeRate;
|
|
48
|
+
/**
|
|
49
|
+
* Creates international transaction with exchange rate
|
|
50
|
+
*/
|
|
51
|
+
international(fromCurrency: string, toCurrency: string | undefined, exchangeRate: number, rateDate?: string): CurrencyExchangeRate;
|
|
52
|
+
/**
|
|
53
|
+
* Common exchange rates (these should be updated with real-time rates)
|
|
54
|
+
*/
|
|
55
|
+
commonRates: {
|
|
56
|
+
USD_MYR: number;
|
|
57
|
+
SGD_MYR: number;
|
|
58
|
+
EUR_MYR: number;
|
|
59
|
+
GBP_MYR: number;
|
|
60
|
+
JPY_MYR: number;
|
|
61
|
+
AUD_MYR: number;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Tax Calculation Helpers
|
|
66
|
+
*/
|
|
67
|
+
declare const TaxHelpers: {
|
|
68
|
+
/**
|
|
69
|
+
* Calculates SST (6%) for goods
|
|
70
|
+
*/
|
|
71
|
+
calculateSST(amount: number, rate?: number): {
|
|
72
|
+
taxAmount: number;
|
|
73
|
+
totalWithTax: number;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Calculates Service Tax for services
|
|
77
|
+
*/
|
|
78
|
+
calculateServiceTax(amount: number, rate?: number): {
|
|
79
|
+
taxAmount: number;
|
|
80
|
+
totalWithTax: number;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Zero-rated calculation (0% tax)
|
|
84
|
+
*/
|
|
85
|
+
zeroRated(amount: number): {
|
|
86
|
+
taxAmount: number;
|
|
87
|
+
totalWithTax: number;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Exempt calculation (no tax)
|
|
91
|
+
*/
|
|
92
|
+
exempt(amount: number): {
|
|
93
|
+
taxAmount: number;
|
|
94
|
+
totalWithTax: number;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Allowance and Charge Helpers
|
|
99
|
+
*/
|
|
100
|
+
declare const AllowanceChargeHelpers: {
|
|
101
|
+
/**
|
|
102
|
+
* Creates a discount allowance
|
|
103
|
+
*/
|
|
104
|
+
discount(reason: string, amount: number, percentage?: number): AllowanceCharge;
|
|
105
|
+
/**
|
|
106
|
+
* Creates a shipping charge
|
|
107
|
+
*/
|
|
108
|
+
shipping(amount: number, description?: string): AllowanceCharge;
|
|
109
|
+
/**
|
|
110
|
+
* Creates an early payment discount
|
|
111
|
+
*/
|
|
112
|
+
earlyPaymentDiscount(percentage: number, baseAmount: number): AllowanceCharge;
|
|
113
|
+
/**
|
|
114
|
+
* Creates a handling fee charge
|
|
115
|
+
*/
|
|
116
|
+
handlingFee(amount: number): AllowanceCharge;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Delivery Helpers
|
|
120
|
+
*/
|
|
121
|
+
declare const DeliveryHelpers: {
|
|
122
|
+
/**
|
|
123
|
+
* Creates standard delivery information
|
|
124
|
+
*/
|
|
125
|
+
standard(deliveryDate: string, address: {
|
|
126
|
+
addressLine0: string;
|
|
127
|
+
cityName: string;
|
|
128
|
+
postalZone?: string;
|
|
129
|
+
state: string;
|
|
130
|
+
country?: string;
|
|
131
|
+
}): Delivery;
|
|
132
|
+
/**
|
|
133
|
+
* Creates pickup delivery (customer pickup)
|
|
134
|
+
*/
|
|
135
|
+
pickup(pickupDate: string): Delivery;
|
|
136
|
+
/**
|
|
137
|
+
* Creates delivery with freight charges
|
|
138
|
+
*/
|
|
139
|
+
withFreight(deliveryDate: string, address: any, freightAmount: number, freightDescription?: string): Delivery;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Document Reference Helpers
|
|
143
|
+
*/
|
|
144
|
+
declare const DocumentReferenceHelpers: {
|
|
145
|
+
/**
|
|
146
|
+
* Creates purchase order reference
|
|
147
|
+
*/
|
|
148
|
+
purchaseOrder(poNumber: string): {
|
|
149
|
+
purchaseOrderReference: string;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Creates contract reference
|
|
153
|
+
*/
|
|
154
|
+
contract(contractNumber: string): {
|
|
155
|
+
contractReference: string;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Creates project reference
|
|
159
|
+
*/
|
|
160
|
+
project(projectNumber: string): {
|
|
161
|
+
projectReference: string;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* Creates billing reference
|
|
165
|
+
*/
|
|
166
|
+
billing(billingNumber: string): {
|
|
167
|
+
billingReference: string;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Creates customs reference
|
|
171
|
+
*/
|
|
172
|
+
customs(customsFormNumber: string): AdditionalDocumentReference;
|
|
173
|
+
/**
|
|
174
|
+
* Creates free trade agreement reference
|
|
175
|
+
*/
|
|
176
|
+
freeTradeAgreement(ftaNumber: string, country: string): AdditionalDocumentReference;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Industry Classification Helpers
|
|
180
|
+
*/
|
|
181
|
+
declare const IndustryHelpers: {
|
|
182
|
+
/**
|
|
183
|
+
* Common industry classifications with proper codes and descriptions
|
|
184
|
+
*/
|
|
185
|
+
trading: {
|
|
186
|
+
industryClassificationCode: string;
|
|
187
|
+
industryClassificationDescription: string;
|
|
188
|
+
};
|
|
189
|
+
manufacturing: {
|
|
190
|
+
industryClassificationCode: string;
|
|
191
|
+
industryClassificationDescription: string;
|
|
192
|
+
};
|
|
193
|
+
software: {
|
|
194
|
+
industryClassificationCode: string;
|
|
195
|
+
industryClassificationDescription: string;
|
|
196
|
+
};
|
|
197
|
+
consulting: {
|
|
198
|
+
industryClassificationCode: string;
|
|
199
|
+
industryClassificationDescription: string;
|
|
200
|
+
};
|
|
201
|
+
restaurant: {
|
|
202
|
+
industryClassificationCode: string;
|
|
203
|
+
industryClassificationDescription: string;
|
|
204
|
+
};
|
|
205
|
+
construction: {
|
|
206
|
+
industryClassificationCode: string;
|
|
207
|
+
industryClassificationDescription: string;
|
|
208
|
+
};
|
|
209
|
+
logistics: {
|
|
210
|
+
industryClassificationCode: string;
|
|
211
|
+
industryClassificationDescription: string;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Creates custom industry classification
|
|
215
|
+
*/
|
|
216
|
+
custom(code: string, description: string): {
|
|
217
|
+
industryClassificationCode: string;
|
|
218
|
+
industryClassificationDescription: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Date and Time Helpers
|
|
223
|
+
*/
|
|
224
|
+
declare const DateTimeHelpers: {
|
|
225
|
+
/**
|
|
226
|
+
* Gets current date in MyInvois format (YYYY-MM-DD)
|
|
227
|
+
*/
|
|
228
|
+
currentDate(): string;
|
|
229
|
+
/**
|
|
230
|
+
* Gets current time in MyInvois format (HH:mm:ssZ)
|
|
231
|
+
*/
|
|
232
|
+
currentTime(): string;
|
|
233
|
+
/**
|
|
234
|
+
* Formats date to MyInvois format
|
|
235
|
+
*/
|
|
236
|
+
formatDate(date: Date): string;
|
|
237
|
+
/**
|
|
238
|
+
* Formats time to MyInvois format
|
|
239
|
+
*/
|
|
240
|
+
formatTime(date: Date): string;
|
|
241
|
+
/**
|
|
242
|
+
* Adds days to a date
|
|
243
|
+
*/
|
|
244
|
+
addDays(date: Date, days: number): Date;
|
|
245
|
+
/**
|
|
246
|
+
* Gets billing period for monthly billing
|
|
247
|
+
*/
|
|
248
|
+
monthlyPeriod(year: number, month: number): {
|
|
249
|
+
start: string;
|
|
250
|
+
end: string;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Complete Invoice Builder Helper
|
|
255
|
+
*/
|
|
256
|
+
declare const InvoiceBuilder: {
|
|
257
|
+
/**
|
|
258
|
+
* Creates a basic cash invoice template
|
|
259
|
+
*/
|
|
260
|
+
basicCash(invoiceNumber: string): Partial<InvoiceV1_1>;
|
|
261
|
+
/**
|
|
262
|
+
* Creates a business invoice template with bank transfer
|
|
263
|
+
*/
|
|
264
|
+
businessInvoice(invoiceNumber: string, accountId: string, netDays?: number): Partial<InvoiceV1_1>;
|
|
265
|
+
/**
|
|
266
|
+
* Creates an international invoice template
|
|
267
|
+
*/
|
|
268
|
+
international(invoiceNumber: string, currency: string, exchangeRate: number): Partial<InvoiceV1_1>;
|
|
269
|
+
};
|
|
270
|
+
//#endregion
|
|
271
|
+
export { AllowanceChargeHelpers, CurrencyHelpers, DateTimeHelpers, DeliveryHelpers, DocumentReferenceHelpers, IndustryHelpers, InvoiceBuilder, PaymentHelpers, TaxHelpers };
|