@ripwords/myinvois-client 0.3.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (400) hide show
  1. package/README.md +27 -0
  2. package/dist/{apiQueue-DgKWaQDS.cjs → apiQueue-C45w-ymm.cjs} +1 -1
  3. package/dist/{apiQueue-DgKWaQDS.cjs.map → apiQueue-C45w-ymm.cjs.map} +1 -1
  4. package/dist/{certificate-CWmfCPdt.cjs → certificate-Dw46fkYv.cjs} +5 -31
  5. package/dist/certificate-Dw46fkYv.cjs.map +1 -0
  6. package/dist/{document-B6ab06s1.cjs → document-B11B5lqd.cjs} +75 -21
  7. package/dist/document-B11B5lqd.cjs.map +1 -0
  8. package/dist/{documentManagement-BviJDtf2.cjs → documentManagement-qJnd0l1z.cjs} +3 -2
  9. package/dist/documentManagement-qJnd0l1z.cjs.map +1 -0
  10. package/dist/{documentSubmission-B6hkivRK.cjs → documentSubmission-BaPECvYU.cjs} +6 -5
  11. package/dist/{documentSubmission-B6hkivRK.cjs.map → documentSubmission-BaPECvYU.cjs.map} +1 -1
  12. package/dist/{documentTypeManagement-D_-LiQVg.cjs → documentTypeManagement-DXRLfTsW.cjs} +1 -1
  13. package/dist/{documentTypeManagement-D_-LiQVg.cjs.map → documentTypeManagement-DXRLfTsW.cjs.map} +1 -1
  14. package/dist/{getBaseUrl-D0G4GZmp.cjs → getBaseUrl-D2iJdUGL.cjs} +1 -1
  15. package/dist/{getBaseUrl-D0G4GZmp.cjs.map → getBaseUrl-D2iJdUGL.cjs.map} +1 -1
  16. package/dist/index.cjs +14 -12
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index10.cjs +6 -195
  19. package/dist/index11.cjs +22 -0
  20. package/dist/index12.cjs +2 -24
  21. package/dist/index13.cjs +3 -0
  22. package/dist/index14.cjs +3 -0
  23. package/dist/index15.cjs +325 -25
  24. package/dist/index15.cjs.map +1 -1
  25. package/dist/index16.cjs +187 -19
  26. package/dist/index16.cjs.map +1 -1
  27. package/dist/index17.cjs +62 -0
  28. package/dist/index17.cjs.map +1 -0
  29. package/dist/index18.cjs +523 -25
  30. package/dist/index18.cjs.map +1 -1
  31. package/dist/index19.cjs +187 -15
  32. package/dist/index19.cjs.map +1 -1
  33. package/dist/index2.cjs +1 -1
  34. package/dist/index21.cjs +25 -0
  35. package/dist/{index12.cjs.map → index21.cjs.map} +1 -1
  36. package/dist/index23.cjs +0 -5
  37. package/dist/index24.cjs +25 -9
  38. package/dist/index24.cjs.map +1 -1
  39. package/dist/index25.cjs +24 -4
  40. package/dist/index25.cjs.map +1 -0
  41. package/dist/index26.cjs +0 -22
  42. package/dist/index27.cjs +33 -2
  43. package/dist/index27.cjs.map +1 -0
  44. package/dist/index28.cjs +23 -2
  45. package/dist/index28.cjs.map +1 -0
  46. package/dist/index29.cjs +0 -330
  47. package/dist/index3.cjs +2 -2
  48. package/dist/index30.cjs +0 -193
  49. package/dist/index31.cjs +0 -208
  50. package/dist/index32.cjs +203 -104
  51. package/dist/index32.cjs.map +1 -1
  52. package/dist/index33.cjs +104 -132
  53. package/dist/index33.cjs.map +1 -1
  54. package/dist/index34.cjs +132 -59
  55. package/dist/index34.cjs.map +1 -1
  56. package/dist/index35.cjs +59 -262
  57. package/dist/index35.cjs.map +1 -1
  58. package/dist/index36.cjs +262 -74
  59. package/dist/index36.cjs.map +1 -1
  60. package/dist/index37.cjs +74 -102
  61. package/dist/index37.cjs.map +1 -1
  62. package/dist/index38.cjs +102 -68
  63. package/dist/index38.cjs.map +1 -1
  64. package/dist/index39.cjs +68 -107
  65. package/dist/index39.cjs.map +1 -1
  66. package/dist/index4.cjs +1 -1
  67. package/dist/index40.cjs +107 -95
  68. package/dist/index40.cjs.map +1 -1
  69. package/dist/index41.cjs +95 -13
  70. package/dist/index41.cjs.map +1 -1
  71. package/dist/index42.cjs +11 -31
  72. package/dist/index42.cjs.map +1 -1
  73. package/dist/index43.cjs +31 -12
  74. package/dist/index43.cjs.map +1 -1
  75. package/dist/index44.cjs +12 -22
  76. package/dist/index44.cjs.map +1 -1
  77. package/dist/index45.cjs +22 -13
  78. package/dist/index45.cjs.map +1 -1
  79. package/dist/index46.cjs +13 -7
  80. package/dist/index46.cjs.map +1 -1
  81. package/dist/index47.cjs +7 -7
  82. package/dist/index47.cjs.map +1 -1
  83. package/dist/index48.cjs +7 -10
  84. package/dist/index48.cjs.map +1 -1
  85. package/dist/index49.cjs +10 -6
  86. package/dist/index49.cjs.map +1 -1
  87. package/dist/index5.cjs +1 -1
  88. package/dist/index50.cjs +6 -101
  89. package/dist/index50.cjs.map +1 -1
  90. package/dist/index51.cjs +101 -106
  91. package/dist/index51.cjs.map +1 -1
  92. package/dist/index52.cjs +106 -119
  93. package/dist/index52.cjs.map +1 -1
  94. package/dist/index53.cjs +119 -106
  95. package/dist/index53.cjs.map +1 -1
  96. package/dist/index54.cjs +106 -98
  97. package/dist/index54.cjs.map +1 -1
  98. package/dist/index55.cjs +98 -118
  99. package/dist/index55.cjs.map +1 -1
  100. package/dist/index56.cjs +118 -127
  101. package/dist/index56.cjs.map +1 -1
  102. package/dist/index57.cjs +127 -117
  103. package/dist/index57.cjs.map +1 -1
  104. package/dist/index58.cjs +117 -14
  105. package/dist/index58.cjs.map +1 -1
  106. package/dist/index59.cjs +14 -95
  107. package/dist/index59.cjs.map +1 -1
  108. package/dist/index6.cjs +1 -1
  109. package/dist/index60.cjs +95 -142
  110. package/dist/index60.cjs.map +1 -1
  111. package/dist/index61.cjs +142 -114
  112. package/dist/index61.cjs.map +1 -1
  113. package/dist/index62.cjs +114 -144
  114. package/dist/index62.cjs.map +1 -1
  115. package/dist/index63.cjs +144 -113
  116. package/dist/index63.cjs.map +1 -1
  117. package/dist/index64.cjs +113 -17
  118. package/dist/index64.cjs.map +1 -1
  119. package/dist/index65.cjs +17 -112
  120. package/dist/index65.cjs.map +1 -1
  121. package/dist/index66.cjs +112 -47
  122. package/dist/index66.cjs.map +1 -1
  123. package/dist/index67.cjs +47 -14
  124. package/dist/index67.cjs.map +1 -1
  125. package/dist/index68.cjs +14 -28
  126. package/dist/index68.cjs.map +1 -1
  127. package/dist/index69.cjs +28 -22
  128. package/dist/index69.cjs.map +1 -1
  129. package/dist/index7.cjs +1 -1
  130. package/dist/index70.cjs +22 -9
  131. package/dist/index70.cjs.map +1 -1
  132. package/dist/index71.cjs +9 -8
  133. package/dist/index71.cjs.map +1 -1
  134. package/dist/index72.cjs +8 -17
  135. package/dist/index72.cjs.map +1 -1
  136. package/dist/index73.cjs +17 -412
  137. package/dist/index73.cjs.map +1 -1
  138. package/dist/index74.cjs +412 -8
  139. package/dist/index74.cjs.map +1 -1
  140. package/dist/index75.cjs +8 -9
  141. package/dist/index75.cjs.map +1 -1
  142. package/dist/index76.cjs +16 -0
  143. package/dist/index76.cjs.map +1 -0
  144. package/dist/index8.cjs +4 -61
  145. package/dist/index9.cjs +9 -528
  146. package/dist/index9.cjs.map +1 -1
  147. package/dist/lineItems-C8iT0OL1.cjs +64 -0
  148. package/dist/lineItems-C8iT0OL1.cjs.map +1 -0
  149. package/dist/{notificationManagement-DLBDn77E.cjs → notificationManagement-C_qrFwWL.cjs} +1 -1
  150. package/dist/{notificationManagement-DLBDn77E.cjs.map → notificationManagement-C_qrFwWL.cjs.map} +1 -1
  151. package/dist/{platformLogin-Ch6hFKoU.cjs → platformLogin-DC4s6Qpv.cjs} +1 -1
  152. package/dist/{platformLogin-Ch6hFKoU.cjs.map → platformLogin-DC4s6Qpv.cjs.map} +1 -1
  153. package/dist/{taxpayerValidation-j8s6YGED.cjs → taxpayerValidation-DzCJROgP.cjs} +1 -1
  154. package/dist/{taxpayerValidation-j8s6YGED.cjs.map → taxpayerValidation-DzCJROgP.cjs.map} +1 -1
  155. package/package.json +1 -1
  156. package/dist/0X-Cr3M7hci.d.cts +0 -211
  157. package/dist/0X-qj3c_vAo.d.ts +0 -210
  158. package/dist/1X-B-lyAVC4.d.ts +0 -111
  159. package/dist/1X-C72Wa4pk.d.ts +0 -19
  160. package/dist/1X-CWwmfCzo.d.cts +0 -112
  161. package/dist/1X-DYw2tURz.d.cts +0 -20
  162. package/dist/2X-BfCK614i.d.ts +0 -139
  163. package/dist/2X-CH89y3Af.d.ts +0 -39
  164. package/dist/2X-CXtqiwRg.d.cts +0 -40
  165. package/dist/2X-DNtkJ0tj.d.cts +0 -140
  166. package/dist/3X-BOxfatu3.d.cts +0 -62
  167. package/dist/3X-Bk_fUIAk.d.cts +0 -21
  168. package/dist/3X-DryrwYRf.d.ts +0 -20
  169. package/dist/3X-Du10Ix_V.d.ts +0 -61
  170. package/dist/4X-BPMLRoDv.d.ts +0 -30
  171. package/dist/4X-C7fzDWJ_.d.cts +0 -265
  172. package/dist/4X-CK9rj5qd.d.cts +0 -31
  173. package/dist/4X-x3cRFuSM.d.ts +0 -264
  174. package/dist/5X-B52AKeTz.d.ts +0 -76
  175. package/dist/5X-Bv7M6KyG.d.ts +0 -21
  176. package/dist/5X-CNAFsDm2.d.cts +0 -77
  177. package/dist/5X-CpAvNxvd.d.cts +0 -22
  178. package/dist/6X-DBwpWPQ6.d.ts +0 -104
  179. package/dist/6X-ZeZ8OB57.d.ts +0 -15
  180. package/dist/6X-bXWr_7xY.d.cts +0 -16
  181. package/dist/6X-uObUP4VG.d.cts +0 -105
  182. package/dist/7X-BJBOlWhV.d.cts +0 -16
  183. package/dist/7X-BifJnY24.d.cts +0 -71
  184. package/dist/7X-C_XGDSpE.d.ts +0 -70
  185. package/dist/7X-Dvw2Z2VN.d.ts +0 -15
  186. package/dist/8X-BkgoX8dg.d.ts +0 -18
  187. package/dist/8X-Di_0wuRX.d.ts +0 -109
  188. package/dist/8X-DioBXCJ0.d.cts +0 -110
  189. package/dist/8X-dshwiOxU.d.cts +0 -19
  190. package/dist/9X-8ZnvvViY.d.ts +0 -97
  191. package/dist/9X-9j2Djy4W.d.cts +0 -15
  192. package/dist/9X-BjffnXuq.d.cts +0 -98
  193. package/dist/9X-Du0e44cq.d.ts +0 -14
  194. package/dist/AX-BSPLpkVT.d.ts +0 -110
  195. package/dist/AX-CWCopjCC.d.cts +0 -111
  196. package/dist/BX-Cq7WdhD3.d.cts +0 -115
  197. package/dist/BX-u4yMaIkz.d.ts +0 -114
  198. package/dist/CX-BKZG0pVE.d.ts +0 -127
  199. package/dist/CX-DlcVZfxx.d.cts +0 -128
  200. package/dist/DX-CwA9WJAf.d.ts +0 -114
  201. package/dist/DX-DLdv-Nxj.d.cts +0 -115
  202. package/dist/EX-BRNu1Ooi.d.ts +0 -106
  203. package/dist/EX-CIJv8-Lw.d.cts +0 -107
  204. package/dist/FX-DBxjq6xY.d.ts +0 -126
  205. package/dist/FX-DlDM_Zea.d.cts +0 -127
  206. package/dist/GX-B3CvWNrP.d.ts +0 -135
  207. package/dist/GX-BFGNX6Jy.d.cts +0 -136
  208. package/dist/HX-D7FABgTv.d.ts +0 -125
  209. package/dist/HX-D7Y9qRSm.d.cts +0 -126
  210. package/dist/IX-D3ZknsAB.d.ts +0 -22
  211. package/dist/IX-DPTrbhgX.d.cts +0 -23
  212. package/dist/JX-BRaZM3Gc.d.ts +0 -103
  213. package/dist/JX-D8JmtNpo.d.cts +0 -104
  214. package/dist/KX-B1K0OWoi.d.ts +0 -150
  215. package/dist/KX-B46KJZrH.d.cts +0 -151
  216. package/dist/LX-CKRefinL.d.ts +0 -122
  217. package/dist/LX-CfTKy8Sx.d.cts +0 -123
  218. package/dist/MX-BKJ4gNvV.d.cts +0 -153
  219. package/dist/MX-DKmaeO9r.d.ts +0 -152
  220. package/dist/NX-CJL2Gn1U.d.ts +0 -121
  221. package/dist/NX-CSdLIFqU.d.cts +0 -122
  222. package/dist/OX-BwqOsulT.d.cts +0 -26
  223. package/dist/OX-Do2ap5v_.d.ts +0 -25
  224. package/dist/PX-BTx0TXsJ.d.cts +0 -121
  225. package/dist/PX-_DOr_rm9.d.ts +0 -120
  226. package/dist/QX-BUXR8RJL.d.cts +0 -59
  227. package/dist/QX-HlXLkIki.d.ts +0 -58
  228. package/dist/RX-CZ8HiH37.d.cts +0 -23
  229. package/dist/RX-DVPGOVES.d.ts +0 -22
  230. package/dist/SX-CLxsqiQk.d.cts +0 -40
  231. package/dist/SX-OGT3qwlS.d.ts +0 -39
  232. package/dist/TX-DKc8hLc4.d.cts +0 -31
  233. package/dist/TX-cPDINmZ5.d.ts +0 -30
  234. package/dist/UX-Be3sqvPV.d.ts +0 -17
  235. package/dist/UX-bc7xDnZI.d.cts +0 -18
  236. package/dist/VX-CIHTFyoC.d.cts +0 -17
  237. package/dist/VX-CoEuBNDK.d.ts +0 -16
  238. package/dist/WX-BHvlq7Jx.d.cts +0 -26
  239. package/dist/WX-DMvw__jH.d.ts +0 -25
  240. package/dist/XX-DOA-10JW.d.ts +0 -827
  241. package/dist/XX-DztQxYHJ.d.cts +0 -828
  242. package/dist/YX-CkxLeFb4.d.cts +0 -20
  243. package/dist/YX-F34sJ7Ik.d.ts +0 -19
  244. package/dist/ZX-CDQOfsHh.d.ts +0 -21
  245. package/dist/ZX-DVb_buNI.d.cts +0 -22
  246. package/dist/api/documentManagement.d.ts +0 -89
  247. package/dist/api/documentManagement.js +0 -3
  248. package/dist/api/documentSubmission.d.ts +0 -92
  249. package/dist/api/documentSubmission.js +0 -5
  250. package/dist/api/documentTypeManagement.d.ts +0 -70
  251. package/dist/api/documentTypeManagement.js +0 -3
  252. package/dist/api/notificationManagement.d.ts +0 -68
  253. package/dist/api/notificationManagement.js +0 -3
  254. package/dist/api/platformLogin.d.ts +0 -68
  255. package/dist/api/platformLogin.js +0 -3
  256. package/dist/api/taxpayerValidation.d.ts +0 -71
  257. package/dist/api/taxpayerValidation.js +0 -4
  258. package/dist/apiQueue-B6Q644Bz.js +0 -201
  259. package/dist/certificate-COwqszxD.js +0 -71
  260. package/dist/certificate-CWmfCPdt.cjs.map +0 -1
  261. package/dist/chunk-CUT6urMc.cjs +0 -30
  262. package/dist/classification-codes-B15PbWxz.d.cts +0 -118
  263. package/dist/classification-codes-C2X4xW5-.d.ts +0 -117
  264. package/dist/country-code-DPeNFMMi.d.cts +0 -543
  265. package/dist/country-code-DsI8Mbzx.d.ts +0 -542
  266. package/dist/currencies-DKuDflOO.d.ts +0 -207
  267. package/dist/currencies-S5g1gzBU.d.cts +0 -208
  268. package/dist/document-B6ab06s1.cjs.map +0 -1
  269. package/dist/document-Bb5WkhRe.js +0 -626
  270. package/dist/documentManagement-BviJDtf2.cjs.map +0 -1
  271. package/dist/documentManagement-lPm8Gziu.js +0 -49
  272. package/dist/documentSubmission-CMMzKvVl.js +0 -134
  273. package/dist/documentTypeManagement-cBtVCOY3.js +0 -22
  274. package/dist/documents-BYV12TVt.d.ts +0 -1196
  275. package/dist/documents-D_V38Q_U.d.cts +0 -1197
  276. package/dist/e-invoice-BuwtFnlI.d.cts +0 -44
  277. package/dist/e-invoice-C2TxhyrK.d.ts +0 -43
  278. package/dist/formatIdValue-qTxJqj9o.js +0 -7
  279. package/dist/getBaseUrl-D7nUmoYb.js +0 -7
  280. package/dist/index-CygwSf0x.d.ts +0 -15
  281. package/dist/index-Yr1QAbIF.d.cts +0 -16
  282. package/dist/index.d.ts +0 -614
  283. package/dist/index.js +0 -627
  284. package/dist/index10.cjs.map +0 -1
  285. package/dist/index29.cjs.map +0 -1
  286. package/dist/index30.cjs.map +0 -1
  287. package/dist/index31.cjs.map +0 -1
  288. package/dist/index61.cts.map +0 -1
  289. package/dist/index62.cts.map +0 -1
  290. package/dist/index63.cts.map +0 -1
  291. package/dist/index64.cts.map +0 -1
  292. package/dist/index65.cts.map +0 -1
  293. package/dist/index66.cts.map +0 -1
  294. package/dist/index67.cts.map +0 -1
  295. package/dist/index68.cts.map +0 -1
  296. package/dist/index69.cts.map +0 -1
  297. package/dist/index70.cts.map +0 -1
  298. package/dist/index71.cts.map +0 -1
  299. package/dist/index72.cts.map +0 -1
  300. package/dist/index73.cts.map +0 -1
  301. package/dist/index74.cts.map +0 -1
  302. package/dist/index75.cts.map +0 -1
  303. package/dist/index8.cjs.map +0 -1
  304. package/dist/msic-codes-CIKdPqag.d.cts +0 -26
  305. package/dist/msic-codes-CjrrJmzb.d.ts +0 -25
  306. package/dist/notificationManagement-n4Z5e-My.js +0 -19
  307. package/dist/notifications-DdlEkprb.d.cts +0 -63
  308. package/dist/notifications-sFhgh3rJ.d.ts +0 -62
  309. package/dist/payment-modes-7c1lWlIr.d.cts +0 -44
  310. package/dist/payment-modes-g3DzLmWb.d.ts +0 -43
  311. package/dist/platformLogin-CqI9OLYP.js +0 -39
  312. package/dist/signatures-CerHUrj3.d.ts +0 -172
  313. package/dist/signatures-CyDSZr_e.d.cts +0 -173
  314. package/dist/state-codes-Ow4oehYT.d.ts +0 -61
  315. package/dist/state-codes-u3ppueWo.d.cts +0 -62
  316. package/dist/tax-types-ClyLgydM.d.ts +0 -41
  317. package/dist/tax-types-fu5Q6dic.d.cts +0 -42
  318. package/dist/taxpayer-BAoT73gg.d.ts +0 -35
  319. package/dist/taxpayer-DwGzY1IL.d.cts +0 -36
  320. package/dist/taxpayerValidation-Xd_EHDvk.js +0 -47
  321. package/dist/types/classification-codes.d.ts +0 -2
  322. package/dist/types/country-code.d.ts +0 -2
  323. package/dist/types/currencies.d.ts +0 -2
  324. package/dist/types/documents.d.ts +0 -55
  325. package/dist/types/e-invoice.d.ts +0 -2
  326. package/dist/types/index.d.ts +0 -61
  327. package/dist/types/msic/0X.d.ts +0 -2
  328. package/dist/types/msic/1X.d.ts +0 -2
  329. package/dist/types/msic/2X.d.ts +0 -2
  330. package/dist/types/msic/3X.d.ts +0 -2
  331. package/dist/types/msic/4X.d.ts +0 -2
  332. package/dist/types/msic/5X.d.ts +0 -2
  333. package/dist/types/msic/6X.d.ts +0 -2
  334. package/dist/types/msic/7X.d.ts +0 -2
  335. package/dist/types/msic/8X.d.ts +0 -2
  336. package/dist/types/msic/9X.d.ts +0 -2
  337. package/dist/types/msic-codes.d.ts +0 -12
  338. package/dist/types/notifications.d.ts +0 -2
  339. package/dist/types/payment-modes.d.ts +0 -2
  340. package/dist/types/signatures.d.ts +0 -2
  341. package/dist/types/state-codes.d.ts +0 -2
  342. package/dist/types/tax-types.d.ts +0 -2
  343. package/dist/types/taxpayer.d.ts +0 -56
  344. package/dist/types/unit/1X.d.ts +0 -2
  345. package/dist/types/unit/2X.d.ts +0 -2
  346. package/dist/types/unit/3X.d.ts +0 -2
  347. package/dist/types/unit/4X.d.ts +0 -2
  348. package/dist/types/unit/5X.d.ts +0 -2
  349. package/dist/types/unit/6X.d.ts +0 -2
  350. package/dist/types/unit/7X.d.ts +0 -2
  351. package/dist/types/unit/8X.d.ts +0 -2
  352. package/dist/types/unit/9X.d.ts +0 -2
  353. package/dist/types/unit/AX.d.ts +0 -2
  354. package/dist/types/unit/BX.d.ts +0 -2
  355. package/dist/types/unit/CX.d.ts +0 -2
  356. package/dist/types/unit/DX.d.ts +0 -2
  357. package/dist/types/unit/EX.d.ts +0 -2
  358. package/dist/types/unit/FX.d.ts +0 -2
  359. package/dist/types/unit/GX.d.ts +0 -2
  360. package/dist/types/unit/HX.d.ts +0 -2
  361. package/dist/types/unit/IX.d.ts +0 -2
  362. package/dist/types/unit/JX.d.ts +0 -2
  363. package/dist/types/unit/KX.d.ts +0 -2
  364. package/dist/types/unit/LX.d.ts +0 -2
  365. package/dist/types/unit/MX.d.ts +0 -2
  366. package/dist/types/unit/NX.d.ts +0 -2
  367. package/dist/types/unit/OX.d.ts +0 -2
  368. package/dist/types/unit/PX.d.ts +0 -2
  369. package/dist/types/unit/QX.d.ts +0 -2
  370. package/dist/types/unit/RX.d.ts +0 -2
  371. package/dist/types/unit/SX.d.ts +0 -2
  372. package/dist/types/unit/TX.d.ts +0 -2
  373. package/dist/types/unit/UX.d.ts +0 -2
  374. package/dist/types/unit/VX.d.ts +0 -2
  375. package/dist/types/unit/WX.d.ts +0 -2
  376. package/dist/types/unit/XX.d.ts +0 -2
  377. package/dist/types/unit/YX.d.ts +0 -2
  378. package/dist/types/unit/ZX.d.ts +0 -2
  379. package/dist/types/unit-types.d.ts +0 -37
  380. package/dist/types/utils.d.ts +0 -2
  381. package/dist/unit-types-BXdufGWm.d.cts +0 -56
  382. package/dist/unit-types-VgYXIwTT.d.ts +0 -55
  383. package/dist/utils/apiQueue.d.ts +0 -45
  384. package/dist/utils/apiQueue.js +0 -3
  385. package/dist/utils/base64.d.ts +0 -5
  386. package/dist/utils/base64.js +0 -10
  387. package/dist/utils/certificate.d.ts +0 -26
  388. package/dist/utils/certificate.js +0 -3
  389. package/dist/utils/document.d.ts +0 -211
  390. package/dist/utils/document.js +0 -4
  391. package/dist/utils/formatIdValue.d.ts +0 -4
  392. package/dist/utils/formatIdValue.js +0 -3
  393. package/dist/utils/getBaseUrl.d.ts +0 -4
  394. package/dist/utils/getBaseUrl.js +0 -3
  395. package/dist/utils/signature-diagnostics.d.ts +0 -96
  396. package/dist/utils/signature-diagnostics.js +0 -327
  397. package/dist/utils/validation.d.ts +0 -108
  398. package/dist/utils/validation.js +0 -186
  399. package/dist/utils-C4FoVKLq.d.ts +0 -4
  400. package/dist/utils-Cdqbbzca.d.cts +0 -5
