@ripwords/myinvois-client 0.1.4 → 0.1.5
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 +13 -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,19 @@
|
|
|
1
|
+
//#region src/types/unit/YX.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Unit types starting with Y
|
|
4
|
+
* https://sdk.myinvois.hasil.gov.my/codes/unit-types/
|
|
5
|
+
*/
|
|
6
|
+
type UnitTypeCode_YX = 'YDK' // square yard
|
|
7
|
+
| 'YDQ' // cubic yard
|
|
8
|
+
| 'YRD'; // yard
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Enum representing unit type codes starting with 'Y'.
|
|
12
|
+
*/
|
|
13
|
+
declare enum UnitTypeCodeEnum_YX {
|
|
14
|
+
SquareYard = 'YDK',
|
|
15
|
+
CubicYard = 'YDQ',
|
|
16
|
+
Yard = 'YRD',
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { UnitTypeCodeEnum_YX, UnitTypeCode_YX };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/types/unit/YX.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Unit types starting with Y
|
|
4
|
+
* https://sdk.myinvois.hasil.gov.my/codes/unit-types/
|
|
5
|
+
*/
|
|
6
|
+
type UnitTypeCode_YX = 'YDK' // square yard
|
|
7
|
+
| 'YDQ' // cubic yard
|
|
8
|
+
| 'YRD'; // yard
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Enum representing unit type codes starting with 'Y'.
|
|
12
|
+
*/
|
|
13
|
+
declare enum UnitTypeCodeEnum_YX {
|
|
14
|
+
SquareYard = 'YDK',
|
|
15
|
+
CubicYard = 'YDQ',
|
|
16
|
+
Yard = 'YRD',
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { UnitTypeCodeEnum_YX, UnitTypeCode_YX };
|
|
20
|
+
//# sourceMappingURL=YX-QfzeMEKx.d.cts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/types/unit/ZX.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Unit types starting with Z
|
|
4
|
+
* https://sdk.myinvois.hasil.gov.my/codes/unit-types/
|
|
5
|
+
*/
|
|
6
|
+
type UnitTypeCode_ZX = 'Z11' // hanging container
|
|
7
|
+
| 'Z9' // nanomole
|
|
8
|
+
| 'ZP' // page
|
|
9
|
+
| 'ZZ'; // mutually defined
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Enum representing unit type codes starting with 'Z'.
|
|
13
|
+
*/
|
|
14
|
+
declare enum UnitTypeCodeEnum_ZX {
|
|
15
|
+
HangingContainer = 'Z11',
|
|
16
|
+
Nanomole = 'Z9',
|
|
17
|
+
Page = 'ZP',
|
|
18
|
+
MutuallyDefined = 'ZZ',
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { UnitTypeCodeEnum_ZX, UnitTypeCode_ZX };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/types/unit/ZX.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Unit types starting with Z
|
|
4
|
+
* https://sdk.myinvois.hasil.gov.my/codes/unit-types/
|
|
5
|
+
*/
|
|
6
|
+
type UnitTypeCode_ZX = 'Z11' // hanging container
|
|
7
|
+
| 'Z9' // nanomole
|
|
8
|
+
| 'ZP' // page
|
|
9
|
+
| 'ZZ'; // mutually defined
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Enum representing unit type codes starting with 'Z'.
|
|
13
|
+
*/
|
|
14
|
+
declare enum UnitTypeCodeEnum_ZX {
|
|
15
|
+
HangingContainer = 'Z11',
|
|
16
|
+
Nanomole = 'Z9',
|
|
17
|
+
Page = 'ZP',
|
|
18
|
+
MutuallyDefined = 'ZZ',
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { UnitTypeCodeEnum_ZX, UnitTypeCode_ZX };
|
|
22
|
+
//# sourceMappingURL=ZX-Ca2E726a.d.cts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
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 "../../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 { ClientCredentials } from "../../index-0-EvC6Nv.js";
|
|
58
|
+
|
|
59
|
+
//#region src/api/platform/platformLogin.d.ts
|
|
60
|
+
declare const platformLogin: (client: ClientCredentials) => Promise<{
|
|
61
|
+
token: string;
|
|
62
|
+
tokenExpiration: Date;
|
|
63
|
+
}>;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { platformLogin };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const crypto = require_chunk.__toESM(require("crypto"));
|
|
3
|
+
|
|
4
|
+
//#region src/utils/certificate.ts
|
|
5
|
+
/**
|
|
6
|
+
* Extracts certificate information from PEM certificate
|
|
7
|
+
* Converts hex serial number to decimal as required by MyInvois
|
|
8
|
+
*
|
|
9
|
+
* @param certificatePem - Certificate in PEM format
|
|
10
|
+
* @returns Object with issuer name and decimal serial number
|
|
11
|
+
*/
|
|
12
|
+
const extractCertificateInfo = (certificatePem) => {
|
|
13
|
+
try {
|
|
14
|
+
const cert = new crypto.default.X509Certificate(certificatePem);
|
|
15
|
+
const serialNumberHex = cert.serialNumber;
|
|
16
|
+
const serialNumberDecimal = BigInt("0x" + serialNumberHex).toString();
|
|
17
|
+
return {
|
|
18
|
+
issuerName: cert.issuer,
|
|
19
|
+
serialNumber: serialNumberDecimal
|
|
20
|
+
};
|
|
21
|
+
} catch (error) {
|
|
22
|
+
throw new Error(`Failed to extract certificate info: ${error}`);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Validates that certificate and private key form a valid pair
|
|
27
|
+
*
|
|
28
|
+
* @param certificatePem - Certificate in PEM format
|
|
29
|
+
* @param privateKeyPem - Private key in PEM format
|
|
30
|
+
* @returns Boolean indicating if key pair is valid
|
|
31
|
+
*/
|
|
32
|
+
const validateKeyPair = (certificatePem, privateKeyPem) => {
|
|
33
|
+
try {
|
|
34
|
+
const cert = new crypto.default.X509Certificate(certificatePem);
|
|
35
|
+
const publicKey = cert.publicKey;
|
|
36
|
+
const testData = "validation-test-data";
|
|
37
|
+
const signer = crypto.default.createSign("RSA-SHA256");
|
|
38
|
+
signer.update(testData);
|
|
39
|
+
const signature = signer.sign(privateKeyPem);
|
|
40
|
+
const verifier = crypto.default.createVerify("RSA-SHA256");
|
|
41
|
+
verifier.update(testData);
|
|
42
|
+
return verifier.verify(publicKey, signature);
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.error("Key pair validation failed:", error);
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
Object.defineProperty(exports, 'extractCertificateInfo', {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () {
|
|
53
|
+
return extractCertificateInfo;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, 'validateKeyPair', {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () {
|
|
59
|
+
return validateKeyPair;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=certificate-DFK-788s.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"certificate-DFK-788s.cjs","names":["certificatePem: string","privateKeyPem: string"],"sources":["../src/utils/certificate.ts"],"sourcesContent":["import crypto from 'crypto'\n\n/**\n * Extracts certificate information from PEM certificate\n * Converts hex serial number to decimal as required by MyInvois\n *\n * @param certificatePem - Certificate in PEM format\n * @returns Object with issuer name and decimal serial number\n */\nexport const extractCertificateInfo = (\n certificatePem: string,\n): {\n issuerName: string\n serialNumber: string\n} => {\n try {\n const cert = new crypto.X509Certificate(certificatePem)\n\n // Convert hex serial number to decimal (MyInvois requirement)\n const serialNumberHex = cert.serialNumber\n const serialNumberDecimal = BigInt('0x' + serialNumberHex).toString()\n\n return {\n issuerName: cert.issuer,\n serialNumber: serialNumberDecimal,\n }\n } catch (error) {\n throw new Error(`Failed to extract certificate info: ${error}`)\n }\n}\n\n/**\n * Validates that certificate and private key form a valid pair\n *\n * @param certificatePem - Certificate in PEM format\n * @param privateKeyPem - Private key in PEM format\n * @returns Boolean indicating if key pair is valid\n */\nexport const validateKeyPair = (\n certificatePem: string,\n privateKeyPem: string,\n): boolean => {\n try {\n const cert = new crypto.X509Certificate(certificatePem)\n const publicKey = cert.publicKey\n\n // Test signature/verification cycle\n const testData = 'validation-test-data'\n const signer = crypto.createSign('RSA-SHA256')\n signer.update(testData)\n const signature = signer.sign(privateKeyPem)\n\n const verifier = crypto.createVerify('RSA-SHA256')\n verifier.update(testData)\n return verifier.verify(publicKey, signature)\n } catch (error) {\n console.error('Key pair validation failed:', error)\n return false\n }\n}\n"],"mappings":";;;;;;;;;;;AASA,MAAa,yBAAyB,CACpCA,mBAIG;AACH,KAAI;EACF,MAAM,OAAO,IAAI,eAAO,gBAAgB;EAGxC,MAAM,kBAAkB,KAAK;EAC7B,MAAM,sBAAsB,OAAO,OAAO,gBAAgB,CAAC,UAAU;AAErE,SAAO;GACL,YAAY,KAAK;GACjB,cAAc;EACf;CACF,SAAQ,OAAO;AACd,QAAM,IAAI,OAAO,sCAAsC,MAAM;CAC9D;AACF;;;;;;;;AASD,MAAa,kBAAkB,CAC7BA,gBACAC,kBACY;AACZ,KAAI;EACF,MAAM,OAAO,IAAI,eAAO,gBAAgB;EACxC,MAAM,YAAY,KAAK;EAGvB,MAAM,WAAW;EACjB,MAAM,SAAS,eAAO,WAAW,aAAa;AAC9C,SAAO,OAAO,SAAS;EACvB,MAAM,YAAY,OAAO,KAAK,cAAc;EAE5C,MAAM,WAAW,eAAO,aAAa,aAAa;AAClD,WAAS,OAAO,SAAS;AACzB,SAAO,SAAS,OAAO,WAAW,UAAU;CAC7C,SAAQ,OAAO;AACd,UAAQ,MAAM,+BAA+B,MAAM;AACnD,SAAO;CACR;AACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import crypto from "crypto";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/certificate.ts
|
|
4
|
+
/**
|
|
5
|
+
* Extracts certificate information from PEM certificate
|
|
6
|
+
* Converts hex serial number to decimal as required by MyInvois
|
|
7
|
+
*
|
|
8
|
+
* @param certificatePem - Certificate in PEM format
|
|
9
|
+
* @returns Object with issuer name and decimal serial number
|
|
10
|
+
*/
|
|
11
|
+
const extractCertificateInfo = (certificatePem) => {
|
|
12
|
+
try {
|
|
13
|
+
const cert = new crypto.X509Certificate(certificatePem);
|
|
14
|
+
const serialNumberHex = cert.serialNumber;
|
|
15
|
+
const serialNumberDecimal = BigInt("0x" + serialNumberHex).toString();
|
|
16
|
+
return {
|
|
17
|
+
issuerName: cert.issuer,
|
|
18
|
+
serialNumber: serialNumberDecimal
|
|
19
|
+
};
|
|
20
|
+
} catch (error) {
|
|
21
|
+
throw new Error(`Failed to extract certificate info: ${error}`);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Validates that certificate and private key form a valid pair
|
|
26
|
+
*
|
|
27
|
+
* @param certificatePem - Certificate in PEM format
|
|
28
|
+
* @param privateKeyPem - Private key in PEM format
|
|
29
|
+
* @returns Boolean indicating if key pair is valid
|
|
30
|
+
*/
|
|
31
|
+
const validateKeyPair = (certificatePem, privateKeyPem) => {
|
|
32
|
+
try {
|
|
33
|
+
const cert = new crypto.X509Certificate(certificatePem);
|
|
34
|
+
const publicKey = cert.publicKey;
|
|
35
|
+
const testData = "validation-test-data";
|
|
36
|
+
const signer = crypto.createSign("RSA-SHA256");
|
|
37
|
+
signer.update(testData);
|
|
38
|
+
const signature = signer.sign(privateKeyPem);
|
|
39
|
+
const verifier = crypto.createVerify("RSA-SHA256");
|
|
40
|
+
verifier.update(testData);
|
|
41
|
+
return verifier.verify(publicKey, signature);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error("Key pair validation failed:", error);
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { extractCertificateInfo, validateKeyPair };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
|
|
25
|
+
Object.defineProperty(exports, '__toESM', {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return __toESM;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
//#region src/types/classification-codes.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents the allowed classification codes for e-Invoice items.
|
|
4
|
+
* Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/classification-codes/
|
|
5
|
+
*/
|
|
6
|
+
type ClassificationCode = '001' // Breastfeeding equipment
|
|
7
|
+
| '002' // Child care centres and kindergartens fees
|
|
8
|
+
| '003' // Computer, smartphone or tablet
|
|
9
|
+
| '004' // Consolidated e-Invoice
|
|
10
|
+
| '005' // Construction materials (as specified under Fourth Schedule of the Lembaga Pembangunan Industri Pembinaan Malaysia Act 1994)
|
|
11
|
+
| '006' // Disbursement
|
|
12
|
+
| '007' // Donation
|
|
13
|
+
| '008' // e-Commerce - e-Invoice to buyer / purchaser
|
|
14
|
+
| '009' // e-Commerce - Self-billed e-Invoice to seller, logistics, etc.
|
|
15
|
+
| '010' // Education fees
|
|
16
|
+
| '011' // Goods on consignment (Consignor)
|
|
17
|
+
| '012' // Goods on consignment (Consignee)
|
|
18
|
+
| '013' // Gym membership
|
|
19
|
+
| '014' // Insurance - Education and medical benefits
|
|
20
|
+
| '015' // Insurance - Takaful or life insurance
|
|
21
|
+
| '016' // Interest and financing expenses
|
|
22
|
+
| '017' // Internet subscription
|
|
23
|
+
| '018' // Land and building
|
|
24
|
+
| '019' // Medical examination for learning disabilities and early intervention or rehabilitation treatments of learning disabilities
|
|
25
|
+
| '020' // Medical examination or vaccination expenses
|
|
26
|
+
| '021' // Medical expenses for serious diseases
|
|
27
|
+
| '022' // Others
|
|
28
|
+
| '023' // Petroleum operations (as defined in Petroleum (Income Tax) Act 1967)
|
|
29
|
+
| '024' // Private retirement scheme or deferred annuity scheme
|
|
30
|
+
| '025' // Motor vehicle
|
|
31
|
+
| '026' // Subscription of books / journals / magazines / newspapers / other similar publications
|
|
32
|
+
| '027' // Reimbursement
|
|
33
|
+
| '028' // Rental of motor vehicle
|
|
34
|
+
| '029' // EV charging facilities (Installation, rental, sale / purchase or subscription fees)
|
|
35
|
+
| '030' // Repair and maintenance
|
|
36
|
+
| '031' // Research and development
|
|
37
|
+
| '032' // Foreign income
|
|
38
|
+
| '033' // Self-billed - Betting and gaming
|
|
39
|
+
| '034' // Self-billed - Importation of goods
|
|
40
|
+
| '035' // Self-billed - Importation of services
|
|
41
|
+
| '036' // Self-billed - Others
|
|
42
|
+
| '037' // Self-billed - Monetary payment to agents, dealers or distributors
|
|
43
|
+
| '038' // Sports equipment, rental / entry fees for sports facilities, registration in sports competition or sports training fees imposed by associations / sports clubs / companies registered with the Sports Commissioner or Companies Commission of Malaysia and carrying out sports activities as listed under the Sports Development Act 1997
|
|
44
|
+
| '039' // Supporting equipment for disabled person
|
|
45
|
+
| '040' // Voluntary contribution to approved provident fund
|
|
46
|
+
| '041' // Dental examination or treatment
|
|
47
|
+
| '042' // Fertility treatment
|
|
48
|
+
| '043' // Treatment and home care nursing, daycare centres and residential care centers
|
|
49
|
+
| '044' // Vouchers, gift cards, loyalty points, etc
|
|
50
|
+
| '045'; // Self-billed - Non-monetary payment to agents, dealers or distributors
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Enum representing the allowed classification codes with descriptive names.
|
|
54
|
+
* Provides a more readable way to reference classification codes.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const code = ClassificationCodeEnum.ComputerSmartphoneOrTablet;
|
|
58
|
+
* console.log(code); // Output: "003"
|
|
59
|
+
*/
|
|
60
|
+
declare enum ClassificationCodeEnum {
|
|
61
|
+
BreastfeedingEquipment = '001',
|
|
62
|
+
ChildCareCentresAndKindergartensFees = '002',
|
|
63
|
+
ComputerSmartphoneOrTablet = '003',
|
|
64
|
+
ConsolidatedEInvoice = '004',
|
|
65
|
+
ConstructionMaterials = '005',
|
|
66
|
+
Disbursement = '006',
|
|
67
|
+
Donation = '007',
|
|
68
|
+
ECommerceEInvoiceToBuyer = '008',
|
|
69
|
+
ECommerceSelfBilledToSellerLogistics = '009',
|
|
70
|
+
EducationFees = '010',
|
|
71
|
+
GoodsOnConsignmentConsignor = '011',
|
|
72
|
+
GoodsOnConsignmentConsignee = '012',
|
|
73
|
+
GymMembership = '013',
|
|
74
|
+
InsuranceEducationMedicalBenefits = '014',
|
|
75
|
+
InsuranceTakafulLife = '015',
|
|
76
|
+
InterestFinancingExpenses = '016',
|
|
77
|
+
InternetSubscription = '017',
|
|
78
|
+
LandAndBuilding = '018',
|
|
79
|
+
MedicalExamLearningDisabilities = '019',
|
|
80
|
+
MedicalExamVaccination = '020',
|
|
81
|
+
MedicalExpensesSeriousDiseases = '021',
|
|
82
|
+
Others = '022',
|
|
83
|
+
PetroleumOperations = '023',
|
|
84
|
+
PrivateRetirementSchemeDeferredAnnuity = '024',
|
|
85
|
+
MotorVehicle = '025',
|
|
86
|
+
SubscriptionBooksJournalsEtc = '026',
|
|
87
|
+
Reimbursement = '027',
|
|
88
|
+
RentalOfMotorVehicle = '028',
|
|
89
|
+
EVChargingFacilities = '029',
|
|
90
|
+
RepairAndMaintenance = '030',
|
|
91
|
+
ResearchAndDevelopment = '031',
|
|
92
|
+
ForeignIncome = '032',
|
|
93
|
+
SelfBilledBettingGaming = '033',
|
|
94
|
+
SelfBilledImportationGoods = '034',
|
|
95
|
+
SelfBilledImportationServices = '035',
|
|
96
|
+
SelfBilledOthers = '036',
|
|
97
|
+
SelfBilledMonetaryPaymentToAgents = '037',
|
|
98
|
+
SportsEquipmentRentalFeesEtc = '038',
|
|
99
|
+
SupportingEquipmentDisabledPerson = '039',
|
|
100
|
+
VoluntaryContributionProvidentFund = '040',
|
|
101
|
+
DentalExamTreatment = '041',
|
|
102
|
+
FertilityTreatment = '042',
|
|
103
|
+
TreatmentHomeCareNursingEtc = '043',
|
|
104
|
+
VouchersGiftCardsLoyaltyPoints = '044',
|
|
105
|
+
SelfBilledNonMonetaryPaymentToAgents = '045',
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Interface representing a classification code entry.
|
|
110
|
+
* Contains the code and its corresponding description.
|
|
111
|
+
*/
|
|
112
|
+
interface Classification {
|
|
113
|
+
code: ClassificationCode;
|
|
114
|
+
description: string;
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { Classification, ClassificationCode, ClassificationCodeEnum };
|
|
118
|
+
//# sourceMappingURL=classification-codes-B15PbWxz.d.cts.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
//#region src/types/classification-codes.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents the allowed classification codes for e-Invoice items.
|
|
4
|
+
* Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/classification-codes/
|
|
5
|
+
*/
|
|
6
|
+
type ClassificationCode = '001' // Breastfeeding equipment
|
|
7
|
+
| '002' // Child care centres and kindergartens fees
|
|
8
|
+
| '003' // Computer, smartphone or tablet
|
|
9
|
+
| '004' // Consolidated e-Invoice
|
|
10
|
+
| '005' // Construction materials (as specified under Fourth Schedule of the Lembaga Pembangunan Industri Pembinaan Malaysia Act 1994)
|
|
11
|
+
| '006' // Disbursement
|
|
12
|
+
| '007' // Donation
|
|
13
|
+
| '008' // e-Commerce - e-Invoice to buyer / purchaser
|
|
14
|
+
| '009' // e-Commerce - Self-billed e-Invoice to seller, logistics, etc.
|
|
15
|
+
| '010' // Education fees
|
|
16
|
+
| '011' // Goods on consignment (Consignor)
|
|
17
|
+
| '012' // Goods on consignment (Consignee)
|
|
18
|
+
| '013' // Gym membership
|
|
19
|
+
| '014' // Insurance - Education and medical benefits
|
|
20
|
+
| '015' // Insurance - Takaful or life insurance
|
|
21
|
+
| '016' // Interest and financing expenses
|
|
22
|
+
| '017' // Internet subscription
|
|
23
|
+
| '018' // Land and building
|
|
24
|
+
| '019' // Medical examination for learning disabilities and early intervention or rehabilitation treatments of learning disabilities
|
|
25
|
+
| '020' // Medical examination or vaccination expenses
|
|
26
|
+
| '021' // Medical expenses for serious diseases
|
|
27
|
+
| '022' // Others
|
|
28
|
+
| '023' // Petroleum operations (as defined in Petroleum (Income Tax) Act 1967)
|
|
29
|
+
| '024' // Private retirement scheme or deferred annuity scheme
|
|
30
|
+
| '025' // Motor vehicle
|
|
31
|
+
| '026' // Subscription of books / journals / magazines / newspapers / other similar publications
|
|
32
|
+
| '027' // Reimbursement
|
|
33
|
+
| '028' // Rental of motor vehicle
|
|
34
|
+
| '029' // EV charging facilities (Installation, rental, sale / purchase or subscription fees)
|
|
35
|
+
| '030' // Repair and maintenance
|
|
36
|
+
| '031' // Research and development
|
|
37
|
+
| '032' // Foreign income
|
|
38
|
+
| '033' // Self-billed - Betting and gaming
|
|
39
|
+
| '034' // Self-billed - Importation of goods
|
|
40
|
+
| '035' // Self-billed - Importation of services
|
|
41
|
+
| '036' // Self-billed - Others
|
|
42
|
+
| '037' // Self-billed - Monetary payment to agents, dealers or distributors
|
|
43
|
+
| '038' // Sports equipment, rental / entry fees for sports facilities, registration in sports competition or sports training fees imposed by associations / sports clubs / companies registered with the Sports Commissioner or Companies Commission of Malaysia and carrying out sports activities as listed under the Sports Development Act 1997
|
|
44
|
+
| '039' // Supporting equipment for disabled person
|
|
45
|
+
| '040' // Voluntary contribution to approved provident fund
|
|
46
|
+
| '041' // Dental examination or treatment
|
|
47
|
+
| '042' // Fertility treatment
|
|
48
|
+
| '043' // Treatment and home care nursing, daycare centres and residential care centers
|
|
49
|
+
| '044' // Vouchers, gift cards, loyalty points, etc
|
|
50
|
+
| '045'; // Self-billed - Non-monetary payment to agents, dealers or distributors
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Enum representing the allowed classification codes with descriptive names.
|
|
54
|
+
* Provides a more readable way to reference classification codes.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* const code = ClassificationCodeEnum.ComputerSmartphoneOrTablet;
|
|
58
|
+
* console.log(code); // Output: "003"
|
|
59
|
+
*/
|
|
60
|
+
declare enum ClassificationCodeEnum {
|
|
61
|
+
BreastfeedingEquipment = '001',
|
|
62
|
+
ChildCareCentresAndKindergartensFees = '002',
|
|
63
|
+
ComputerSmartphoneOrTablet = '003',
|
|
64
|
+
ConsolidatedEInvoice = '004',
|
|
65
|
+
ConstructionMaterials = '005',
|
|
66
|
+
Disbursement = '006',
|
|
67
|
+
Donation = '007',
|
|
68
|
+
ECommerceEInvoiceToBuyer = '008',
|
|
69
|
+
ECommerceSelfBilledToSellerLogistics = '009',
|
|
70
|
+
EducationFees = '010',
|
|
71
|
+
GoodsOnConsignmentConsignor = '011',
|
|
72
|
+
GoodsOnConsignmentConsignee = '012',
|
|
73
|
+
GymMembership = '013',
|
|
74
|
+
InsuranceEducationMedicalBenefits = '014',
|
|
75
|
+
InsuranceTakafulLife = '015',
|
|
76
|
+
InterestFinancingExpenses = '016',
|
|
77
|
+
InternetSubscription = '017',
|
|
78
|
+
LandAndBuilding = '018',
|
|
79
|
+
MedicalExamLearningDisabilities = '019',
|
|
80
|
+
MedicalExamVaccination = '020',
|
|
81
|
+
MedicalExpensesSeriousDiseases = '021',
|
|
82
|
+
Others = '022',
|
|
83
|
+
PetroleumOperations = '023',
|
|
84
|
+
PrivateRetirementSchemeDeferredAnnuity = '024',
|
|
85
|
+
MotorVehicle = '025',
|
|
86
|
+
SubscriptionBooksJournalsEtc = '026',
|
|
87
|
+
Reimbursement = '027',
|
|
88
|
+
RentalOfMotorVehicle = '028',
|
|
89
|
+
EVChargingFacilities = '029',
|
|
90
|
+
RepairAndMaintenance = '030',
|
|
91
|
+
ResearchAndDevelopment = '031',
|
|
92
|
+
ForeignIncome = '032',
|
|
93
|
+
SelfBilledBettingGaming = '033',
|
|
94
|
+
SelfBilledImportationGoods = '034',
|
|
95
|
+
SelfBilledImportationServices = '035',
|
|
96
|
+
SelfBilledOthers = '036',
|
|
97
|
+
SelfBilledMonetaryPaymentToAgents = '037',
|
|
98
|
+
SportsEquipmentRentalFeesEtc = '038',
|
|
99
|
+
SupportingEquipmentDisabledPerson = '039',
|
|
100
|
+
VoluntaryContributionProvidentFund = '040',
|
|
101
|
+
DentalExamTreatment = '041',
|
|
102
|
+
FertilityTreatment = '042',
|
|
103
|
+
TreatmentHomeCareNursingEtc = '043',
|
|
104
|
+
VouchersGiftCardsLoyaltyPoints = '044',
|
|
105
|
+
SelfBilledNonMonetaryPaymentToAgents = '045',
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Interface representing a classification code entry.
|
|
110
|
+
* Contains the code and its corresponding description.
|
|
111
|
+
*/
|
|
112
|
+
interface Classification {
|
|
113
|
+
code: ClassificationCode;
|
|
114
|
+
description: string;
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { Classification, ClassificationCode, ClassificationCodeEnum };
|