@ripwords/myinvois-client 0.3.7 → 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 (395) 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-C-v4_4-x.cjs → documentSubmission-BaPECvYU.cjs} +5 -5
  11. package/dist/{documentSubmission-C-v4_4-x.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 +4 -2
  19. package/dist/index11.cjs +1 -1
  20. package/dist/index13.cjs +1 -1
  21. package/dist/index14.cjs +2 -329
  22. package/dist/index15.cjs +308 -172
  23. package/dist/index15.cjs.map +1 -1
  24. package/dist/index16.cjs +187 -56
  25. package/dist/index16.cjs.map +1 -1
  26. package/dist/index17.cjs +53 -523
  27. package/dist/index17.cjs.map +1 -1
  28. package/dist/index18.cjs +523 -187
  29. package/dist/index18.cjs.map +1 -1
  30. package/dist/index19.cjs +196 -0
  31. package/dist/index19.cjs.map +1 -0
  32. package/dist/index2.cjs +1 -1
  33. package/dist/index20.cjs +0 -25
  34. package/dist/index21.cjs +25 -0
  35. package/dist/{index20.cjs.map → index21.cjs.map} +1 -1
  36. package/dist/index23.cjs +0 -29
  37. package/dist/index24.cjs +24 -20
  38. package/dist/index24.cjs.map +1 -1
  39. package/dist/index25.cjs +25 -0
  40. package/dist/index25.cjs.map +1 -0
  41. package/dist/index26.cjs +0 -34
  42. package/dist/index27.cjs +25 -15
  43. package/dist/index27.cjs.map +1 -1
  44. package/dist/index28.cjs +24 -0
  45. package/dist/index28.cjs.map +1 -0
  46. package/dist/index3.cjs +2 -2
  47. package/dist/index31.cjs +0 -208
  48. package/dist/index32.cjs +203 -104
  49. package/dist/index32.cjs.map +1 -1
  50. package/dist/index33.cjs +104 -132
  51. package/dist/index33.cjs.map +1 -1
  52. package/dist/index34.cjs +132 -59
  53. package/dist/index34.cjs.map +1 -1
  54. package/dist/index35.cjs +59 -262
  55. package/dist/index35.cjs.map +1 -1
  56. package/dist/index36.cjs +262 -74
  57. package/dist/index36.cjs.map +1 -1
  58. package/dist/index37.cjs +74 -102
  59. package/dist/index37.cjs.map +1 -1
  60. package/dist/index38.cjs +102 -68
  61. package/dist/index38.cjs.map +1 -1
  62. package/dist/index39.cjs +68 -107
  63. package/dist/index39.cjs.map +1 -1
  64. package/dist/index4.cjs +1 -1
  65. package/dist/index40.cjs +107 -95
  66. package/dist/index40.cjs.map +1 -1
  67. package/dist/index41.cjs +95 -13
  68. package/dist/index41.cjs.map +1 -1
  69. package/dist/index42.cjs +11 -31
  70. package/dist/index42.cjs.map +1 -1
  71. package/dist/index43.cjs +31 -12
  72. package/dist/index43.cjs.map +1 -1
  73. package/dist/index44.cjs +12 -22
  74. package/dist/index44.cjs.map +1 -1
  75. package/dist/index45.cjs +22 -13
  76. package/dist/index45.cjs.map +1 -1
  77. package/dist/index46.cjs +13 -7
  78. package/dist/index46.cjs.map +1 -1
  79. package/dist/index47.cjs +7 -7
  80. package/dist/index47.cjs.map +1 -1
  81. package/dist/index48.cjs +7 -10
  82. package/dist/index48.cjs.map +1 -1
  83. package/dist/index49.cjs +10 -6
  84. package/dist/index49.cjs.map +1 -1
  85. package/dist/index5.cjs +1 -1
  86. package/dist/index50.cjs +6 -101
  87. package/dist/index50.cjs.map +1 -1
  88. package/dist/index51.cjs +101 -106
  89. package/dist/index51.cjs.map +1 -1
  90. package/dist/index52.cjs +106 -119
  91. package/dist/index52.cjs.map +1 -1
  92. package/dist/index53.cjs +119 -106
  93. package/dist/index53.cjs.map +1 -1
  94. package/dist/index54.cjs +106 -98
  95. package/dist/index54.cjs.map +1 -1
  96. package/dist/index55.cjs +98 -118
  97. package/dist/index55.cjs.map +1 -1
  98. package/dist/index56.cjs +118 -127
  99. package/dist/index56.cjs.map +1 -1
  100. package/dist/index57.cjs +127 -117
  101. package/dist/index57.cjs.map +1 -1
  102. package/dist/index58.cjs +117 -14
  103. package/dist/index58.cjs.map +1 -1
  104. package/dist/index59.cjs +14 -95
  105. package/dist/index59.cjs.map +1 -1
  106. package/dist/index6.cjs +1 -1
  107. package/dist/index60.cjs +95 -142
  108. package/dist/index60.cjs.map +1 -1
  109. package/dist/index61.cjs +142 -114
  110. package/dist/index61.cjs.map +1 -1
  111. package/dist/index62.cjs +114 -144
  112. package/dist/index62.cjs.map +1 -1
  113. package/dist/index63.cjs +144 -113
  114. package/dist/index63.cjs.map +1 -1
  115. package/dist/index64.cjs +113 -17
  116. package/dist/index64.cjs.map +1 -1
  117. package/dist/index65.cjs +17 -112
  118. package/dist/index65.cjs.map +1 -1
  119. package/dist/index66.cjs +112 -47
  120. package/dist/index66.cjs.map +1 -1
  121. package/dist/index67.cjs +47 -14
  122. package/dist/index67.cjs.map +1 -1
  123. package/dist/index68.cjs +14 -28
  124. package/dist/index68.cjs.map +1 -1
  125. package/dist/index69.cjs +28 -22
  126. package/dist/index69.cjs.map +1 -1
  127. package/dist/index7.cjs +1 -1
  128. package/dist/index70.cjs +22 -9
  129. package/dist/index70.cjs.map +1 -1
  130. package/dist/index71.cjs +9 -8
  131. package/dist/index71.cjs.map +1 -1
  132. package/dist/index72.cjs +8 -17
  133. package/dist/index72.cjs.map +1 -1
  134. package/dist/index73.cjs +17 -412
  135. package/dist/index73.cjs.map +1 -1
  136. package/dist/index74.cjs +412 -8
  137. package/dist/index74.cjs.map +1 -1
  138. package/dist/index75.cjs +8 -9
  139. package/dist/index75.cjs.map +1 -1
  140. package/dist/index76.cjs +16 -0
  141. package/dist/index76.cjs.map +1 -0
  142. package/dist/index8.cjs +1 -1
  143. package/dist/lineItems-C8iT0OL1.cjs +64 -0
  144. package/dist/lineItems-C8iT0OL1.cjs.map +1 -0
  145. package/dist/{notificationManagement-DLBDn77E.cjs → notificationManagement-C_qrFwWL.cjs} +1 -1
  146. package/dist/{notificationManagement-DLBDn77E.cjs.map → notificationManagement-C_qrFwWL.cjs.map} +1 -1
  147. package/dist/{platformLogin-Ch6hFKoU.cjs → platformLogin-DC4s6Qpv.cjs} +1 -1
  148. package/dist/{platformLogin-Ch6hFKoU.cjs.map → platformLogin-DC4s6Qpv.cjs.map} +1 -1
  149. package/dist/{taxpayerValidation-j8s6YGED.cjs → taxpayerValidation-DzCJROgP.cjs} +1 -1
  150. package/dist/{taxpayerValidation-j8s6YGED.cjs.map → taxpayerValidation-DzCJROgP.cjs.map} +1 -1
  151. package/package.json +1 -1
  152. package/dist/0X-Cr3M7hci.d.cts +0 -211
  153. package/dist/0X-qj3c_vAo.d.ts +0 -210
  154. package/dist/1X-B-lyAVC4.d.ts +0 -111
  155. package/dist/1X-C72Wa4pk.d.ts +0 -19
  156. package/dist/1X-CWwmfCzo.d.cts +0 -112
  157. package/dist/1X-DYw2tURz.d.cts +0 -20
  158. package/dist/2X-BfCK614i.d.ts +0 -139
  159. package/dist/2X-CH89y3Af.d.ts +0 -39
  160. package/dist/2X-CXtqiwRg.d.cts +0 -40
  161. package/dist/2X-DNtkJ0tj.d.cts +0 -140
  162. package/dist/3X-BOxfatu3.d.cts +0 -62
  163. package/dist/3X-Bk_fUIAk.d.cts +0 -21
  164. package/dist/3X-DryrwYRf.d.ts +0 -20
  165. package/dist/3X-Du10Ix_V.d.ts +0 -61
  166. package/dist/4X-BPMLRoDv.d.ts +0 -30
  167. package/dist/4X-C7fzDWJ_.d.cts +0 -265
  168. package/dist/4X-CK9rj5qd.d.cts +0 -31
  169. package/dist/4X-x3cRFuSM.d.ts +0 -264
  170. package/dist/5X-B52AKeTz.d.ts +0 -76
  171. package/dist/5X-Bv7M6KyG.d.ts +0 -21
  172. package/dist/5X-CNAFsDm2.d.cts +0 -77
  173. package/dist/5X-CpAvNxvd.d.cts +0 -22
  174. package/dist/6X-DBwpWPQ6.d.ts +0 -104
  175. package/dist/6X-ZeZ8OB57.d.ts +0 -15
  176. package/dist/6X-bXWr_7xY.d.cts +0 -16
  177. package/dist/6X-uObUP4VG.d.cts +0 -105
  178. package/dist/7X-BJBOlWhV.d.cts +0 -16
  179. package/dist/7X-BifJnY24.d.cts +0 -71
  180. package/dist/7X-C_XGDSpE.d.ts +0 -70
  181. package/dist/7X-Dvw2Z2VN.d.ts +0 -15
  182. package/dist/8X-BkgoX8dg.d.ts +0 -18
  183. package/dist/8X-Di_0wuRX.d.ts +0 -109
  184. package/dist/8X-DioBXCJ0.d.cts +0 -110
  185. package/dist/8X-dshwiOxU.d.cts +0 -19
  186. package/dist/9X-8ZnvvViY.d.ts +0 -97
  187. package/dist/9X-9j2Djy4W.d.cts +0 -15
  188. package/dist/9X-BjffnXuq.d.cts +0 -98
  189. package/dist/9X-Du0e44cq.d.ts +0 -14
  190. package/dist/AX-BSPLpkVT.d.ts +0 -110
  191. package/dist/AX-CWCopjCC.d.cts +0 -111
  192. package/dist/BX-Cq7WdhD3.d.cts +0 -115
  193. package/dist/BX-u4yMaIkz.d.ts +0 -114
  194. package/dist/CX-BKZG0pVE.d.ts +0 -127
  195. package/dist/CX-DlcVZfxx.d.cts +0 -128
  196. package/dist/DX-CwA9WJAf.d.ts +0 -114
  197. package/dist/DX-DLdv-Nxj.d.cts +0 -115
  198. package/dist/EX-BRNu1Ooi.d.ts +0 -106
  199. package/dist/EX-CIJv8-Lw.d.cts +0 -107
  200. package/dist/FX-DBxjq6xY.d.ts +0 -126
  201. package/dist/FX-DlDM_Zea.d.cts +0 -127
  202. package/dist/GX-B3CvWNrP.d.ts +0 -135
  203. package/dist/GX-BFGNX6Jy.d.cts +0 -136
  204. package/dist/HX-D7FABgTv.d.ts +0 -125
  205. package/dist/HX-D7Y9qRSm.d.cts +0 -126
  206. package/dist/IX-D3ZknsAB.d.ts +0 -22
  207. package/dist/IX-DPTrbhgX.d.cts +0 -23
  208. package/dist/JX-BRaZM3Gc.d.ts +0 -103
  209. package/dist/JX-D8JmtNpo.d.cts +0 -104
  210. package/dist/KX-B1K0OWoi.d.ts +0 -150
  211. package/dist/KX-B46KJZrH.d.cts +0 -151
  212. package/dist/LX-CKRefinL.d.ts +0 -122
  213. package/dist/LX-CfTKy8Sx.d.cts +0 -123
  214. package/dist/MX-BKJ4gNvV.d.cts +0 -153
  215. package/dist/MX-DKmaeO9r.d.ts +0 -152
  216. package/dist/NX-CJL2Gn1U.d.ts +0 -121
  217. package/dist/NX-CSdLIFqU.d.cts +0 -122
  218. package/dist/OX-BwqOsulT.d.cts +0 -26
  219. package/dist/OX-Do2ap5v_.d.ts +0 -25
  220. package/dist/PX-BTx0TXsJ.d.cts +0 -121
  221. package/dist/PX-_DOr_rm9.d.ts +0 -120
  222. package/dist/QX-BUXR8RJL.d.cts +0 -59
  223. package/dist/QX-HlXLkIki.d.ts +0 -58
  224. package/dist/RX-CZ8HiH37.d.cts +0 -23
  225. package/dist/RX-DVPGOVES.d.ts +0 -22
  226. package/dist/SX-CLxsqiQk.d.cts +0 -40
  227. package/dist/SX-OGT3qwlS.d.ts +0 -39
  228. package/dist/TX-DKc8hLc4.d.cts +0 -31
  229. package/dist/TX-cPDINmZ5.d.ts +0 -30
  230. package/dist/UX-Be3sqvPV.d.ts +0 -17
  231. package/dist/UX-bc7xDnZI.d.cts +0 -18
  232. package/dist/VX-CIHTFyoC.d.cts +0 -17
  233. package/dist/VX-CoEuBNDK.d.ts +0 -16
  234. package/dist/WX-BHvlq7Jx.d.cts +0 -26
  235. package/dist/WX-DMvw__jH.d.ts +0 -25
  236. package/dist/XX-DOA-10JW.d.ts +0 -827
  237. package/dist/XX-DztQxYHJ.d.cts +0 -828
  238. package/dist/YX-CkxLeFb4.d.cts +0 -20
  239. package/dist/YX-F34sJ7Ik.d.ts +0 -19
  240. package/dist/ZX-CDQOfsHh.d.ts +0 -21
  241. package/dist/ZX-DVb_buNI.d.cts +0 -22
  242. package/dist/api/documentManagement.d.ts +0 -89
  243. package/dist/api/documentManagement.js +0 -3
  244. package/dist/api/documentSubmission.d.ts +0 -92
  245. package/dist/api/documentSubmission.js +0 -5
  246. package/dist/api/documentTypeManagement.d.ts +0 -70
  247. package/dist/api/documentTypeManagement.js +0 -3
  248. package/dist/api/notificationManagement.d.ts +0 -68
  249. package/dist/api/notificationManagement.js +0 -3
  250. package/dist/api/platformLogin.d.ts +0 -68
  251. package/dist/api/platformLogin.js +0 -3
  252. package/dist/api/taxpayerValidation.d.ts +0 -71
  253. package/dist/api/taxpayerValidation.js +0 -4
  254. package/dist/apiQueue-B6Q644Bz.js +0 -201
  255. package/dist/certificate-COwqszxD.js +0 -71
  256. package/dist/certificate-CWmfCPdt.cjs.map +0 -1
  257. package/dist/chunk-CUT6urMc.cjs +0 -30
  258. package/dist/classification-codes-B15PbWxz.d.cts +0 -118
  259. package/dist/classification-codes-C2X4xW5-.d.ts +0 -117
  260. package/dist/country-code-DPeNFMMi.d.cts +0 -543
  261. package/dist/country-code-DsI8Mbzx.d.ts +0 -542
  262. package/dist/currencies-DKuDflOO.d.ts +0 -207
  263. package/dist/currencies-S5g1gzBU.d.cts +0 -208
  264. package/dist/document-B6ab06s1.cjs.map +0 -1
  265. package/dist/document-Bb5WkhRe.js +0 -626
  266. package/dist/documentManagement-BviJDtf2.cjs.map +0 -1
  267. package/dist/documentManagement-lPm8Gziu.js +0 -49
  268. package/dist/documentSubmission-igf605QK.js +0 -135
  269. package/dist/documentTypeManagement-cBtVCOY3.js +0 -22
  270. package/dist/documents-BYV12TVt.d.ts +0 -1196
  271. package/dist/documents-D_V38Q_U.d.cts +0 -1197
  272. package/dist/e-invoice-BuwtFnlI.d.cts +0 -44
  273. package/dist/e-invoice-C2TxhyrK.d.ts +0 -43
  274. package/dist/formatIdValue-qTxJqj9o.js +0 -7
  275. package/dist/getBaseUrl-D7nUmoYb.js +0 -7
  276. package/dist/index-CygwSf0x.d.ts +0 -15
  277. package/dist/index-Yr1QAbIF.d.cts +0 -16
  278. package/dist/index.d.ts +0 -614
  279. package/dist/index.js +0 -627
  280. package/dist/index14.cjs.map +0 -1
  281. package/dist/index23.cjs.map +0 -1
  282. package/dist/index26.cjs.map +0 -1
  283. package/dist/index31.cjs.map +0 -1
  284. package/dist/index61.cts.map +0 -1
  285. package/dist/index62.cts.map +0 -1
  286. package/dist/index63.cts.map +0 -1
  287. package/dist/index64.cts.map +0 -1
  288. package/dist/index65.cts.map +0 -1
  289. package/dist/index66.cts.map +0 -1
  290. package/dist/index67.cts.map +0 -1
  291. package/dist/index68.cts.map +0 -1
  292. package/dist/index69.cts.map +0 -1
  293. package/dist/index70.cts.map +0 -1
  294. package/dist/index71.cts.map +0 -1
  295. package/dist/index72.cts.map +0 -1
  296. package/dist/index73.cts.map +0 -1
  297. package/dist/index74.cts.map +0 -1
  298. package/dist/index75.cts.map +0 -1
  299. package/dist/msic-codes-CIKdPqag.d.cts +0 -26
  300. package/dist/msic-codes-CjrrJmzb.d.ts +0 -25
  301. package/dist/notificationManagement-n4Z5e-My.js +0 -19
  302. package/dist/notifications-DdlEkprb.d.cts +0 -63
  303. package/dist/notifications-sFhgh3rJ.d.ts +0 -62
  304. package/dist/payment-modes-7c1lWlIr.d.cts +0 -44
  305. package/dist/payment-modes-g3DzLmWb.d.ts +0 -43
  306. package/dist/platformLogin-CqI9OLYP.js +0 -39
  307. package/dist/signatures-CerHUrj3.d.ts +0 -172
  308. package/dist/signatures-CyDSZr_e.d.cts +0 -173
  309. package/dist/state-codes-Ow4oehYT.d.ts +0 -61
  310. package/dist/state-codes-u3ppueWo.d.cts +0 -62
  311. package/dist/tax-types-ClyLgydM.d.ts +0 -41
  312. package/dist/tax-types-fu5Q6dic.d.cts +0 -42
  313. package/dist/taxpayer-BAoT73gg.d.ts +0 -35
  314. package/dist/taxpayer-DwGzY1IL.d.cts +0 -36
  315. package/dist/taxpayerValidation-Xd_EHDvk.js +0 -47
  316. package/dist/types/classification-codes.d.ts +0 -2
  317. package/dist/types/country-code.d.ts +0 -2
  318. package/dist/types/currencies.d.ts +0 -2
  319. package/dist/types/documents.d.ts +0 -55
  320. package/dist/types/e-invoice.d.ts +0 -2
  321. package/dist/types/index.d.ts +0 -61
  322. package/dist/types/msic/0X.d.ts +0 -2
  323. package/dist/types/msic/1X.d.ts +0 -2
  324. package/dist/types/msic/2X.d.ts +0 -2
  325. package/dist/types/msic/3X.d.ts +0 -2
  326. package/dist/types/msic/4X.d.ts +0 -2
  327. package/dist/types/msic/5X.d.ts +0 -2
  328. package/dist/types/msic/6X.d.ts +0 -2
  329. package/dist/types/msic/7X.d.ts +0 -2
  330. package/dist/types/msic/8X.d.ts +0 -2
  331. package/dist/types/msic/9X.d.ts +0 -2
  332. package/dist/types/msic-codes.d.ts +0 -12
  333. package/dist/types/notifications.d.ts +0 -2
  334. package/dist/types/payment-modes.d.ts +0 -2
  335. package/dist/types/signatures.d.ts +0 -2
  336. package/dist/types/state-codes.d.ts +0 -2
  337. package/dist/types/tax-types.d.ts +0 -2
  338. package/dist/types/taxpayer.d.ts +0 -56
  339. package/dist/types/unit/1X.d.ts +0 -2
  340. package/dist/types/unit/2X.d.ts +0 -2
  341. package/dist/types/unit/3X.d.ts +0 -2
  342. package/dist/types/unit/4X.d.ts +0 -2
  343. package/dist/types/unit/5X.d.ts +0 -2
  344. package/dist/types/unit/6X.d.ts +0 -2
  345. package/dist/types/unit/7X.d.ts +0 -2
  346. package/dist/types/unit/8X.d.ts +0 -2
  347. package/dist/types/unit/9X.d.ts +0 -2
  348. package/dist/types/unit/AX.d.ts +0 -2
  349. package/dist/types/unit/BX.d.ts +0 -2
  350. package/dist/types/unit/CX.d.ts +0 -2
  351. package/dist/types/unit/DX.d.ts +0 -2
  352. package/dist/types/unit/EX.d.ts +0 -2
  353. package/dist/types/unit/FX.d.ts +0 -2
  354. package/dist/types/unit/GX.d.ts +0 -2
  355. package/dist/types/unit/HX.d.ts +0 -2
  356. package/dist/types/unit/IX.d.ts +0 -2
  357. package/dist/types/unit/JX.d.ts +0 -2
  358. package/dist/types/unit/KX.d.ts +0 -2
  359. package/dist/types/unit/LX.d.ts +0 -2
  360. package/dist/types/unit/MX.d.ts +0 -2
  361. package/dist/types/unit/NX.d.ts +0 -2
  362. package/dist/types/unit/OX.d.ts +0 -2
  363. package/dist/types/unit/PX.d.ts +0 -2
  364. package/dist/types/unit/QX.d.ts +0 -2
  365. package/dist/types/unit/RX.d.ts +0 -2
  366. package/dist/types/unit/SX.d.ts +0 -2
  367. package/dist/types/unit/TX.d.ts +0 -2
  368. package/dist/types/unit/UX.d.ts +0 -2
  369. package/dist/types/unit/VX.d.ts +0 -2
  370. package/dist/types/unit/WX.d.ts +0 -2
  371. package/dist/types/unit/XX.d.ts +0 -2
  372. package/dist/types/unit/YX.d.ts +0 -2
  373. package/dist/types/unit/ZX.d.ts +0 -2
  374. package/dist/types/unit-types.d.ts +0 -37
  375. package/dist/types/utils.d.ts +0 -2
  376. package/dist/unit-types-BXdufGWm.d.cts +0 -56
  377. package/dist/unit-types-VgYXIwTT.d.ts +0 -55
  378. package/dist/utils/apiQueue.d.ts +0 -45
  379. package/dist/utils/apiQueue.js +0 -3
  380. package/dist/utils/base64.d.ts +0 -5
  381. package/dist/utils/base64.js +0 -10
  382. package/dist/utils/certificate.d.ts +0 -26
  383. package/dist/utils/certificate.js +0 -3
  384. package/dist/utils/document.d.ts +0 -211
  385. package/dist/utils/document.js +0 -4
  386. package/dist/utils/formatIdValue.d.ts +0 -4
  387. package/dist/utils/formatIdValue.js +0 -3
  388. package/dist/utils/getBaseUrl.d.ts +0 -4
  389. package/dist/utils/getBaseUrl.js +0 -3
  390. package/dist/utils/signature-diagnostics.d.ts +0 -96
  391. package/dist/utils/signature-diagnostics.js +0 -327
  392. package/dist/utils/validation.d.ts +0 -108
  393. package/dist/utils/validation.js +0 -186
  394. package/dist/utils-C4FoVKLq.d.ts +0 -4
  395. package/dist/utils-Cdqbbzca.d.cts +0 -5
@@ -1 +0,0 @@
1
- {"version":3,"file":"index23.cjs","names":[],"sources":["../src/types/notifications.d.ts"],"sourcesContent":["export type NotificationType = 3 | 6 | 7 | 8 | 10 | 11 | 15 | 26 | 33 | 34 | 35\n\nexport enum NotificationTypeEnum {\n 'Profile data validation' = 3,\n 'Document received' = 6,\n 'Document validated' = 7,\n 'Document cancelled' = 8,\n 'User profile changed' = 10,\n 'Taxpayer profile changed' = 11,\n 'Document rejection initiated' = 15,\n 'ERP data validation' = 26,\n 'Documents processing summary' = 33,\n 'Document Template Published' = 34,\n 'Document Template Deletion' = 35,\n}\n\nexport type NotificationStatus = 1 | 2 | 3 | 4 | 5\n\nexport enum NotificationStatusEnum {\n 'New' = 1,\n 'Pending' = 2,\n 'Batched' = 3,\n 'Delivered' = 4,\n 'Error' = 5,\n}\n\nexport type NotificationDeliveryAttempt = {\n attemptDateTime: string\n status: string\n statusDetails: string\n}\n\nexport type NotificationMetadata = {\n hasNext: boolean\n}\n\nexport type Notification = {\n notificationId: string\n receiverNName: string\n notificationDeliveryId: string\n creationDateTime: string\n receivedDateTime: string\n notificationSubject: string\n deliveredDateTime: string\n typeId: string\n typeName: string\n finalMessage: string\n address: string\n language: string\n status: string\n deliveryAttempts: NotificationDeliveryAttempt[]\n}\n\nexport type NotificationResponse = {\n notifications: Notification[]\n metadata: NotificationMetadata\n}\n\nexport type NotificationSearchParams = {\n dateFrom?: string\n dateTo?: string\n type?: NotificationType\n language?: string\n status?: NotificationStatus\n pageNo?: number\n pageSize?: number\n}\n"],"mappings":";;AAEA,IAAY,wEAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACD;AAID,IAAY,4EAAL;AACL;AACA;AACA;AACA;AACA;;AACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index26.cjs","names":[],"sources":["../src/types/state-codes.d.ts"],"sourcesContent":["/**\n * Represents the allowed codes for Malaysian states and federal territories.\n * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/state-codes/\n */\nexport type StateCode =\n | '01' // Johor\n | '02' // Kedah\n | '03' // Kelantan\n | '04' // Melaka\n | '05' // Negeri Sembilan\n | '06' // Pahang\n | '07' // Pulau Pinang\n | '08' // Perak\n | '09' // Perlis\n | '10' // Selangor\n | '11' // Terengganu\n | '12' // Sabah\n | '13' // Sarawak\n | '14' // Wilayah Persekutuan Kuala Lumpur\n | '15' // Wilayah Persekutuan Labuan\n | '16' // Wilayah Persekutuan Putrajaya\n | '17' // Not Applicable\n\n/**\n * Enum representing the allowed state codes with descriptive names.\n * Provides a more readable way to reference states.\n *\n * @example\n * const code = StateCodeEnum.Selangor;\n * console.log(code); // Output: \"10\"\n */\nexport enum StateCodeEnum {\n Johor = '01',\n Kedah = '02',\n Kelantan = '03',\n Melaka = '04',\n NegeriSembilan = '05',\n Pahang = '06',\n PulauPinang = '07',\n Perak = '08',\n Perlis = '09',\n Selangor = '10',\n Terengganu = '11',\n Sabah = '12',\n Sarawak = '13',\n WPKualaLumpur = '14',\n WPLabuan = '15',\n WPPutrajaya = '16',\n NotApplicable = '17',\n}\n\n/**\n * Interface representing a state code entry.\n * Contains the code and its corresponding name.\n */\nexport interface State {\n code: StateCode\n name: string\n}\n"],"mappings":";;;;;;;;;;AA+BA,IAAY,0DAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACD"}
@@ -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,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 };
@@ -1,39 +0,0 @@
1
- //#region src/api/platformLogin.ts
2
- const platformLogin = async (client) => {
3
- const { clientId, clientSecret, baseUrl, onBehalfOf, debug } = client;
4
- try {
5
- const response = await fetch(`${baseUrl}/connect/token`, {
6
- method: "POST",
7
- headers: {
8
- "Content-Type": "application/x-www-form-urlencoded",
9
- ...onBehalfOf ? { onbehalfof: onBehalfOf } : {}
10
- },
11
- body: new URLSearchParams({
12
- grant_type: "client_credentials",
13
- client_id: clientId,
14
- client_secret: clientSecret,
15
- scope: "InvoicingAPI"
16
- })
17
- });
18
- if (!response.ok) {
19
- let errorBody;
20
- try {
21
- errorBody = await response.json();
22
- } catch {}
23
- const errorMessage = typeof errorBody === "object" && errorBody !== null && "error_description" in errorBody ? errorBody.error_description : `Platform login failed with status ${response.status}`;
24
- throw new Error(errorMessage);
25
- }
26
- const tokenResponse = await response.json();
27
- if (!tokenResponse.access_token) throw new Error("Platform login response did not include an access_token");
28
- return {
29
- token: tokenResponse.access_token,
30
- tokenExpiration: new Date(Date.now() + tokenResponse.expires_in * 1e3)
31
- };
32
- } catch (error) {
33
- if (debug) console.error(error);
34
- throw error;
35
- }
36
- };
37
-
38
- //#endregion
39
- export { platformLogin };