@@ -1 +0,0 @@
1
- {"version":3,"file":"index29.cjs","names":["certificatePem: string","issues: string[]","recommendations: string[]","dn: string","fields: Record<string, string>","invoices: InvoiceV1_1[]","str: string","result: DiagnosticResult"],"sources":["../src/utils/signature-diagnostics.ts"],"sourcesContent":["import crypto from 'crypto'\nimport type { InvoiceV1_1 } from '../types'\nimport {\n extractCertificateInfo,\n calculateDocumentDigest,\n calculateSignedPropertiesDigest,\n createSignedProperties,\n calculateCertificateDigest,\n} from './document'\n\nexport interface CertificateAnalysisResult {\n organizationIdentifier?: string\n serialNumber?: string\n issuerName: string\n subjectName: string\n issues: string[]\n recommendations: string[]\n}\n\nexport interface SignatureAnalysisResult {\n documentDigest: string\n certificateDigest: string\n signedPropertiesDigest: string\n issues: string[]\n recommendations: string[]\n}\n\nexport interface DiagnosticResult {\n certificateAnalysis: CertificateAnalysisResult\n signatureAnalysis: SignatureAnalysisResult\n summary: {\n totalIssues: number\n certificateIssues: number\n signatureIssues: number\n }\n}\n\n/**\n * Analyzes certificate for MyInvois compatibility issues\n */\nfunction analyzeCertificateForDiagnostics(\n certificatePem: string,\n): CertificateAnalysisResult {\n const issues: string[] = []\n const recommendations: string[] = []\n\n try {\n const cert = new crypto.X509Certificate(certificatePem)\n const certInfo = extractCertificateInfo(certificatePem)\n\n // Parse subject fields for MyInvois analysis\n const parseSubjectFields = (dn: string) => {\n const fields: Record<string, string> = {}\n dn.split('\\n').forEach(line => {\n const trimmed = line.trim()\n if (trimmed.includes('=')) {\n const [key, ...valueParts] = trimmed.split('=')\n if (key) {\n fields[key.trim()] = valueParts.join('=').trim()\n }\n }\n })\n return fields\n }\n\n const subjectFields = parseSubjectFields(cert.subject)\n const organizationIdentifier =\n subjectFields['organizationIdentifier'] || subjectFields['2.5.4.97']\n const serialNumber = subjectFields['serialNumber']\n\n // DS311 - TIN Mismatch Analysis\n if (!organizationIdentifier) {\n issues.push(\n 'DS311: Certificate missing organizationIdentifier field (TIN)',\n )\n recommendations.push(\n 'CRITICAL: Generate new certificate with organizationIdentifier matching your MyInvois TIN',\n )\n recommendations.push(\n 'Portal Error: \"Signer of invoice doesn\\'t match the submitter of document. TIN doesn\\'t match with the OI.\"',\n )\n } else {\n // Additional TIN format validation\n if (organizationIdentifier.length < 10) {\n issues.push(\n 'DS311: OrganizationIdentifier (TIN) appears too short - may cause submission rejection',\n )\n recommendations.push(\n 'Verify TIN format matches exactly what is registered in MyInvois',\n )\n }\n }\n\n // DS312 - Registration Number Analysis\n if (!serialNumber) {\n issues.push(\n 'DS312: Certificate missing serialNumber field (business registration)',\n )\n recommendations.push(\n 'CRITICAL: Generate new certificate with serialNumber matching your business registration',\n )\n recommendations.push(\n 'Portal Error: \"Submitter registration/identity number doesn\\'t match with the certificate SERIALNUMBER.\"',\n )\n }\n\n // DS329 - Certificate Trust Analysis\n if (cert.issuer === cert.subject) {\n issues.push(\n 'DS329: Self-signed certificate detected - will fail chain of trust validation',\n )\n recommendations.push(\n 'BLOCKING: Obtain certificate from MyInvois-approved CA:',\n )\n recommendations.push('• MSC Trustgate Sdn Bhd')\n recommendations.push('• DigiCert Sdn Bhd')\n recommendations.push('• Cybersign Asia Sdn Bhd')\n recommendations.push(\n 'Portal Error: \"Certificate is not valid according to the chain of trust validation or has been issued by an untrusted certificate authority.\"',\n )\n } else {\n // Check if issuer looks like a known CA\n const issuerName = cert.issuer.toLowerCase()\n const approvedCAs = ['msc trustgate', 'digicert', 'cybersign']\n const isFromApprovedCA = approvedCAs.some(ca => issuerName.includes(ca))\n\n if (!isFromApprovedCA) {\n issues.push('DS329: Certificate may not be from MyInvois-approved CA')\n recommendations.push(\n 'Verify certificate was issued by an approved CA for MyInvois',\n )\n }\n }\n\n // DS326 - Issuer Name Format Analysis (Enhanced)\n const rawIssuer = cert.issuer\n const normalizedIssuer = certInfo.issuerName\n\n // Check for issues in the NORMALIZED issuer (these are actual problems)\n const normalizedIssuerIssues = [\n {\n check: normalizedIssuer.includes('\\n'),\n issue: 'Normalized issuer still contains newlines',\n },\n {\n check: normalizedIssuer.includes(' '),\n issue: 'Normalized issuer contains double spaces',\n },\n {\n check: /=\\s+/.test(normalizedIssuer),\n issue: 'Normalized issuer has spaces after equals',\n },\n {\n check: /\\s+=/.test(normalizedIssuer),\n issue: 'Normalized issuer has spaces before equals',\n },\n {\n check: normalizedIssuer.includes('\\r'),\n issue: 'Normalized issuer contains carriage returns',\n },\n ]\n\n // Only report actual issues in the normalized version that will cause portal errors\n const hasActualFormatIssues = normalizedIssuerIssues.some(\n ({ check, issue }) => {\n if (check) {\n issues.push(`DS326: ${issue} - will cause X509IssuerName mismatch`)\n return true\n }\n return false\n },\n )\n\n // Check if raw issuer has issues but normalized version is OK (informational)\n const hasRawIssuesButNormalizedOk =\n rawIssuer.includes('\\n') && !normalizedIssuer.includes('\\n')\n\n if (hasActualFormatIssues) {\n recommendations.push(\n 'CRITICAL: Fix issuer name normalization in signature generation',\n )\n recommendations.push(\n 'Portal Error: \"Certificate X509IssuerName doesn\\'t match the X509IssuerName value provided in the signed properties section.\"',\n )\n recommendations.push(\n 'The normalization function is not properly formatting the issuer name',\n )\n recommendations.push(\n 'Debug: Check document.ts extractCertificateInfo() normalization logic',\n )\n } else if (hasRawIssuesButNormalizedOk) {\n // This is informational - normalization is working correctly\n console.log(\n 'ℹ️ Note: Raw certificate issuer has newlines but normalization is handling them correctly',\n )\n }\n\n // Additional certificate validity checks\n const now = new Date()\n const validFrom = new Date(cert.validFrom)\n const validTo = new Date(cert.validTo)\n\n if (now < validFrom) {\n issues.push('DS329: Certificate not yet valid (future start date)')\n recommendations.push('Wait until certificate validity period begins')\n }\n\n if (now > validTo) {\n issues.push('DS329: Certificate has expired')\n recommendations.push(\n 'BLOCKING: Renew certificate - expired certificates are rejected',\n )\n }\n\n // Check certificate key usage (if available)\n try {\n if (cert.keyUsage && !cert.keyUsage.includes('digital signature')) {\n issues.push('DS333: Certificate lacks digitalSignature key usage')\n recommendations.push(\n 'Generate new certificate with digitalSignature key usage enabled',\n )\n }\n } catch {\n // Key usage might not be available in all certificates\n console.log('Note: Could not check key usage extensions')\n }\n\n return {\n organizationIdentifier,\n serialNumber,\n issuerName: certInfo.issuerName,\n subjectName: certInfo.subjectName,\n issues,\n recommendations,\n }\n } catch (error) {\n issues.push(`Certificate parsing failed: ${error}`)\n recommendations.push('Verify certificate format and validity')\n\n return {\n issuerName: '',\n subjectName: '',\n issues,\n recommendations,\n }\n }\n}\n\n/**\n * Analyzes signature generation for potential issues\n */\nfunction analyzeSignatureForDiagnostics(\n invoices: InvoiceV1_1[],\n certificatePem: string,\n): SignatureAnalysisResult {\n const issues: string[] = []\n const recommendations: string[] = []\n\n try {\n // Step 1: Document digest\n const documentDigest = calculateDocumentDigest(invoices)\n\n // Step 2: Certificate digest\n const certificateDigest = calculateCertificateDigest(certificatePem)\n\n // Step 3: Extract certificate info\n const certInfo = extractCertificateInfo(certificatePem)\n const signingTime = new Date().toISOString()\n\n // Step 4: Create signed properties\n const signedProperties = createSignedProperties(\n certificateDigest,\n signingTime,\n certInfo.issuerName,\n certInfo.serialNumber,\n )\n\n // Step 5: Signed properties digest\n const signedPropertiesDigest =\n calculateSignedPropertiesDigest(signedProperties)\n\n // DS333 - Document Signature Validation\n if (documentDigest.length === 0) {\n issues.push('DS333: Document digest generation failed')\n recommendations.push(\n 'CRITICAL: Verify document serialization excludes UBLExtensions/Signature',\n )\n recommendations.push(\n 'Portal Error: \"Document signature value is not a valid signature of the document digest using the public key of the certificate provided.\"',\n )\n }\n\n if (certificateDigest.length === 0) {\n issues.push('DS333: Certificate digest generation failed')\n recommendations.push('CRITICAL: Verify certificate format and encoding')\n recommendations.push(\n 'Certificate must be properly base64 encoded without headers/footers',\n )\n }\n\n if (signedPropertiesDigest.length === 0) {\n issues.push('DS333: Signed properties digest generation failed')\n recommendations.push(\n 'CRITICAL: Verify signed properties structure and canonicalization',\n )\n recommendations.push(\n 'Check XML canonicalization (C14N) is applied correctly',\n )\n }\n\n // Additional DS333 checks\n try {\n const cert = new crypto.X509Certificate(certificatePem)\n\n // Verify the certificate has the required algorithms for MyInvois\n const publicKey = cert.publicKey\n const keyDetails = publicKey.asymmetricKeyDetails\n\n if (keyDetails) {\n // Check if key size is adequate for RSA (minimum 2048 bits)\n if (\n publicKey.asymmetricKeyType === 'rsa' &&\n keyDetails.modulusLength &&\n keyDetails.modulusLength < 2048\n ) {\n issues.push(\n 'DS333: RSA key size too small (minimum 2048 bits required)',\n )\n recommendations.push(\n 'CRITICAL: Generate new certificate with RSA 2048+ bits',\n )\n }\n\n // Check supported key types\n const supportedKeyTypes = ['rsa', 'ec']\n if (!supportedKeyTypes.includes(publicKey.asymmetricKeyType || '')) {\n issues.push(\n `DS333: Unsupported key type: ${publicKey.asymmetricKeyType}`,\n )\n recommendations.push(\n 'CRITICAL: Use RSA or EC key types for MyInvois compatibility',\n )\n }\n }\n\n // Test certificate format validity\n const certBuffer = Buffer.from(\n certificatePem.replace(/-----[^-]+-----/g, '').replace(/\\s/g, ''),\n 'base64',\n )\n if (certBuffer.length === 0) {\n issues.push('DS333: Certificate encoding appears invalid')\n recommendations.push(\n 'CRITICAL: Verify certificate is properly PEM encoded',\n )\n }\n } catch (error) {\n issues.push(`DS333: Certificate validation failed - ${error}`)\n recommendations.push(\n 'CRITICAL: Verify certificate format and structure are valid',\n )\n }\n\n // Validate digest formats (should be base64)\n const isValidBase64 = (str: string) => {\n try {\n return Buffer.from(str, 'base64').toString('base64') === str\n } catch {\n return false\n }\n }\n\n if (documentDigest && !isValidBase64(documentDigest)) {\n issues.push('DS333: Document digest is not valid base64 format')\n recommendations.push('Ensure digest is properly base64 encoded')\n }\n\n if (certificateDigest && !isValidBase64(certificateDigest)) {\n issues.push('DS333: Certificate digest is not valid base64 format')\n recommendations.push(\n 'Ensure certificate digest is properly base64 encoded',\n )\n }\n\n if (signedPropertiesDigest && !isValidBase64(signedPropertiesDigest)) {\n issues.push('DS333: Signed properties digest is not valid base64 format')\n recommendations.push(\n 'Ensure signed properties digest is properly base64 encoded',\n )\n }\n\n return {\n documentDigest,\n certificateDigest,\n signedPropertiesDigest,\n issues,\n recommendations,\n }\n } catch (error) {\n issues.push(`Signature analysis failed: ${error}`)\n recommendations.push('Review signature generation implementation')\n\n return {\n documentDigest: '',\n certificateDigest: '',\n signedPropertiesDigest: '',\n issues,\n recommendations,\n }\n }\n}\n\n/**\n * Comprehensive signature diagnostics\n */\nexport function diagnoseSignatureIssues(\n invoices: InvoiceV1_1[],\n certificatePem: string,\n): DiagnosticResult {\n const certificateAnalysis = analyzeCertificateForDiagnostics(certificatePem)\n const signatureAnalysis = analyzeSignatureForDiagnostics(\n invoices,\n certificatePem,\n )\n\n const certificateIssues = certificateAnalysis.issues.length\n const signatureIssues = signatureAnalysis.issues.length\n\n return {\n certificateAnalysis,\n signatureAnalysis,\n summary: {\n totalIssues: certificateIssues + signatureIssues,\n certificateIssues,\n signatureIssues,\n },\n }\n}\n\n/**\n * Prints diagnostic results in a formatted way\n */\nexport function printDiagnostics(result: DiagnosticResult): void {\n console.log('\\n🔍 MyInvois Signature Diagnostics Report')\n console.log('='.repeat(60))\n\n // Certificate Analysis\n console.log('\\n📜 CERTIFICATE ANALYSIS')\n console.log('-'.repeat(30))\n\n console.log(` Issuer: ${result.certificateAnalysis.issuerName}`)\n console.log(` Subject: ${result.certificateAnalysis.subjectName}`)\n\n if (result.certificateAnalysis.organizationIdentifier) {\n console.log(\n ` Organization ID (TIN): ${result.certificateAnalysis.organizationIdentifier}`,\n )\n }\n\n if (result.certificateAnalysis.serialNumber) {\n console.log(` Serial Number: ${result.certificateAnalysis.serialNumber}`)\n }\n\n if (result.certificateAnalysis.issues.length > 0) {\n console.log('\\n 🚨 Certificate Issues:')\n result.certificateAnalysis.issues.forEach((issue, index) => {\n console.log(` ${index + 1}. ${issue}`)\n })\n }\n\n if (result.certificateAnalysis.recommendations.length > 0) {\n console.log('\\n 💡 Certificate Recommendations:')\n result.certificateAnalysis.recommendations.forEach((rec, index) => {\n console.log(` ${index + 1}. ${rec}`)\n })\n }\n\n // Signature Analysis\n console.log('\\n🔐 SIGNATURE ANALYSIS')\n console.log('-'.repeat(30))\n\n console.log(\n ` Document Digest: ${result.signatureAnalysis.documentDigest.substring(0, 32)}...`,\n )\n console.log(\n ` Certificate Digest: ${result.signatureAnalysis.certificateDigest.substring(0, 32)}...`,\n )\n console.log(\n ` Signed Properties Digest: ${result.signatureAnalysis.signedPropertiesDigest.substring(0, 32)}...`,\n )\n\n if (result.signatureAnalysis.issues.length > 0) {\n console.log('\\n 🚨 Signature Issues:')\n result.signatureAnalysis.issues.forEach((issue, index) => {\n console.log(` ${index + 1}. ${issue}`)\n })\n }\n\n if (result.signatureAnalysis.recommendations.length > 0) {\n console.log('\\n 💡 Signature Recommendations:')\n result.signatureAnalysis.recommendations.forEach((rec, index) => {\n console.log(` ${index + 1}. ${rec}`)\n })\n }\n\n // Summary\n console.log('\\n📊 SUMMARY')\n console.log('-'.repeat(30))\n console.log(` Total Issues Found: ${result.summary.totalIssues}`)\n console.log(` Certificate Issues: ${result.summary.certificateIssues}`)\n console.log(` Signature Issues: ${result.summary.signatureIssues}`)\n\n if (result.summary.totalIssues === 0) {\n console.log('\\n ✅ No issues detected in current analysis')\n console.log(' 🎉 Certificate and signature implementation appear valid')\n } else {\n console.log('\\n ⚠️ Issues detected - review recommendations above')\n\n // Check for specific portal errors\n const hasDS311 = result.certificateAnalysis.issues.some(issue =>\n issue.includes('DS311'),\n )\n const hasDS312 = result.certificateAnalysis.issues.some(issue =>\n issue.includes('DS312'),\n )\n const hasDS326 = result.certificateAnalysis.issues.some(issue =>\n issue.includes('DS326'),\n )\n const hasDS329 = result.certificateAnalysis.issues.some(issue =>\n issue.includes('DS329'),\n )\n const hasDS333 = result.signatureAnalysis.issues.some(issue =>\n issue.includes('DS333'),\n )\n\n console.log('\\n 🎯 MYINVOIS PORTAL ERROR ANALYSIS:')\n\n if (hasDS311) {\n console.log(\n ' ❌ DS311 - TIN mismatch between certificate and submitter',\n )\n }\n\n if (hasDS312) {\n console.log(\n ' ❌ DS312 - Registration number mismatch with certificate',\n )\n }\n\n if (hasDS326) {\n console.log(' ❌ DS326 - X509IssuerName format inconsistency')\n }\n\n if (hasDS329) {\n console.log(' ❌ DS329 - Certificate trust chain validation failure')\n }\n\n if (hasDS333) {\n console.log(' ❌ DS333 - Document signature validation failure')\n }\n\n if (result.summary.certificateIssues > 0) {\n console.log('\\n 🚨 PRIMARY ACTION REQUIRED:')\n console.log(' Certificate issues must be resolved first')\n console.log(\n ' Self-generated certificates cannot pass MyInvois validation',\n )\n }\n\n if (result.summary.signatureIssues > 0) {\n console.log('\\n ⚙️ SECONDARY ACTION:')\n console.log(' Review and optimize signature implementation')\n }\n\n console.log('\\n 📋 NEXT STEPS:')\n console.log(' 1. Address BLOCKING/CRITICAL issues first')\n console.log(' 2. Test with updated certificate/implementation')\n console.log(' 3. Re-run diagnostics to verify fixes')\n console.log(' 4. Submit test document to MyIn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Q,IACN,+DACD;AAGH,MAAI,SACF,SAAQ,IAAI,qDAAqD;AAGnE,MAAI,SACF,SAAQ,IAAI,4DAA4D;AAG1E,MAAI,SACF,SAAQ,IAAI,uDAAuD;AAGrE,MAAI,OAAO,QAAQ,oBAAoB,GAAG;AACxC,WAAQ,IAAI,kCAAkC;AAC9C,WAAQ,IAAI,iDAAiD;AAC7D,WAAQ,IACN,mEACD;EACF;AAED,MAAI,OAAO,QAAQ,kBAAkB,GAAG;AACtC,WAAQ,IAAI,4BAA4B;AACxC,WAAQ,IAAI,oDAAoD;EACjE;AAED,UAAQ,IAAI,qBAAqB;AACjC,UAAQ,IAAI,iDAAiD;AAC7D,UAAQ,IAAI,uDAAuD;AACnE,UAAQ,IAAI,6CAA6C;AACzD,UAAQ,IAAI,kDAAkD;CAC/D;AAED,SAAQ,IAAI,OAAO,IAAI,OAAO,GAAG,CAAC;AACnC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index30.cjs","names":["tin: string","registrationType?: string","errors: ValidationError[]","contactNumber: string","amount: number","fieldName: string","item: InvoiceLineItem","index: number","invoice: InvoiceV1_1","allErrors: ValidationError[]"],"sources":["../src/utils/validation.ts"],"sourcesContent":["import type { InvoiceV1_1, InvoiceLineItem } from '../types'\n\n/**\n * MyInvois Invoice Validation Utilities\n *\n * Provides comprehensive validation for invoice data before document generation\n * and submission to ensure compliance with MyInvois business rules and format requirements.\n */\n\nexport interface ValidationResult {\n isValid: boolean\n errors: ValidationError[]\n warnings: ValidationWarning[]\n}\n\nexport interface ValidationError {\n field: string\n code: string\n message: string\n severity: 'error' | 'warning'\n}\n\nexport interface ValidationWarning extends ValidationError {\n severity: 'warning'\n}\n\n/**\n * Validates TIN format based on registration type\n */\nexport const validateTIN = (\n tin: string,\n registrationType?: string,\n): ValidationError[] => {\n const errors: ValidationError[] = []\n\n if (!tin) {\n errors.push({\n field: 'tin',\n code: 'TIN_REQUIRED',\n message: 'TIN is required',\n severity: 'error',\n })\n return errors\n }\n\n // TIN format validation based on type\n if (registrationType === 'BRN' && !tin.startsWith('C')) {\n errors.push({\n field: 'tin',\n code: 'TIN_FORMAT_INVALID',\n message: 'Company TIN should start with \"C\" for BRN registration',\n severity: 'warning',\n })\n }\n\n if (registrationType === 'NRIC' && !tin.startsWith('IG')) {\n errors.push({\n field: 'tin',\n code: 'TIN_FORMAT_INVALID',\n message: 'Individual TIN should start with \"IG\" for NRIC registration',\n severity: 'warning',\n })\n }\n\n // Length validation\n if (tin.length > 14) {\n errors.push({\n field: 'tin',\n code: 'TIN_LENGTH_INVALID',\n message: 'TIN cannot exceed 14 characters',\n severity: 'error',\n })\n }\n\n return errors\n}\n\n/**\n * Validates contact number format (E.164 standard)\n */\nexport const validateContactNumber = (\n contactNumber: string,\n): ValidationError[] => {\n const errors: ValidationError[] = []\n\n if (!contactNumber || contactNumber === 'NA') {\n return errors // Allow NA for consolidated e-invoices\n }\n\n // E.164 format validation\n const e164Regex = /^\\+[1-9]\\d{1,14}$/\n if (!e164Regex.test(contactNumber)) {\n errors.push({\n field: 'contactNumber',\n code: 'CONTACT_FORMAT_INVALID',\n message: 'Contact number must be in E.164 format (e.g., +60123456789)',\n severity: 'error',\n })\n }\n\n if (contactNumber.length < 8) {\n errors.push({\n field: 'contactNumber',\n code: 'CONTACT_LENGTH_INVALID',\n message: 'Contact number must be at least 8 characters',\n severity: 'error',\n })\n }\n\n return errors\n}\n\n/**\n * Validates monetary amounts\n */\nexport const validateMonetaryAmount = (\n amount: number,\n fieldName: string,\n maxDigits = 18,\n maxDecimals = 2,\n): ValidationError[] => {\n const errors: ValidationError[] = []\n\n if (amount < 0) {\n errors.push({\n field: fieldName,\n code: 'AMOUNT_NEGATIVE',\n message: `${fieldName} cannot be negative`,\n severity: 'error',\n })\n }\n\n // Check total digits\n const amountStr = amount.toString()\n const [integerPart, decimalPart] = amountStr.split('.')\n\n if (integerPart && integerPart.length > maxDigits - maxDecimals) {\n errors.push({\n field: fieldName,\n code: 'AMOUNT_DIGITS_EXCEEDED',\n message: `${fieldName} exceeds maximum ${maxDigits} digits`,\n severity: 'error',\n })\n }\n\n if (decimalPart && decimalPart.length > maxDecimals) {\n errors.push({\n field: fieldName,\n code: 'AMOUNT_DECIMALS_EXCEEDED',\n message: `${fieldName} exceeds maximum ${maxDecimals} decimal places`,\n severity: 'error',\n })\n }\n\n return errors\n}\n\n/**\n * Validates line item tax calculation consistency for both fixed rate and percentage taxation\n */\nexport const validateLineItemTax = (\n item: InvoiceLineItem,\n index: number,\n): ValidationError[] => {\n const errors: ValidationError[] = []\n const tolerance = 0.01\n\n // Check if tax calculation method is specified\n const hasFixedRate =\n item.taxPerUnitAmount !== undefined && item.baseUnitMeasure !== undefined\n const hasPercentageRate = item.taxRate !== undefined\n\n if (!hasFixedRate && !hasPercentageRate) {\n errors.push({\n field: `lineItem[${index}]`,\n code: 'TAX_METHOD_MISSING',\n message: `Line item ${index + 1} must specify either taxRate (for percentage) or taxPerUnitAmount + baseUnitMeasure (for fixed rate)`,\n severity: 'error',\n })\n return errors\n }\n\n if (hasFixedRate && hasPercentageRate) {\n errors.push({\n field: `lineItem[${index}]`,\n code: 'TAX_METHOD_CONFLICT',\n message: `Line item ${index + 1} cannot have both percentage and fixed rate tax methods`,\n severity: 'error',\n })\n }\n\n // Validate fixed rate tax calculation\n if (hasFixedRate) {\n if (item.baseUnitMeasureCode === undefined) {\n errors.push({\n field: `lineItem[${index}].baseUnitMeasureCode`,\n code: 'UNIT_CODE_MISSING',\n message: `Line item ${index + 1} with fixed rate tax must specify baseUnitMeasureCode`,\n severity: 'error',\n })\n }\n\n const expectedTaxAmount = item.taxPerUnitAmount! * item.baseUnitMeasure!\n if (Math.abs(item.taxAmount - expectedTaxAmount) > tolerance) {\n errors.push({\n field: `lineItem[${index}].taxAmount`,\n code: 'FIXED_TAX_CALCULATION_MISMATCH',\n message: `Line item ${index + 1} tax amount (${item.taxAmount}) doesn't match fixed rate calculation (${item.taxPerUnitAmount} × ${item.baseUnitMeasure} = ${expectedTaxAmount})`,\n severity: 'error',\n })\n }\n }\n\n // Validate percentage tax calculation\n if (hasPercentageRate && !hasFixedRate) {\n const expectedTaxAmount =\n (item.totalTaxableAmountPerLine * item.taxRate!) / 100\n if (Math.abs(item.taxAmount - expectedTaxAmount) > tolerance) {\n errors.push({\n field: `lineItem[${index}].taxAmount`,\n code: 'PERCENTAGE_TAX_CALCULATION_MISMATCH',\n message: `Line item ${index + 1} tax amount (${item.taxAmount}) doesn't match percentage calculation (${item.totalTaxableAmountPerLine} × ${item.taxRate}% = ${expectedTaxAmount})`,\n severity: 'error',\n })\n }\n }\n\n return errors\n}\n\n/**\n * Validates tax calculation consistency\n */\nexport const validateTaxCalculations = (\n invoice: InvoiceV1_1,\n): ValidationError[] => {\n const errors: ValidationError[] = []\n\n // Validate individual line item tax calculations\n invoice.invoiceLineItems.forEach((item, index) => {\n errors.push(...validateLineItemTax(item, index))\n })\n\n // Calculate expected totals from line items\n const expectedTaxExclusive = invoice.invoiceLineItems.reduce(\n (sum, item) => sum + item.totalTaxableAmountPerLine,\n 0,\n )\n const expectedTaxAmount = invoice.invoiceLineItems.reduce(\n (sum, item) => sum + item.taxAmount,\n 0,\n )\n\n // Allow small rounding differences (0.01)\n const tolerance = 0.01\n\n if (\n Math.abs(\n invoice.legalMonetaryTotal.taxExclusiveAmount - expectedTaxExclusive,\n ) > tolerance\n ) {\n errors.push({\n field: 'legalMonetaryTotal.taxExclusiveAmount',\n code: 'TAX_EXCLUSIVE_MISMATCH',\n message: `Tax exclusive amount (${invoice.legalMonetaryTotal.taxExclusiveAmount}) doesn't match sum of line items (${expectedTaxExclusive})`,\n severity: 'error',\n })\n }\n\n if (Math.abs(invoice.taxTotal.taxAmount - expectedTaxAmount) > tolerance) {\n errors.push({\n field: 'taxTotal.taxAmount',\n code: 'TAX_AMOUNT_MISMATCH',\n message: `Tax amount (${invoice.taxTotal.taxAmount}) doesn't match sum of line item taxes (${expectedTaxAmount})`,\n severity: 'error',\n })\n }\n\n return errors\n}\n\n/**\n * Main validation function for complete invoice\n */\nexport const validateInvoice = (invoice: InvoiceV1_1): ValidationResult => {\n const allErrors: ValidationError[] = []\n\n // Core field validations\n allErrors.push(\n ...validateTIN(invoice.supplier.tin, invoice.supplier.registrationType),\n )\n allErrors.push(\n ...validateTIN(invoice.buyer.tin, invoice.buyer.registrationType),\n )\n\n allErrors.push(...validateContactNumber(invoice.supplier.contactNumber))\n allErrors.push(...validateContactNumber(invoice.buyer.contactNumber))\n\n // Monetary validations\n allErrors.push(\n ...validateMonetaryAmount(\n invoice.legalMonetaryTotal.taxExclusiveAmount,\n 'taxExclusiveAmount',\n ),\n )\n allErrors.push(\n ...validateMonetaryAmount(\n invoice.legalMonetaryTotal.payableAmount,\n 'payableAmount',\n ),\n )\n allErrors.push(\n ...validateMonetaryAmount(invoice.taxTotal.taxAmount, 'taxAmount'),\n )\n\n // Line item validations\n invoice.invoiceLineItems.forEach((item, index) => {\n allErrors.push(\n ...validateMonetaryAmount(item.unitPrice, `lineItem[${index}].unitPrice`),\n )\n allErrors.push(\n ...validateMonetaryAmount(item.taxAmount, `lineItem[${index}].taxAmount`),\n )\n allErrors.push(\n ...validateMonetaryAmount(\n item.totalTaxableAmountPerLine,\n `lineItem[${index}].totalTaxableAmountPerLine`,\n ),\n )\n })\n\n // Business rule validations\n allErrors.push(...validateTaxCalculations(invoice))\n\n // Separate errors and warnings\n const errors = allErrors.filter(e => e.severity === 'error')\n const warnings = allErrors.filter(\n e => e.severity === 'warning',\n ) as ValidationWarning[]\n\n return {\n isValid: errors.length === 0,\n errors,\n warnings,\n }\n}\n"],"mappings":";;;;;AA6BA,MAAa,cAAc,CACzBA,KACAC,qBACsB;CACtB,MAAMC,SAA4B,CAAE;AAEpC,MAAK,KAAK;AACR,SAAO,KAAK;GACV,OAAO;GACP,MAAM;GACN,SAAS;GACT,UAAU;EACX,EAAC;AACF,SAAO;CACR;AAGD,KAAI,qBAAqB,UAAU,IAAI,WAAW,IAAI,CACpD,QAAO,KA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,YAAU,KACR,GAAG,uBAAuB,KAAK,YAAY,WAAW,MAAM,aAAa,CAC1E;AACD,YAAU,KACR,GAAG,uBAAuB,KAAK,YAAY,WAAW,MAAM,aAAa,CAC1E;AACD,YAAU,KACR,GAAG,uBACD,KAAK,4BACJ,WAAW,MAAM,6BACnB,CACF;CACF,EAAC;AAGF,WAAU,KAAK,GAAG,wBAAwB,QAAQ,CAAC;CAGnD,MAAM,SAAS,UAAU,OAAO,OAAK,EAAE,aAAa,QAAQ;CAC5D,MAAM,WAAW,UAAU,OACzB,OAAK,EAAE,aAAa,UACrB;AAED,QAAO;EACL,SAAS,OAAO,WAAW;EAC3B;EACA;CACD;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index31.cjs","names":[],"sources":["../src/types/msic/0X.d.ts"],"sourcesContent":["export type MSICCode = {\n code: string\n description: string\n msicCategoryReference: string\n}\n\nexport type MSIC_0X_CODE =\n | '00000'\n | '01111'\n | '01112'\n | '01113'\n | '01119'\n | '01120'\n | '01131'\n | '01132'\n | '01133'\n | '01134'\n | '01135'\n | '01136'\n | '01137'\n | '01138'\n | '01140'\n | '01150'\n | '01160'\n | '01191'\n | '01192'\n | '01193'\n | '01199'\n | '01210'\n | '01221'\n | '01222'\n | '01223'\n | '01224'\n | '01225'\n | '01226'\n | '01227'\n | '01228'\n | '01229'\n | '01231'\n | '01232'\n | '01233'\n | '01239'\n | '01241'\n | '01249'\n | '01251'\n | '01252'\n | '01253'\n | '01259'\n | '01261'\n | '01262'\n | '01263'\n | '01269'\n | '01271'\n | '01272'\n | '01273'\n | '01279'\n | '01281'\n | '01282'\n | '01283'\n | '01284'\n | '01285'\n | '01289'\n | '01291'\n | '01292'\n | '01293'\n | '01294'\n | '01295'\n | '01296'\n | '01299'\n | '01301'\n | '01302'\n | '01303'\n | '01304'\n | '01411'\n | '01412'\n | '01413'\n | '01420'\n | '01430'\n | '01441'\n | '01442'\n | '01443'\n | '01450'\n | '01461'\n | '01462'\n | '01463'\n | '01464'\n | '01465'\n | '01466'\n | '01467'\n | '01468'\n | '01469'\n | '01491'\n | '01492'\n | '01493'\n | '01494'\n | '01495'\n | '01496'\n | '01497'\n | '01499'\n | '01500'\n | '01610'\n | '01620'\n | '01631'\n | '01632'\n | '01633'\n | '01634'\n | '01640'\n | '01701'\n | '01702'\n | '02101'\n | '02102'\n | '02103'\n | '02104'\n | '02105'\n | '02201'\n | '02202'\n | '02203'\n | '02204'\n | '02301'\n | '02302'\n | '02303'\n | '02309'\n | '02401'\n | '02402'\n | '03111'\n | '03112'\n | '03113'\n | '03114'\n | '03115'\n | '03119'\n | '03121'\n | '03122'\n | '03123'\n | '03124'\n | '03129'\n | '03211'\n | '03212'\n | '03213'\n | '03214'\n | '03215'\n | '03216'\n | '03217'\n | '03218'\n | '03219'\n | '03221'\n | '03222'\n | '03223'\n | '03224'\n | '03225'\n | '03229'\n | '05100'\n | '05200'\n | '06101'\n | '06102'\n | '06103'\n | '06104'\n | '06201'\n | '06202'\n | '06203'\n | '06204'\n | '06205'\n | '07101'\n | '07102'\n | '07210'\n | '07291'\n | '07292'\n | '07293'\n | '07294'\n | '07295'\n | '07296'\n | '07297'\n | '07298'\n | '07299'\n | '08101'\n | '08102'\n | '08103'\n | '08104'\n | '08105'\n | '08106'\n | '08107'\n | '08108'\n | '08109'\n | '08911'\n | '08912'\n | '08913'\n | '08914'\n | '08915'\n | '08916'\n | '08917'\n | '08918'\n | '08921'\n | '08922'\n | '08923'\n | '08931'\n | '08932'\n | '08933'\n | '08991'\n | '08992'\n | '08993'\n | '08994'\n | '08995'\n | '08996'\n | '08999'\n | '09101'\n | '09102'\n | '09900'\n\nexport enum MSIC_0X {\n NOT_APPLICABLE = '00000',\n GROWING_OF_MAIZE = '01111',\n GROWING_OF_LEGUMINOUS_CROPS = '01112',\n GROWING_OF_OIL_SEEDS = '01113',\n GROWING_OF_OTHER_CEREALS = '01119',\n GROWING_OF_PADDY = '01120',\n GROWING_OF_LEAFY_OR_STEM_VEGETABLES = '01131',\n GROWING_OF_FRUITS_BEARING_VEGETABLES = '01132',\n GROWING_OF_MELONS = '01133',\n GROWING_OF_MUSHROOMS_AND_TRUFFLES = '01134',\n GROWING_OF_VEGETABLES_SEEDS = '01135',\n GROWING_OF_OTHER_VEGETABLES = '01136',\n GROWING_OF_SUGAR_BEET = '01137',\n GROWING_OF_ROOTS_TUBERS = '01138',\n GROWING_OF_SUGAR_CANE = '01140',\n GROWING_OF_TOBACCO = '01150',\n GROWING_OF_FIBRE_CROPS = '01160',\n GROWING_OF_FLOWERS = '01191',\n GROWING_OF_FLOWER_SEEDS = '01192',\n GROWING_OF_SAGO = '01193',\n GROWING_OF_OTHER_NON_PERENNIAL_CROPS = '01199',\n GROWING_OF_GRAPES = '01210',\n GROWING_OF_BANANA = '01221',\n GROWING_OF_MANGO = '01222',\n GROWING_OF_DURIAN = '01223',\n GROWING_OF_RAMBUTAN = '01224',\n GROWING_OF_STAR_FRUIT = '01225',\n GROWING_OF_PAPAYA = '01226',\n GROWING_OF_PINEAPPLE = '01227',\n GROWING_OF_PITAYA = '01228',\n GROWING_OF_OTHER_TROPICAL_FRUITS = '01229',\n GROWING_OF_POMELO = '01231',\n GROWING_OF_LEMON_AND_LIMES = '01232',\n GROWING_OF_TANGERINES_AND_MANDARIN = '01233',\n GROWING_OF_OTHER_CITRUS_FRUITS = '01239',\n GROWING_OF_GUAVA = '01241',\n GROWING_OF_OTHER_POME_FRUITS = '01249',\n GROWING_OF_BERRIES = '01251',\n GROWING_OF_FRUIT_SEEDS = '01252',\n GROWING_OF_EDIBLE_NUTS = '01253',\n GROWING_OF_OTHER_TREE_AND_BUSH_FRUITS = '01259',\n GROWING_OF_OIL_PALM_ESTATE = '01261',\n GROWING_OF_OIL_PALM_SMALLHOLDINGS = '01262',\n GROWING_OF_COCONUT = '01263',\n GROWING_OF_OTHER_OLEAGINOUS_FRUITS = '01269',\n GROWING_OF_COFFEE = '01271',\n GROWING_OF_TEA = '01272',\n GROWING_OF_COCOA = '01273',\n GROWING_OF_OTHER_BEVERAGE_CROPS = '01279',\n GROWING_OF_PEPPER = '01281',\n GROWING_OF_CHILIES = '01282',\n GROWING_OF_NUTMEG = '01283',\n GROWING_OF_GINGER = '01284',\n GROWING_OF_PLANTS_FOR_PHARMACY = '01285',\n GROWING_OF_OTHER_SPICES = '01289',\n GROWING_OF_RUBBER_TREES_ESTATE = '01291',\n GROWING_OF_RUBBER_TREES_SMALLHOLDINGS = '01292',\n GROWING_OF_TREES_FOR_SAP = '01293',\n GROWING_OF_NIPA_PALM = '01294',\n GROWING_OF_ARECA = '01295',\n GROWING_OF_ROSELLE = '01296',\n GROWING_OF_OTHER_PERENNIAL_CROPS = '01299',\n GROWING_OF_PLANTS_FOR_PLANTING = '01301',\n GROWING_OF_PLANTS_FOR_ORNAMENTAL = '01302',\n GROWING_OF_LIVE_PLANTS = '01303',\n OPERATION_OF_TREE_NURSERIES = '01304',\n RAISING_CATTLE_OR_BUFFALOES = '01411',\n PRODUCTION_OF_RAW_MILK = '01412',\n PRODUCTION_OF_BOVINE_SEMEN = '01413',\n RAISING_OF_HORSES = '01420',\n RAISING_OF_CAMELS = '01430',\n RAISING_OF_SHEEP_AND_GOATS = '01441',\n PRODUCTION_OF_SHEEP_MILK = '01442',\n PRODUCTION_OF_RAW_WOOL = '01443',\n RAISING_OF_SWINE = '01450',\n RAISING_OF_CHICKEN = '01461',\n RAISING_OF_DUCKS = '01462',\n RAISING_OF_GEESE = '01463',\n RAISING_OF_QUAILS = '01464',\n RAISING_OF_OTHER_POULTRY = '01465',\n PRODUCTION_OF_CHICKEN_EGGS = '01466',\n PRODUCTION_OF_DUCK_EGGS = '01467',\n PRODUCTION_OF_OTHER_POULTRY_EGGS = '01468',\n OPERATION_OF_POULTRY_HATCHERIES = '01469',\n RAISING_OF_SEMI_DOMESTICATED = '01491',\n PRODUCTION_OF_FUR_SKINS = '01492',\n OPERATION_OF_WORM_FARMS = '01493',\n RAISING_OF_SILK_WORMS = '01494',\n BEE_KEEPING = '01495',\n RAISING_OF_PET_ANIMALS = '01496',\n RAISING_OF_SWIFLET = '01497',\n RAISING_OF_DIVERSE_ANIMALS = '01499',\n MIXED_FARMING = '01500',\n AGRICULTURAL_ACTIVITIES_FOR_CROPS = '01610',\n AGRICULTURAL_ACTIVITIES_FOR_ANIMALS = '01620',\n PREPARATION_OF_CROPS = '01631',\n PREPARATION_OF_TOBACCO_LEAVES = '01632',\n PREPARATION_OF_COCOA_BEANS = '01633',\n SUN_DRYING_OF_FRUITS = '01634',\n SEED_PROCESSING = '01640',\n HUNTING_AND_TRAPPING = '01701',\n TAKING_OF_ANIMALS = '01702',\n PLANTING_OF_FORESTS = '02101',\n GROWING_OF_COPPICE = '02102',\n OPERATION_OF_FOREST_NURSERIES = '02103',\n COLLECTION_OF_WILDINGS = '02104',\n FOREST_PLANTATION = '02105',\n PRODUCTION_OF_ROUND_WOOD = '02201',\n PRODUCTION_OF_UNPROCESSED_WOOD = '02202',\n PRODUCTION_OF_CHARCOAL = '02203',\n RUBBER_WOOD_LOGGING = '02204',\n COLLECTION_OF_RATTAN = '02301',\n BIRDS_NEST_COLLECTION = '02302',\n WILD_SAGO_PALM_COLLECTION = '02303',\n GATHERING_OF_NON_WOOD_FOREST = '02309',\n FORESTRY_SERVICE_ACTIVITIES = '02401',\n LOGGING_SERVICE_ACTIVITIES = '02402',\n COMMERCIAL_OCEAN_FISHING = '03111',\n COLLECTION_OF_MARINE_CRUSTACEANS = '03112',\n TAKING_OF_AQUATIC_ANIMALS = '03113',\n VESSELS_FOR_FISHING = '03114',\n GATHERING_OF_MARINE_ORGANISMS = '03115',\n MARINE_FISHING = '03119',\n COMMERCIAL_INLAND_FISHING = '03121',\n TAKING_OF_FRESHWATER_CRUSTACEANS = '03122',\n TAKING_OF_FRESHWATER_ANIMALS = '03123',\n GATHERING_OF_FRESHWATER_FLORA = '03124',\n FRESHWATER_FISHING = '03129',\n FISH_FARMING_SEA_WATER = '03211',\n PRODUCTION_OF_BIVALVE_SPAT = '03212',\n GROWING_OF_SEAWEEDS = '03213',\n CULTURE_OF_CRUSTACEANS = '03214',\n AQUACULTURE_IN_BRACKISH = '03215',\n AQUACULTURE_IN_SALT_WATER = '03216',\n OPERATION_OF_MARINE_HATCHERIES = '03217',\n OPERATION_OF_MARINE_WORM_FARMS = '03218',\n MARINE_AQUACULTURE = '03219',\n FISH_FARMING_FRESHWATER = '03221',\n SHRIMP_FARMING_FRESHWATER = '03222',\n CULTURE_OF_FRESHWATER_CRUSTACEANS = '03223',\n OPERATION_OF_FRESHWATER_HATCHERIES = '03224',\n FARMING_OF_FROGS = '03225',\n FRESHWATER_AQUACULTURE = '03229',\n MINING_OF_HARD_COAL = '05100',\n MINING_OF_LIGNITE = '05200',\n EXTRACTION_OF_CRUDE_PETROLEUM = '06101',\n EXTRACTION_OF_BITUMINOUS = '06102',\n PRODUCTION_OF_CRUDE_PETROLEUM = '06103',\n PROCESSES_TO_OBTAIN_CRUDE_OILS = '06104',\n PRODUCTION_OF_NATURAL_GAS = '06201',\n EXTRACTION_OF_CONDENSATES = '06202',\n DRAINING_OF_HYDROCARBON = '06203',\n GAS_DESULPHURIZATION = '06204',\n MINING_OF_HYDROCARBON_LIQUIDS = '06205',\n MINING_OF_IRON_ORES = '07101',\n BENEFICIATION_OF_IRON_ORES = '07102',\n MINING_OF_URANIUM = '07210',\n MINING_OF_TIN = '07291',\n MINING_OF_COPPER = '07292',\n MINING_OF_BAUXITE = '07293',\n MINING_OF_ILMENITE = '07294',\n MINING_OF_GOLD = '07295',\n MINING_OF_SILVER = '07296',\n MINING_OF_PLATINUM = '07297',\n AMANG_RETREATMENT = '07298',\n MINING_OF_OTHER_NON_FERROUS = '07299',\n QUARRYING_OF_STONE = '08101',\n QUARRYING_OF_LIMESTONE = '08102',\n MINING_OF_GYPSUM = '08103',\n MINING_OF_CHALK = '08104',\n EXTRACTION_OF_SAND = '08105',\n BREAKING_OF_STONE = '08106',\n QUARRYING_OF_SAND = '08107',\n MINING_OF_CLAYS = '08108',\n QUARRYING_OF_GRANITE = '08109',\n MINING_OF_PHOSPHATES = '08911',\n MINING_OF_POTASSIUM = '08912',\n MINING_OF_SULPHUR = '08913',\n EXTRACTION_OF_PYRITES = '08914',\n MINING_OF_BARIUM = '08915',\n MINING_OF_BORATES = '08916',\n MINING_OF_EARTH_COLOURS = '08917',\n GUANO_MINING = '08918',\n PEAT_DIGGING = '08921',\n PEAT_AGGLOMERATION = '08922',\n PREPARATION_OF_PEAT = '08923',\n EXTRACTION_OF_UNDERGROUND_SALT = '08931',\n SALT_PRODUCTION = '08932',\n CRUSHING_OF_SALT = '08933',\n MINING_OF_ABRASIVE_MATERIALS = '08991',\n MINING_OF_ASBESTOS = '08992',\n MINING_OF_SILICEOUS = '08993',\n MINING_OF_GRAPHITE = '08994',\n MINING_OF_STEATITE = '08995',\n MINING_OF_GEMSTONES = '08996',\n OTHER_MINING = '08999',\n OIL_AND_GAS_EXTRACTION = '09101',\n OIL_AND_GAS_FIREFIGHTING = '09102',\n SUPPORT_FOR_MINING = '09900',\n}\n"],"mappings":";;AA+MA,IAAY,8CAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index61.cts","names":[],"sources":["../src/api/documentManagement.d.ts"],"sourcesContent":["import type { DocumentSummary, DocumentStatus, EInvoiceTypeCode, DocumentValidationResult, DocumentValidationStepResult, Fetch } from '../types';\ninterface DocumentContext {\n fetch: Fetch;\n}\nexport declare function getDocument(context: DocumentContext, documentUid: string): Promise<DocumentSummary & {\n document: string;\n}>;\nexport declare function getDocumentDetails(context: DocumentContext, documentUid: string): Promise<DocumentSummary & {\n validationResults: {\n status: DocumentValidationResult;\n validationSteps: DocumentValidationStepResult[];\n };\n}>;\nexport declare function searchDocuments(context: DocumentContext, params: {\n uuid?: string;\n submissionDateFrom: string;\n submissionDateTo?: string;\n pageSize?: number;\n pageNo?: number;\n issueDateFrom?: string;\n issueDateTo?: string;\n invoiceDirection?: 'Sent' | 'Received';\n status?: DocumentStatus;\n documentType?: EInvoiceTypeCode;\n searchQuery?: string;\n}): Promise<DocumentSummary[]>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAI,kBAAkB,CAAC,KAAG,MAAA,KAAA;AAC1B,IAAW,cAAK;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AAChB,IAAA,qBAAA;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AACA,IAAW,kBAAkB;CAAC;CAAK,MAAM;CAAiB,MAAM;CAAgB,MAAM;CAAkB,MAAM;CAAA,MAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index62.cts","names":[],"sources":["../src/api/documentSubmission.d.ts"],"sourcesContent":["import type { AllDocumentsV1_1, SubmissionResponse, SigningCredentials, SubmissionStatus, DocumentSummary, Fetch, StandardError } from '../types';\ninterface SubmissionContext {\n fetch: Fetch;\n debug: boolean;\n signingCredentials: SigningCredentials;\n}\nexport declare function submitDocument(context: SubmissionContext, documents: AllDocumentsV1_1[]): Promise<{\n data: SubmissionResponse;\n status: number;\n}>;\nexport declare function getSubmissionStatus(context: Pick<SubmissionContext, 'fetch' | 'debug'>, submissionUid: string, pollInterval?: number, maxRetries?: number, pageNo?: number, pageSize?: number): Promise<{\n status: SubmissionStatus;\n documentSummary?: DocumentSummary[];\n error?: {\n code: string;\n message: string | null;\n target: string;\n details: {\n code: string;\n message: string;\n target: string;\n }[];\n };\n}>;\nexport declare function performDocumentAction(context: Pick<SubmissionContext, 'fetch'>, documentUid: string, status: 'rejected' | 'cancelled', reason: string): Promise<{\n uuid: string;\n status: string;\n error: StandardError;\n}>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAI,oBAAoB;CAAC;CAAG,MAAA;CAAA,MAAA;AAAA;AAC5B,IAAW,iBAAK;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AAChB,IAAW,sBAAO;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AAClB,IAAW,wBAAwB;CAAC;CAAK,MAAC;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index63.cts","names":[],"sources":["../src/api/documentTypeManagement.d.ts"],"sourcesContent":["import type { DocumentTypeResponse, DocumentTypesResponse, DocumentTypeVersionResponse, Fetch } from '../types';\ninterface DocumentTypeContext {\n fetch: Fetch;\n}\nexport declare function getDocumentTypes(context: DocumentTypeContext): Promise<DocumentTypesResponse>;\nexport declare function getDocumentType(context: DocumentTypeContext, id: number): Promise<DocumentTypeResponse>;\nexport declare function getDocumentTypeVersion(context: DocumentTypeContext, id: number, versionId: number): Promise<DocumentTypeVersionResponse>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAI,sBAAsB,CAAC,KAAG,MAAA,KAAA;AAC9B,IAAW,mBAAK;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AAChB,IAAA,kBAAA;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AACA,IAAW,yBAAyB;CAAC;CAAK,MAAM;CAAqB,MAAM;CAA2B,MAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index64.cts","names":[],"sources":["../src/api/notificationManagement.d.ts"],"sourcesContent":["import type { Fetch, NotificationResponse, NotificationSearchParams } from '../types';\ninterface NotificationContext {\n fetch: Fetch;\n}\nexport declare function getNotifications(context: NotificationContext, params: NotificationSearchParams): Promise<NotificationResponse>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAI,sBAAsB,CAAC,KAAG,MAAA,KAAA;AAC9B,IAAW,mBAAK;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index65.cts","names":[],"sources":["../src/api/platformLogin.d.ts"],"sourcesContent":["import type { ClientCredentials } from '../types';\nexport declare const platformLogin: (client: ClientCredentials) => Promise<{\n token: string;\n tokenExpiration: Date;\n}>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAW,gBAAgB;CAAC;CAAK,MAAM;CAAmB,MAAM;CAAM,MAAK;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index66.cts","names":[],"sources":["../src/api/taxpayerValidation.d.ts"],"sourcesContent":["import type { Fetch, RegistrationType, TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse } from '../types';\ninterface TaxpayerContext {\n fetch: Fetch;\n debug: boolean;\n}\nexport declare function tinSearch(context: TaxpayerContext, params: TinSearchParams): Promise<TinSearchResponse>;\nexport declare function verifyTin(context: TaxpayerContext, tin: string, idType: RegistrationType, idValue: string): Promise<boolean>;\nexport declare function taxpayerQRCode(context: TaxpayerContext, qrCodeText: string): Promise<TaxpayerQRCodeResponse>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAI,kBAAkB,CAAC,KAAG,MAAA,KAAA;AAC1B,IAAW,YAAK;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AAChB,IAAW,YAAO;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AAClB,IAAA,iBAAA;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index67.cts","names":[],"sources":["../src/index.d.ts"],"sourcesContent":["import { DocumentStatus, DocumentSummary, DocumentTypeResponse, DocumentTypesResponse, DocumentTypeVersionResponse, DocumentValidationResult, DocumentValidationStepResult, EInvoiceTypeCode, NotificationResponse, NotificationSearchParams, RegistrationType, StandardError, SubmissionResponse, SubmissionStatus, TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse, AllDocumentsV1_1 } from './types';\nexport type * from './types/index.d.ts';\nexport declare class MyInvoisClient {\n private readonly baseUrl;\n private readonly clientId;\n private readonly clientSecret;\n private readonly environment;\n private onBehalfOf?;\n private readonly signingCredentials;\n private readonly debug;\n private token;\n private tokenExpiration;\n private requestCount;\n constructor(clientId: string, clientSecret: string, environment: 'sandbox' | 'production', certificatePem: string, privateKeyPem: string, onBehalfOf?: string, debug?: boolean);\n updateOnBehalfOf(onBehalfOf: string): Promise<void>;\n private refreshToken;\n private getToken;\n private fetch;\n /**\n * Validates a TIN against a NRIC/ARMY/PASSPORT/BRN (Business Registration Number)\n *\n * This method verifies if a given Tax Identification Number (TIN) is valid by checking it against\n * the provided identification type and value through the MyInvois platform's validation service.\n *\n * @param tin - The TIN to validate\n * @param idType - The type of ID to validate against ('NRIC', 'ARMY', 'PASSPORT', or 'BRN')\n * @param idValue - The value of the ID to validate against\n * @returns Promise resolving to true if the TIN is valid, false otherwise\n *\n * @example\n * ```typescript\n * // Validate TIN against NRIC\n * const isValid = await client.verifyTin('C12345678901234', 'NRIC', '123456789012');\n * if (isValid) {\n * console.log('TIN is valid');\n * }\n *\n * // Validate TIN against Business Registration Number\n * const isValidBusiness = await client.verifyTin('C98765432109876', 'BRN', '123456-K');\n * ```\n *\n * @remarks\n * - Returns false if validation fails due to network errors or invalid credentials\n * - Debug mode provides error logging for troubleshooting validation failures\n * - This is a non-blocking validation that won't throw exceptions on failure\n */\n verifyTin(tin: string, idType: RegistrationType, idValue: string): Promise<boolean>;\n /**\n * Searches for a Tax Identification Number (TIN) using taxpayer information.\n *\n * This method allows searching for a TIN using either a taxpayer name or a combination\n * of identification type and value. The search is flexible and supports multiple\n * identification types including NRIC, ARMY, PASSPORT, and BRN.\n *\n * @param params - Search parameters object\n * @param params.taxpayerName - Optional name of the taxpayer to search for\n * @param params.idType - Optional type of ID to search with (NRIC, ARMY, PASSPORT, BRN)\n * @param params.idValue - Optional value of the ID to search with\n * @returns Promise resolving to TIN search response or standard error\n *\n * @example\n * ```typescript\n * // Search by taxpayer name\n * const result = await client.searchTin({ taxpayerName: 'John Doe' });\n * if ('tin' in result) {\n * console.log('Found TIN:', result.tin);\n * }\n *\n * // Search by ID type and value\n * const result = await client.searchTin({\n * idType: 'NRIC',\n * idValue: '123456789012'\n * });\n * ```\n *\n * @remarks\n * - Either taxpayerName or both idType and idValue must be provided\n * - Returns StandardError object if search criteria are invalid or inconclusive\n * - Debug mode provides detailed error logging for troubleshooting\n * - Search results are not guaranteed to be unique\n */\n searchTin(params: TinSearchParams): Promise<TinSearchResponse>;\n /**\n * Retrieves taxpayer information from a QR code.\n *\n * This method decodes a QR code containing taxpayer information and returns\n * detailed taxpayer data including TIN, name, contact details, and business information.\n *\n * @param qrCodeText - The QR code text to decode\n * @returns Promise resolving to taxpayer QR code response or standard error\n *\n * @example\n * ```typescript\n * // Get taxpayer info from QR code\n * const taxpayerInfo = await client.getTaxpayerQRCode('QR_CODE_TEXT');\n * if ('tin' in taxpayerInfo) {\n * console.log('Taxpayer TIN:', taxpayerInfo.tin);\n * console.log('Business Name:', taxpayerInfo.name);\n * console.log('Address:', taxpayerInfo.addressLine1);\n * }\n * ```\n *\n * @remarks\n * - QR code must be in the correct format specified by MyInvois\n * - Returns StandardError if QR code is invalid or cannot be decoded\n * - Debug mode provides detailed error logging\n */\n getTaxpayerQRCode(qrCodeText: string): Promise<TaxpayerQRCodeResponse>;\n /**\n * Performs an action on a document such as rejection or cancellation.\n *\n * This method allows updating the status of a document to either rejected or cancelled,\n * along with providing a reason for the action. Useful for managing document workflow\n * and maintaining audit trails.\n *\n * @param documentUid - The unique identifier of the document\n * @param status - The new status to set ('rejected' or 'cancelled')\n * @param reason - The reason for the status change (max 300 characters)\n * @returns Promise resolving to document action response containing UUID, status, and any errors\n *\n * @example\n * ```typescript\n * // Reject a document with reason\n * const result = await client.performDocumentAction(\n * 'doc-123',\n * 'rejected',\n * 'Invalid tax calculation'\n * );\n *\n * // Cancel a document\n * const result = await client.performDocumentAction(\n * 'doc-456',\n * 'cancelled',\n * 'Duplicate submission'\n * );\n * ```\n *\n * @remarks\n * - Only valid for documents in appropriate states\n * - Reason is required, max 300 characters\n * - Action is irreversible once completed\n * - Returns error if document cannot be found or action is invalid\n */\n private performDocumentAction;\n /**\n * Cancels a document that was previously submitted.\n *\n * This is a convenience method that wraps performDocumentAction with 'cancelled' status.\n * Documents can only be cancelled within 72 hours of validation.\n *\n * @param documentUid - The unique identifier of the document to cancel\n * @param reason - The reason for cancellation (max 300 characters)\n * @returns Promise resolving to document action response containing UUID, status, and any errors\n *\n * @example\n * ```typescript\n * const result = await client.cancelDocument(\n * 'doc-456',\n * 'Duplicate submission'\n * );\n * if (!result.error) {\n * console.log('Document cancelled:', result.uuid);\n * }\n * ```\n *\n * @remarks\n * - Must be called within 72 hours of document validation\n * - Reason is required, max 300 characters\n * - Action is irreversible once completed\n * - Rate limited to 12 requests per minute\n */\n cancelDocument(documentUid: string, reason: string): Promise<{\n uuid: string;\n status: string;\n error?: StandardError;\n }>;\n /**\n * Rejects a document received from another party.\n *\n * This is a convenience method that wraps performDocumentAction with 'rejected' status.\n * Only documents received from other taxpayers can be rejected.\n *\n * @param documentUid - The unique identifier of the document to reject\n * @param reason - The reason for rejection (max 300 characters)\n * @returns Promise resolving to document action response containing UUID, status, and any errors\n *\n * @example\n * ```typescript\n * const result = await client.rejectDocument(\n * 'doc-123',\n * 'Invalid tax calculation'\n * );\n * if (!result.error) {\n * console.log('Document rejected:', result.uuid);\n * }\n * ```\n *\n * @remarks\n * - Only applicable to received documents\n * - Reason is required, max 300 characters\n * - Action is irreversible once completed\n * - Rate limited to 12 requests per minute\n */\n rejectDocument(documentUid: string, reason: string): Promise<{\n uuid: string;\n status: string;\n error?: StandardError;\n }>;\n /**\n * Submits one or more e-invoice documents to the MyInvois platform for processing.\n *\n * This method digitally signs each document using the provided certificate and private key,\n * generates document hashes, encodes them for submission, and sends them to the platform.\n * The method includes comprehensive validation warnings for document size and count limits.\n *\n * @param documents - Array of InvoiceV1_1 documents to be submitted\n * @returns Promise resolving to submission response containing the submission data and HTTP status\n * @throws {Error} If PRIVATE_KEY or CERTIFICATE environment variables are missing\n * @throws {Error} If document signing, encoding, or API submission fails\n *\n * @example\n * ```typescript\n * // Submit a single invoice\n * const result = await client.submitDocument([invoiceData]);\n * console.log(result.data.submissionUid); // Track submission with this UID\n *\n * // Submit multiple invoices\n * const result = await client.submitDocument([invoice1, invoice2, invoice3]);\n * if (result.status === 202) {\n * console.log('Documents submitted successfully');\n * }\n * ```\n *\n * @remarks\n * - Requires PRIVATE_KEY and CERTIFICATE environment variables for document signing\n * - Each document is digitally signed with XML-DSIG before submission\n * - Documents are base64-encoded for transmission\n * - API limits: Max 100 documents per submission, 5MB total payload, 300KB per document\n * - Debug mode provides detailed logging of payload sizes and validation warnings\n * - Returns HTTP 202 for successful submissions that require processing\n */\n submitDocument(documents: AllDocumentsV1_1[]): Promise<{\n data: SubmissionResponse;\n status: number;\n }>;\n /**\n * Polls the MyInvois platform to get the current status of a document submission.\n *\n * This method continuously checks the submission status until it receives a final result\n * (Valid or Invalid) or reaches the maximum retry limit. It's designed to handle the\n * asynchronous nature of document processing on the MyInvois platform.\n *\n * @param submissionUid - The unique identifier of the submission to check\n * @param pollInterval - Time in milliseconds between status checks (default: 1000ms)\n * @param maxRetries - Maximum number of retry attempts (default: 10)\n * @returns Promise resolving to submission status object with document summary and any errors\n *\n * @example\n * ```typescript\n * // Check submission status with default polling\n * const result = await client.getSubmissionStatus('submission-uid-123');\n * if (result.status === 'Valid') {\n * console.log('All documents processed successfully');\n * console.log('Document summaries:', result.documentSummary);\n * }\n *\n * // Custom polling interval and retry count\n * const result = await client.getSubmissionStatus(\n * 'submission-uid-123',\n * 2000, // Poll every 2 seconds\n * 20 // Try up to 20 times\n * );\n * ```\n *\n * @remarks\n * - Automatically retries on network errors until maxRetries is reached\n * - Returns 'Invalid' status with timeout error if submission processing takes too long\n * - Debug mode provides detailed logging of polling attempts and responses\n * - Use reasonable poll intervals to avoid overwhelming the API\n */\n getSubmissionStatus(submissionUid: string, pollInterval?: number, maxRetries?: number, pageNo?: number, pageSize?: number): Promise<{\n status: SubmissionStatus;\n documentSummary?: DocumentSummary[];\n error?: {\n code: string;\n message: string | null;\n target: string;\n details: {\n code: string;\n message: string;\n target: string;\n }[];\n };\n }>;\n /**\n * Retrieves a document by its unique identifier with the raw document content.\n *\n * @param documentUid - The unique identifier of the document to retrieve\n * @returns Promise resolving to document summary with raw document content as a string\n * @throws {Error} If the document is not found or request fails\n *\n * @example\n * ```typescript\n * const document = await client.getDocument('doc-uuid-123');\n * console.log(document.document); // Raw XML/JSON content\n * console.log(document.uuid); // Document UUID\n * ```\n */\n getDocument(documentUid: string): Promise<DocumentSummary & {\n document: string;\n }>;\n /**\n * Retrieves detailed information about a document including validation results.\n *\n * @param documentUid - The unique identifier of the document to get details for\n * @returns Promise resolving to document summary with detailed validation results\n * @throws {Error} If the document is not found or request fails\n *\n * @example\n * ```typescript\n * const details = await client.getDocumentDetails('doc-uuid-123');\n * console.log(details.validationResults.status); // 'Valid' | 'Invalid' | 'Processing'\n * console.log(details.validationResults.validationSteps); // Array of validation step results\n * ```\n */\n getDocumentDetails(documentUid: string): Promise<DocumentSummary & {\n validationResults: {\n status: DocumentValidationResult;\n validationSteps: DocumentValidationStepResult[];\n };\n }>;\n /**\n * Searches for documents based on various filter criteria.\n *\n * @param params - Search parameters object\n * @param params.uuid - Optional specific document UUID to search for\n * @param params.submissionDateFrom - Required start date for submission date range (ISO date string)\n * @param params.submissionDateTo - Optional end date for submission date range (ISO date string)\n * @param params.pageSize - Optional number of results per page (default handled by API)\n * @param params.pageNo - Optional page number for pagination (0-based)\n * @param params.issueDateFrom - Optional start date for issue date range (ISO date string)\n * @param params.issueDateTo - Optional end date for issue date range (ISO date string)\n * @param params.invoiceDirection - Optional filter by invoice direction ('Sent' or 'Received')\n * @param params.status - Optional filter by document status\n * @param params.documentType - Optional filter by e-invoice type code\n * @param params.searchQuery - Optional text search across uuid, buyerTIN, supplierTIN, buyerName, supplierName, internalID, total\n * @returns Promise resolving to array of document summaries matching the search criteria\n * @throws {Error} If the search request fails\n *\n * @example\n * ```typescript\n * // Search for documents submitted in the last 30 days\n * const documents = await client.searchDocuments({\n * submissionDateFrom: '2024-01-01',\n * submissionDateTo: '2024-01-31',\n * status: 'Valid',\n * pageSize: 10\n * });\n *\n * // Search by supplier name\n * const supplierDocs = await client.searchDocuments({\n * submissionDateFrom: '2024-01-01',\n * searchQuery: 'ACME Corp',\n * invoiceDirection: 'Received'\n * });\n * ```\n */\n searchDocuments({ uuid, submissionDateFrom, submissionDateTo, pageSize, pageNo, issueDateFrom, issueDateTo, invoiceDirection, status, documentType, searchQuery, }: {\n uuid?: string;\n submissionDateFrom: string;\n submissionDateTo?: string;\n pageSize?: number;\n pageNo?: number;\n issueDateFrom?: string;\n issueDateTo?: string;\n invoiceDirection?: 'Sent' | 'Received';\n status?: DocumentStatus;\n documentType?: EInvoiceTypeCode;\n searchQuery?: string;\n }): Promise<DocumentSummary[]>;\n /**\n * Retrieves notifications from the MyInvois platform based on specified search criteria.\n *\n * This method allows you to search for system notifications, alerts, and messages\n * sent by the MyInvois platform regarding document processing, system updates,\n * or account-related information.\n *\n * @param params - Search parameters object for filtering notifications\n * @param params.dateFrom - Optional start date for notification date range (ISO date string)\n * @param params.dateTo - Optional end date for notification date range (ISO date string)\n * @param params.type - Optional notification type filter\n * @param params.language - Optional language preference for notifications\n * @param params.status - Optional notification status filter\n * @param params.pageNo - Optional page number for pagination (0-based)\n * @param params.pageSize - Optional number of results per page\n * @returns Promise resolving to notification response object or standard error\n *\n * @example\n * ```typescript\n * // Get all notifications from the last 7 days\n * const notifications = await client.getNotifications({\n * dateFrom: '2024-01-01',\n * dateTo: '2024-01-07',\n * pageSize: 20\n * });\n *\n * // Get unread notifications only\n * const unreadNotifications = await client.getNotifications({\n * status: 0, // Assuming 0 = unread\n * language: 'en'\n * });\n *\n * // Paginated notification retrieval\n * const firstPage = await client.getNotifications({\n * dateFrom: '2024-01-01',\n * pageNo: 0,\n * pageSize: 10\n * });\n * ```\n *\n * @remarks\n * - All parameters are optional, allowing flexible filtering\n * - Returns paginated results when pageNo and pageSize are specified\n * - Date parameters should be in ISO format (YYYY-MM-DD)\n * - May return StandardError object if the request fails\n */\n getNotifications({ dateFrom, dateTo, type, language, status, pageNo, pageSize, }: NotificationSearchParams): Promise<NotificationResponse>;\n getDocumentTypes(): Promise<DocumentTypesResponse>;\n /**\n * Retrieves detailed information about a specific document type from the MyInvois platform.\n *\n * This method fetches metadata and configuration details for a specific document type,\n * including supported versions, validation rules, and structural requirements.\n * Useful for understanding document format requirements before submission.\n *\n * @param id - The unique identifier of the document type to retrieve\n * @returns Promise resolving to document type response object or standard error\n *\n * @example\n * ```typescript\n * // Get details for e-invoice document type\n * const invoiceType = await client.getDocumentType(1);\n * if ('id' in invoiceType) {\n * console.log('Document type name:', invoiceType.name);\n * console.log('Available versions:', invoiceType.versionNumber);\n * console.log('Description:', invoiceType.description);\n * }\n *\n * // Handle potential errors\n * const documentType = await client.getDocumentType(999);\n * if ('error' in documentType) {\n * console.error('Failed to retrieve document type:', documentType.error.message);\n * }\n * ```\n *\n * @remarks\n * - Returns StandardError object if the document type ID doesn't exist\n * - Document type information includes validation schemas and business rules\n * - Use this method to discover supported document formats and versions\n * - Essential for understanding submission requirements for different document types\n */\n getDocumentType(id: number): Promise<DocumentTypeResponse>;\n /**\n * Generates a shareable QR code URL for a specific document.\n *\n * This method retrieves the document details using its unique identifier,\n * then constructs a URL that can be used to access or share the document\n * via the MyInvois platform. The URL format differs between sandbox and\n * production environments.\n *\n * @param documentUid - The unique identifier of the document\n * @returns Promise resolving to a string containing the QR code URL\n *\n * @example\n * ```typescript\n * const qrCodeUrl = await client.getDocumentQrCode('abc123');\n * console.log('Shareable QR code URL:', qrCodeUrl);\n * // Output (sandbox): https://preprod.myinvois.hasil.gov.my/abc123/share/longId\n * // Output (production): https://myinvois.hasil.gov.my/abc123/share/longId\n * ```\n *\n * @remarks\n * - The returned URL can be embedded in a QR code for document sharing.\n * - The method fetches the document to obtain its longId, which is required for the URL.\n * - Ensure the documentUid is valid and accessible by the current client.\n */\n getDocumentQrCode(documentUid: string, longId?: string): Promise<string | null>;\n /**\n * Retrieves detailed information about a specific version of a document type.\n *\n * This method fetches version-specific metadata, schema definitions, and validation rules\n * for a particular document type version. Essential for understanding the exact format\n * and requirements for document submission in a specific version.\n *\n * @param id - The unique identifier of the document type\n * @param versionId - The unique identifier of the specific version to retrieve\n * @returns Promise resolving to document type version response object or standard error\n *\n * @example\n * ```typescript\n * // Get specific version details for e-invoice\n * const invoiceV1_1 = await client.getDocumentTypeVersion(1, 1);\n * if ('id' in invoiceV1_1) {\n * console.log('Version number:', invoiceV1_1.versionNumber);\n * console.log('Schema:', invoiceV1_1.jsonSchema);\n * console.log('Status:', invoiceV1_1.status);\n * }\n *\n * // Compare different versions\n * const [v1_0, v1_1] = await Promise.all([\n * client.getDocumentTypeVersion(1, 0),\n * client.getDocumentTypeVersion(1, 1)\n * ]);\n *\n * // Handle version not found\n * const result = await client.getDocumentTypeVersion(1, 999);\n * if ('error' in result) {\n * console.error('Version not found:', result.error.message);\n * }\n * ```\n *\n * @remarks\n * - Returns StandardError object if document type ID or version ID doesn't exist\n * - Version information includes JSON schema for validation\n * - Different versions may have different validation rules and field requirements\n * - Use this to ensure your documents conform to the specific version requirements\n * - Version status indicates if the version is active, deprecated, or under development\n */\n getDocumentTypeVersion(id: number, versionId: number): Promise<DocumentTypeVersionResponse>;\n static fromP12(clientId: string, clientSecret: string, environment: 'sandbox' | 'production', p12Input: Buffer | string, passphrase: string, onBehalfOf?: string, debug?: boolean): MyInvoisClient;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAW,iBAAiB;CAAC;CAAK,MAAE;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index68.cts","names":[],"sources":["../src/utils/apiQueue.d.ts"],"sourcesContent":["export type ApiCategory = 'loginTaxpayer' | 'loginIntermediary' | 'submitDocuments' | 'getSubmission' | 'cancelDocument' | 'rejectDocument' | 'getDocument' | 'getDocumentDetails' | 'getRecentDocuments' | 'searchDocuments' | 'searchTin' | 'taxpayerQr' | 'default';\ntype Task<T> = () => Promise<T>;\n/**\n * Public helper to schedule a request according to the category's limits.\n * Rate limits are enforced per clientId, so multiple instances with the same\n * clientId will share rate limiters, while different clientIds get separate limiters.\n *\n * This implementation uses a sliding window to track all requests within the time window.\n */\nexport declare function queueRequest<T>(clientId: string, category: ApiCategory, task: Task<T>, debug?: boolean): Promise<T>;\n/**\n * Cleanup function to clear all queues and timers for a specific client.\n * Useful for testing or cleanup on application shutdown.\n */\nexport declare function clearQueue(clientId: string, category?: ApiCategory): void;\n/**\n * Very naive path-based category detection. If no matcher fits, the `default` category\n * (effectively unlimited) is returned. Adjust these heuristics as your API surface evolves.\n */\nexport declare function categorizeRequest(path: string, method?: string): ApiCategory;\nexport {};\n"],"mappings":";AAAA,IAAW,cAAc,CAAC,GAAI;AAC9B,IAAI,OAAO;CAAC;CAAK,MAAM;CAAG,MAAK;AAAA;AAC/B,IAAE,eAAA;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AACF,IAAW,aAAa,CAAC,KAAK,MAAM,WAAY;AAChD,IAAW,oBAAoB,CAAC,KAAK,MAAM,WAAY"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index69.cts","names":[],"sources":["../src/utils/base64.d.ts"],"sourcesContent":["export declare function encodeToBase64(content: string): string;\nexport declare function decodeFromBase64(content: string): string;\n"],"mappings":";AAAA,IAAW,iBAAiB,CAAC,GAAI;AACjC,IAAW,mBAAmB,CAAC,GAAI"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index70.cts","names":[],"sources":["../src/utils/certificate.d.ts"],"sourcesContent":["/**\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 declare const extractCertificateInfo: (certificatePem: string) => {\n issuerName: string;\n serialNumber: string;\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 declare const validateKeyPair: (certificatePem: string, privateKeyPem: string) => boolean;\nexport declare const getPemFromP12: (p12Input: Buffer | string, passphrase: string) => {\n certificatePem: string;\n privateKeyPem: string;\n};\n"],"mappings":";AAAA,IAAE,yBAAA,CAAA,GAAA;AACF,IAAW,kBAAkB,CAAC,GAAI;AAClC,IAAW,gBAAgB,CAAC,KAAK,MAAM,MAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index71.cts","names":[],"sources":["../src/utils/document.d.ts"],"sourcesContent":["import { InvoiceSubmission, AllDocumentsV1_1, SigningCredentials, SignedPropertiesObject, UBLDocument, CompleteInvoice, SignedInfoObject, UnitTypeCode, InvoiceLineItem } from '../types';\nimport type { ClassificationCode } from '../types';\nimport type { TaxTypeCode } from '../types';\n/**\n * MyInvois v1.1 Document Generation and Signing Utilities\n * Strictly follows: https://sdk.myinvois.hasil.gov.my/documents/invoice-v1-1\n * JSON Signature Guide: https://sdk.myinvois.hasil.gov.my/signature-creation-json/\n */\n/**\n * Determines if a line item uses fixed rate taxation\n */\nexport declare const isFixedRateTax: (item: InvoiceLineItem) => boolean;\n/**\n * Determines if a line item uses percentage taxation\n */\nexport declare const isPercentageTax: (item: InvoiceLineItem) => boolean;\n/**\n * Calculates expected tax amount for a line item based on its tax type\n */\nexport declare const calculateExpectedTaxAmount: (item: InvoiceLineItem) => number;\n/**\n * Helper function to recursively sort object keys for JSON canonicalization\n */\nexport declare function sortObjectKeys(obj: unknown): unknown;\n/**\n * Enhanced canonicalization following MyInvois specification exactly\n * Key changes: ensure consistent ordering and formatting\n */\nexport declare const canonicalizeJSON: (obj: unknown) => string;\n/**\n * Generates a clean invoice object following MyInvois v1.1 specification exactly\n * This is the base invoice structure WITHOUT signature elements (for hash calculation)\n *\n * Key requirements from working documents:\n * - All mandatory fields must be present\n * - Many optional fields must be present even if empty\n * - Specific field ordering and structure\n * - Correct listID values (e.g., \"3166-1\" not \"ISO3166-1\")\n */\nexport declare const generateCleanInvoiceObject: (invoice: AllDocumentsV1_1) => InvoiceSubmission;\n/**\n * Generates the complete UBL document structure with namespace declarations\n */\nexport declare const generateCleanUBLDocument: (invoices: AllDocumentsV1_1[]) => UBLDocument;\n/**\n * Step 1: Transform the document for hashing or transmission\n * Removes UBLExtensions and Signature, and minifies the JSON\n * Returns the minified, cleaned JSON string\n *\n * FIXED: Use regex-based minification to match PowerShell script exactly\n */\nexport declare const transformDocumentForHashing: (invoices: AllDocumentsV1_1[]) => string;\n/**\n * Step 2: Calculate Document Digest\n * FIXED: Remove UBLExtensions and Signature before hashing (DS322)\n * Based on working implementation pattern\n */\nexport declare const calculateDocumentDigest: (invoices: AllDocumentsV1_1[]) => string;\n/**\n * Step 4: Calculate Certificate Digest\n * Enhanced to handle certificate content properly\n * FIXED: Match PowerShell script exactly - use raw certificate data like $cert.RawData\n */\nexport declare const calculateCertificateDigest: (certificatePem: string) => string;\n/**\n * Enhanced certificate info extraction with better error handling\n * FIXED: Normalize issuer name format to match MyInvois expectations (DS326)\n */\nexport declare const extractCertificateInfo: (certificatePem: string) => {\n issuerName: string;\n serialNumber: string;\n subjectName: string;\n};\n/**\n * Step 5: Create SignedProperties with enhanced structure\n * FIXED: Simplified structure to match MyInvois expectations (DS320)\n * Following MyInvois JSON signature specification exactly\n */\nexport declare const createSignedProperties: (certificateDigest: string, signingTime: string, issuerName: string, serialNumber: string) => SignedPropertiesObject;\n/**\n * Step 6: Calculate SignedProperties Digest\n * Calculates the digest over the correct structure for validator compliance.\n * FIXED: Calculate digest from SignedProperties only (without Target wrapper)\n */\nexport declare const calculateSignedPropertiesDigest: (signedProperties: SignedPropertiesObject, useTargetWrapper?: boolean) => string;\n/**\n * Step 3: Create SignedInfo and calculate signature\n * Enhanced with better structure and signature generation\n */\nexport declare const createSignedInfoAndSign: (docDigest: string, propsDigest: string, privateKeyPem: string) => {\n signedInfo: SignedInfoObject;\n signatureValue: string;\n};\n/**\n * Signs the minified document string using the provided private key PEM\n * Returns the signature as a base64 string\n * FIXED: Match PowerShell script exactly - first compute hash, then sign the hash\n */\nexport declare const signDocumentString: (documentString: string, privateKeyPem: string) => string;\n/**\n * Complete document generation with signatures\n * Follows the complete MyInvois JSON signature creation process (Steps 1-7)\n */\nexport declare const generateCompleteDocument: (invoices: AllDocumentsV1_1[], signingCredentials: SigningCredentials) => CompleteInvoice;\n/**\n * Creates a line item with percentage-based taxation (e.g., SST, GST)\n */\nexport declare const createPercentageTaxLineItem: (params: {\n itemClassificationCode: ClassificationCode;\n itemDescription: string;\n unitPrice: number;\n quantity?: number;\n measurement?: string;\n taxType: TaxTypeCode;\n taxRate: number;\n totalTaxableAmountPerLine?: number;\n discountAmount?: number;\n discountRate?: number;\n}) => InvoiceLineItem;\n/**\n * Creates a line item with fixed rate taxation (e.g., Tourism Tax)\n */\nexport declare const createFixedRateTaxLineItem: (params: {\n itemClassificationCode: ClassificationCode;\n itemDescription: string;\n unitPrice: number;\n quantity?: number;\n measurement?: string;\n taxType: TaxTypeCode;\n taxPerUnitAmount: number;\n baseUnitMeasure: number;\n baseUnitMeasureCode: UnitTypeCode;\n totalTaxableAmountPerLine?: number;\n discountAmount?: number;\n discountRate?: number;\n}) => InvoiceLineItem;\n/**\n * Calculates invoice totals from line items\n */\nexport declare const calculateInvoiceTotals: (lineItems: InvoiceLineItem[], payableRoundingAmount?: number) => {\n legalMonetaryTotal: {\n taxExclusiveAmount: number;\n taxInclusiveAmount: number;\n payableRoundingAmount: number;\n payableAmount: number;\n };\n taxTotal: {\n taxAmount: number;\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAE,iBAAA,CAAA,KAAA,MAAA,eAAA;AACF,IAAW,kBAAkB,CAAC,KAAK,MAAM,eAAgB;AACzD,IAAW,6BAA6B,CAAC,KAAK,MAAM,eAAgB;AACpE,IAAW,iBAAiB,CAAC,GAAI;AACjC,IAAE,mBAAA,CAAA,GAAA;AACF,IAAE,6BAAA;CAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AACF,IAAW,2BAA2B;CAAC;CAAK,MAAM;CAAE,MAAA;AAAA;AACpD,IAAE,8BAAA,CAAA,KAAA,MAAA,gBAAA;AACF,IAAW,0BAA0B,CAAC,KAAK,MAAM,gBAAiB;AAClE,IAAE,6BAAA,CAAA,GAAA;AACF,IAAW,yBAAyB,CAAC,GAAI;AACzC,IAAE,yBAAA,CAAA,KAAA,MAAA,sBAAA;AACF,IAAW,kCAAkC,CAAC,KAAK,MAAM,sBAAe;AACxE,IAAE,0BAAA,CAAA,KAAA,MAAA,gBAAA;AACF,IAAW,qBAAqB,CAAC,GAAI;AACrC,IAAE,2BAAA;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AACF,IAAW,8BAA8B;CAAC;CAAK,MAAM;CAAoB,MAAM;CAAG,MAAA;AAAA;AAClF,IAAE,6BAAA;CAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AACF,IAAW,yBAAyB,CAAC,KAAK,MAAM,eAAgB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index72.cts","names":[],"sources":["../src/utils/formatIdValue.d.ts"],"sourcesContent":["export declare function formatIdValue(idValue: string): string;\n"],"mappings":";AAAA,IAAW,gBAAgB,CAAC,GAAI"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index73.cts","names":[],"sources":["../src/utils/getBaseUrl.d.ts"],"sourcesContent":["export declare const getBaseUrl: (environment: \"sandbox\" | \"production\") => string;\n"],"mappings":";AAAA,IAAW,aAAa,CAAC,GAAI"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index74.cts","names":[],"sources":["../src/utils/signature-diagnostics.d.ts"],"sourcesContent":["import type { InvoiceV1_1 } from '../types';\nexport interface CertificateAnalysisResult {\n organizationIdentifier?: string;\n serialNumber?: string;\n issuerName: string;\n subjectName: string;\n issues: string[];\n recommendations: string[];\n}\nexport interface SignatureAnalysisResult {\n documentDigest: string;\n certificateDigest: string;\n signedPropertiesDigest: string;\n issues: string[];\n recommendations: string[];\n}\nexport interface DiagnosticResult {\n certificateAnalysis: CertificateAnalysisResult;\n signatureAnalysis: SignatureAnalysisResult;\n summary: {\n totalIssues: number;\n certificateIssues: number;\n signatureIssues: number;\n };\n}\n/**\n * Comprehensive signature diagnostics\n */\nexport declare function diagnoseSignatureIssues(invoices: InvoiceV1_1[], certificatePem: string): DiagnosticResult;\n/**\n * Prints diagnostic results in a formatted way\n */\nexport declare function printDiagnostics(result: DiagnosticResult): void;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAW,4BAA4B,CAAC,GAAG;AAC3C,IAAW,0BAAwB,CAAA,GAAA;AACnC,IAAW,mBAAc;CAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AACzB,IAAW,0BAAW;CAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AACtB,IAAW,mBAAY,CAAA,KAAA,MAAA,gBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index75.cts","names":[],"sources":["../src/utils/validation.d.ts"],"sourcesContent":["import type { InvoiceV1_1, InvoiceLineItem } from '../types';\n/**\n * MyInvois Invoice Validation Utilities\n *\n * Provides comprehensive validation for invoice data before document generation\n * and submission to ensure compliance with MyInvois business rules and format requirements.\n */\nexport interface ValidationResult {\n isValid: boolean;\n errors: ValidationError[];\n warnings: ValidationWarning[];\n}\nexport interface ValidationError {\n field: string;\n code: string;\n message: string;\n severity: 'error' | 'warning';\n}\nexport interface ValidationWarning extends ValidationError {\n severity: 'warning';\n}\n/**\n * Validates TIN format based on registration type\n */\nexport declare const validateTIN: (tin: string, registrationType?: string) => ValidationError[];\n/**\n * Validates contact number format (E.164 standard)\n */\nexport declare const validateContactNumber: (contactNumber: string) => ValidationError[];\n/**\n * Validates monetary amounts\n */\nexport declare const validateMonetaryAmount: (amount: number, fieldName: string, maxDigits?: number, maxDecimals?: number) => ValidationError[];\n/**\n * Validates line item tax calculation consistency for both fixed rate and percentage taxation\n */\nexport declare const validateLineItemTax: (item: InvoiceLineItem, index: number) => ValidationError[];\n/**\n * Validates tax calculation consistency\n */\nexport declare const validateTaxCalculations: (invoice: InvoiceV1_1) => ValidationError[];\n/**\n * Main validation function for complete invoice\n */\nexport declare const validateInvoice: (invoice: InvoiceV1_1) => ValidationResult;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAE,mBAAA;CAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AACF,IAAW,kBAAkB,CAAC,GAAI;AAClC,IAAC,oBAAA,CAAA,KAAA,MAAA,eAAA;AACD,IAAW,cAAc,CAAC,KAAK,MAAM,eAAgB;AACrD,IAAW,wBAAwB,CAAC,KAAK,MAAM,eAAgB;AAC/D,IAAE,yBAAA,CAAA,KAAA,MAAA,eAAA;AACF,IAAW,sBAAsB;CAAC;CAAA,MAAA;CAAA,MAAA;AAAA;AAClC,IAAW,0BAAS;CAAA;CAAA,MAAA;CAAA,MAAA;AAAA;AACpB,IAAW,kBAAkB;CAAA;CAAA,MAAA;CAAA,MAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index8.cjs","names":[],"sources":["../src/types/classification-codes.d.ts"],"sourcesContent":["/**\n * Represents the allowed classification codes for e-Invoice items.\n * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/classification-codes/\n */\nexport type ClassificationCode =\n | '001' // Breastfeeding equipment\n | '002' // Child care centres and kindergartens fees\n | '003' // Computer, smartphone or tablet\n | '004' // Consolidated e-Invoice\n | '005' // Construction materials (as specified under Fourth Schedule of the Lembaga Pembangunan Industri Pembinaan Malaysia Act 1994)\n | '006' // Disbursement\n | '007' // Donation\n | '008' // e-Commerce - e-Invoice to buyer / purchaser\n | '009' // e-Commerce - Self-billed e-Invoice to seller, logistics, etc.\n | '010' // Education fees\n | '011' // Goods on consignment (Consignor)\n | '012' // Goods on consignment (Consignee)\n | '013' // Gym membership\n | '014' // Insurance - Education and medical benefits\n | '015' // Insurance - Takaful or life insurance\n | '016' // Interest and financing expenses\n | '017' // Internet subscription\n | '018' // Land and building\n | '019' // Medical examination for learning disabilities and early intervention or rehabilitation treatments of learning disabilities\n | '020' // Medical examination or vaccination expenses\n | '021' // Medical expenses for serious diseases\n | '022' // Others\n | '023' // Petroleum operations (as defined in Petroleum (Income Tax) Act 1967)\n | '024' // Private retirement scheme or deferred annuity scheme\n | '025' // Motor vehicle\n | '026' // Subscription of books / journals / magazines / newspapers / other similar publications\n | '027' // Reimbursement\n | '028' // Rental of motor vehicle\n | '029' // EV charging facilities (Installation, rental, sale / purchase or subscription fees)\n | '030' // Repair and maintenance\n | '031' // Research and development\n | '032' // Foreign income\n | '033' // Self-billed - Betting and gaming\n | '034' // Self-billed - Importation of goods\n | '035' // Self-billed - Importation of services\n | '036' // Self-billed - Others\n | '037' // Self-billed - Monetary payment to agents, dealers or distributors\n | '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\n | '039' // Supporting equipment for disabled person\n | '040' // Voluntary contribution to approved provident fund\n | '041' // Dental examination or treatment\n | '042' // Fertility treatment\n | '043' // Treatment and home care nursing, daycare centres and residential care centers\n | '044' // Vouchers, gift cards, loyalty points, etc\n | '045' // Self-billed - Non-monetary payment to agents, dealers or distributors\n\n/**\n * Enum representing the allowed classification codes with descriptive names.\n * Provides a more readable way to reference classification codes.\n *\n * @example\n * const code = ClassificationCodeEnum.ComputerSmartphoneOrTablet;\n * console.log(code); // Output: \"003\"\n */\nexport enum ClassificationCodeEnum {\n BreastfeedingEquipment = '001',\n ChildCareCentresAndKindergartensFees = '002',\n ComputerSmartphoneOrTablet = '003',\n ConsolidatedEInvoice = '004',\n ConstructionMaterials = '005',\n Disbursement = '006',\n Donation = '007',\n ECommerceEInvoiceToBuyer = '008',\n ECommerceSelfBilledToSellerLogistics = '009',\n EducationFees = '010',\n GoodsOnConsignmentConsignor = '011',\n GoodsOnConsignmentConsignee = '012',\n GymMembership = '013',\n InsuranceEducationMedicalBenefits = '014',\n InsuranceTakafulLife = '015',\n InterestFinancingExpenses = '016',\n InternetSubscription = '017',\n LandAndBuilding = '018',\n MedicalExamLearningDisabilities = '019',\n MedicalExamVaccination = '020',\n MedicalExpensesSeriousDiseases = '021',\n Others = '022',\n PetroleumOperations = '023',\n PrivateRetirementSchemeDeferredAnnuity = '024',\n MotorVehicle = '025',\n SubscriptionBooksJournalsEtc = '026',\n Reimbursement = '027',\n RentalOfMotorVehicle = '028',\n EVChargingFacilities = '029',\n RepairAndMaintenance = '030',\n ResearchAndDevelopment = '031',\n ForeignIncome = '032',\n SelfBilledBettingGaming = '033',\n SelfBilledImportationGoods = '034',\n SelfBilledImportationServices = '035',\n SelfBilledOthers = '036',\n SelfBilledMonetaryPaymentToAgents = '037',\n SportsEquipmentRentalFeesEtc = '038',\n SupportingEquipmentDisabledPerson = '039',\n VoluntaryContributionProvidentFund = '040',\n DentalExamTreatment = '041',\n FertilityTreatment = '042',\n TreatmentHomeCareNursingEtc = '043',\n VouchersGiftCardsLoyaltyPoints = '044',\n SelfBilledNonMonetaryPaymentToAgents = '045',\n}\n\n/**\n * Interface representing a classification code entry.\n * Contains the code and its corresponding description.\n */\nexport interface Classification {\n code: ClassificationCode\n description: string\n}\n"],"mappings":";;;;;;;;;;AA2DA,IAAY,4EAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACD"}
@@ -1,26 +0,0 @@
1
- import { MSIC_0X_CODE } from "./0X-Cr3M7hci.cjs";
2
- import { MSIC_1X_CODE } from "./1X-CWwmfCzo.cjs";
3
- import { MSIC_2X_CODE } from "./2X-DNtkJ0tj.cjs";
4
- import { MSIC_3X_CODE } from "./3X-BOxfatu3.cjs";
5
- import { MSIC_4X_CODE } from "./4X-C7fzDWJ_.cjs";
6
- import { MSIC_5X_CODE } from "./5X-CNAFsDm2.cjs";
7
- import { MSIC_6X_CODE } from "./6X-uObUP4VG.cjs";
8
- import { MSIC_7X_CODE } from "./7X-BifJnY24.cjs";
9
- import { MSIC_8X_CODE } from "./8X-DioBXCJ0.cjs";
10
- import { MSIC_9X_CODE } from "./9X-BjffnXuq.cjs";
11
-
12
- //#region src/types/msic-codes.d.ts
13
-
14
- /**
15
- * Represents the allowed 5-digit Malaysia Standard Industrial Classification (MSIC) codes.
16
- * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/msic-codes/
17
- * Interface representing an MSIC code entry.
18
- * Contains the 5-digit code and its description.
19
- */
20
- interface MSICCode {
21
- code: MSIC_0X_CODE | MSIC_1X_CODE | MSIC_2X_CODE | MSIC_3X_CODE | MSIC_4X_CODE | MSIC_5X_CODE | MSIC_6X_CODE | MSIC_7X_CODE | MSIC_8X_CODE | MSIC_9X_CODE;
22
- description: string;
23
- }
24
- //#endregion
25
- export { MSICCode };
26
- //# sourceMappingURL=msic-codes-CIKdPqag.d.cts.map
@@ -1,25 +0,0 @@
1
- import { MSIC_0X_CODE } from "./0X-qj3c_vAo.js";
2
- import { MSIC_1X_CODE } from "./1X-B-lyAVC4.js";
3
- import { MSIC_2X_CODE } from "./2X-BfCK614i.js";
4
- import { MSIC_3X_CODE } from "./3X-Du10Ix_V.js";
5
- import { MSIC_4X_CODE } from "./4X-x3cRFuSM.js";
6
- import { MSIC_5X_CODE } from "./5X-B52AKeTz.js";
7
- import { MSIC_6X_CODE } from "./6X-DBwpWPQ6.js";
8
- import { MSIC_7X_CODE } from "./7X-C_XGDSpE.js";
9
- import { MSIC_8X_CODE } from "./8X-Di_0wuRX.js";
10
- import { MSIC_9X_CODE } from "./9X-8ZnvvViY.js";
11
-
12
- //#region src/types/msic-codes.d.ts
13
-
14
- /**
15
- * Represents the allowed 5-digit Malaysia Standard Industrial Classification (MSIC) codes.
16
- * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/msic-codes/
17
- * Interface representing an MSIC code entry.
18
- * Contains the 5-digit code and its description.
19
- */
20
- interface MSICCode {
21
- code: MSIC_0X_CODE | MSIC_1X_CODE | MSIC_2X_CODE | MSIC_3X_CODE | MSIC_4X_CODE | MSIC_5X_CODE | MSIC_6X_CODE | MSIC_7X_CODE | MSIC_8X_CODE | MSIC_9X_CODE;
22
- description: string;
23
- }
24
- //#endregion
25
- export { MSICCode };
@@ -1,19 +0,0 @@
1
- //#region src/api/notificationManagement.ts
2
- async function getNotifications(context, params) {
3
- const { fetch } = context;
4
- const { dateFrom, dateTo, type, language, status, pageNo, pageSize } = params;
5
- const queryParams = new URLSearchParams();
6
- if (dateFrom) queryParams.set("dateFrom", dateFrom);
7
- if (dateTo) queryParams.set("dateTo", dateTo);
8
- if (type) queryParams.set("type", type.toString());
9
- if (language) queryParams.set("language", language);
10
- if (status) queryParams.set("status", status.toString());
11
- if (pageNo) queryParams.set("pageNo", pageNo.toString());
12
- if (pageSize) queryParams.set("pageSize", pageSize.toString());
13
- const response = await fetch(`/api/v1.0/notifications/taxpayer?${queryParams.toString()}`);
14
- const data = await response.json();
15
- return data;
16
- }
17
-
18
- //#endregion
19
- export { getNotifications };
@@ -1,63 +0,0 @@
1
- //#region src/types/notifications.d.ts
2
- type NotificationType = 3 | 6 | 7 | 8 | 10 | 11 | 15 | 26 | 33 | 34 | 35;
3
- declare enum NotificationTypeEnum {
4
- 'Profile data validation' = 3,
5
- 'Document received' = 6,
6
- 'Document validated' = 7,
7
- 'Document cancelled' = 8,
8
- 'User profile changed' = 10,
9
- 'Taxpayer profile changed' = 11,
10
- 'Document rejection initiated' = 15,
11
- 'ERP data validation' = 26,
12
- 'Documents processing summary' = 33,
13
- 'Document Template Published' = 34,
14
- 'Document Template Deletion' = 35,
15
- }
16
- type NotificationStatus = 1 | 2 | 3 | 4 | 5;
17
- declare enum NotificationStatusEnum {
18
- 'New' = 1,
19
- 'Pending' = 2,
20
- 'Batched' = 3,
21
- 'Delivered' = 4,
22
- 'Error' = 5,
23
- }
24
- type NotificationDeliveryAttempt = {
25
- attemptDateTime: string;
26
- status: string;
27
- statusDetails: string;
28
- };
29
- type NotificationMetadata = {
30
- hasNext: boolean;
31
- };
32
- type Notification = {
33
- notificationId: string;
34
- receiverNName: string;
35
- notificationDeliveryId: string;
36
- creationDateTime: string;
37
- receivedDateTime: string;
38
- notificationSubject: string;
39
- deliveredDateTime: string;
40
- typeId: string;
41
- typeName: string;
42
- finalMessage: string;
43
- address: string;
44
- language: string;
45
- status: string;
46
- deliveryAttempts: NotificationDeliveryAttempt[];
47
- };
48
- type NotificationResponse = {
49
- notifications: Notification[];
50
- metadata: NotificationMetadata;
51
- };
52
- type NotificationSearchParams = {
53
- dateFrom?: string;
54
- dateTo?: string;
55
- type?: NotificationType;
56
- language?: string;
57
- status?: NotificationStatus;
58
- pageNo?: number;
59
- pageSize?: number;
60
- };
61
- //#endregion
62
- export { Notification, NotificationDeliveryAttempt, NotificationMetadata, NotificationResponse, NotificationSearchParams, NotificationStatus, NotificationStatusEnum, NotificationType, NotificationTypeEnum };
63
- //# sourceMappingURL=notifications-DdlEkprb.d.cts.map
@@ -1,62 +0,0 @@
1
- //#region src/types/notifications.d.ts
2
- type NotificationType = 3 | 6 | 7 | 8 | 10 | 11 | 15 | 26 | 33 | 34 | 35;
3
- declare enum NotificationTypeEnum {
4
- 'Profile data validation' = 3,
5
- 'Document received' = 6,
6
- 'Document validated' = 7,
7
- 'Document cancelled' = 8,
8
- 'User profile changed' = 10,
9
- 'Taxpayer profile changed' = 11,
10
- 'Document rejection initiated' = 15,
11
- 'ERP data validation' = 26,
12
- 'Documents processing summary' = 33,
13
- 'Document Template Published' = 34,
14
- 'Document Template Deletion' = 35,
15
- }
16
- type NotificationStatus = 1 | 2 | 3 | 4 | 5;
17
- declare enum NotificationStatusEnum {
18
- 'New' = 1,
19
- 'Pending' = 2,
20
- 'Batched' = 3,
21
- 'Delivered' = 4,
22
- 'Error' = 5,
23
- }
24
- type NotificationDeliveryAttempt = {
25
- attemptDateTime: string;
26
- status: string;
27
- statusDetails: string;
28
- };
29
- type NotificationMetadata = {
30
- hasNext: boolean;
31
- };
32
- type Notification = {
33
- notificationId: string;
34
- receiverNName: string;
35
- notificationDeliveryId: string;
36
- creationDateTime: string;
37
- receivedDateTime: string;
38
- notificationSubject: string;
39
- deliveredDateTime: string;
40
- typeId: string;
41
- typeName: string;
42
- finalMessage: string;
43
- address: string;
44
- language: string;
45
- status: string;
46
- deliveryAttempts: NotificationDeliveryAttempt[];
47
- };
48
- type NotificationResponse = {
49
- notifications: Notification[];
50
- metadata: NotificationMetadata;
51
- };
52
- type NotificationSearchParams = {
53
- dateFrom?: string;
54
- dateTo?: string;
55
- type?: NotificationType;
56
- language?: string;
57
- status?: NotificationStatus;
58
- pageNo?: number;
59
- pageSize?: number;
60
- };
61
- //#endregion
62
- export { Notification, NotificationDeliveryAttempt, NotificationMetadata, NotificationResponse, NotificationSearchParams, NotificationStatus, NotificationStatusEnum, NotificationType, NotificationTypeEnum };
@@ -1,44 +0,0 @@
1
- //#region src/types/payment-modes.d.ts
2
- /**
3
- * Represents the allowed codes for payment modes.
4
- * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/payment-methods/
5
- */
6
- type PaymentModeCode = '01' // Cash
7
- | '02' // Cheque
8
- | '03' // Bank Transfer
9
- | '04' // Credit Card
10
- | '05' // Debit Card
11
- | '06' // e-Wallet / Digital Wallet
12
- | '07' // Digital Bank
13
- | '08'; // Others
14
-
15
- /**
16
- * Enum representing the allowed payment mode codes with descriptive names.
17
- * Provides a more readable way to reference payment modes.
18
- *
19
- * @example
20
- * const mode = PaymentModeCodeEnum.Cash;
21
- * console.log(mode); // Output: "01"
22
- */
23
- declare enum PaymentModeCodeEnum {
24
- Cash = '01',
25
- Cheque = '02',
26
- BankTransfer = '03',
27
- CreditCard = '04',
28
- DebitCard = '05',
29
- EWalletDigitalWallet = '06',
30
- DigitalBank = '07',
31
- Others = '08',
32
- }
33
-
34
- /**
35
- * Interface representing a payment mode entry.
36
- * Contains the code and its corresponding description.
37
- */
38
- interface PaymentMode {
39
- code: PaymentModeCode;
40
- description: string;
41
- }
42
- //#endregion
43
- export { PaymentMode, PaymentModeCode, PaymentModeCodeEnum };
44
- //# sourceMappingURL=payment-modes-7c1lWlIr.d.cts.map
@@ -1,43 +0,0 @@
1
- //#region src/types/payment-modes.d.ts
2
- /**
3
- * Represents the allowed codes for payment modes.
4
- * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/payment-methods/
5
- */
6
- type PaymentModeCode = '01' // Cash
7
- | '02' // Cheque
8
- | '03' // Bank Transfer
9
- | '04' // Credit Card
10
- | '05' // Debit Card
11
- | '06' // e-Wallet / Digital Wallet
12
- | '07' // Digital Bank
13
- | '08'; // Others
14
-
15
- /**
16
- * Enum representing the allowed payment mode codes with descriptive names.
17
- * Provides a more readable way to reference payment modes.
18
- *
19
- * @example
20
- * const mode = PaymentModeCodeEnum.Cash;
21
- * console.log(mode); // Output: "01"
22
- */
23
- declare enum PaymentModeCodeEnum {
24
- Cash = '01',
25
- Cheque = '02',
26
- BankTransfer = '03',
27
- CreditCard = '04',
28
- DebitCard = '05',
29
- EWalletDigitalWallet = '06',
30
- DigitalBank = '07',
31
- Others = '08',
32
- }
33
-
34
- /**
35
- * Interface representing a payment mode entry.
36
- * Contains the code and its corresponding description.
37
- */
38
- interface PaymentMode {
39
- code: PaymentModeCode;
40
- description: string;
41
- }
42
- //#endregion
43
- export { PaymentMode, PaymentModeCode, PaymentModeCodeEnum };