@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,1196 +0,0 @@
1
- import { ClassificationCode } from "./classification-codes-C2X4xW5-.js";
2
- import { CountryCode } from "./country-code-DsI8Mbzx.js";
3
- import { CurrencyCode } from "./currencies-DKuDflOO.js";
4
- import { EInvoiceTypeCode } from "./e-invoice-C2TxhyrK.js";
5
- import { MSICCode } from "./msic-codes-CjrrJmzb.js";
6
- import { TaxTypeCode } from "./tax-types-ClyLgydM.js";
7
- import { StateCode } from "./state-codes-Ow4oehYT.js";
8
- import { UnitTypeCode } from "./unit-types-VgYXIwTT.js";
9
-
10
- //#region src/types/documents.d.ts
11
- type RegistrationType = 'BRN' | 'NRIC' | 'PASSPORT' | 'ARMY';
12
-
13
- // Based on https://sdk.myinvois.hasil.gov.my/documents/invoice-v1-1/
14
-
15
- /**
16
- * Represents a physical address.
17
- * Based on the Address section of the documentation.
18
- */
19
- interface Address {
20
- /** Main address line. Max 150 chars.
21
- * @example Lot 66
22
- */
23
- addressLine0: string;
24
- /** City name. Max 50 chars. */
25
- cityName: string;
26
- /** State code. Refer to /codes/state-codes/. Max 50 chars. */
27
- state: StateCode;
28
- /** Country code (ISO 3166-1). Refer to /codes/countries/. Max 3 chars. */
29
- country: CountryCode; // MYS
30
- }
31
-
32
- /**
33
- * Represents the supplier information.
34
- * Based on the Supplier section of the documentation.
35
- */
36
- interface Supplier {
37
- /** Supplier's name. Max 300 chars.
38
- * @example Test Supplier Sdn Bhd
39
- */
40
- name: string;
41
- /** Supplier's Tax Identification Number (TIN). Max 14 chars.
42
- * @example 1234567890
43
- */
44
- tin: string;
45
- /**
46
- * Supplier's Registration Type. NRIC, BRN, PASSPORT
47
- * @example NRIC
48
- */
49
- registrationType: RegistrationType;
50
- /**
51
- * Supplier's Registration / Identification Number / Passport Number.
52
- * Format depends on schemeID: NRIC (12), BRN (20), PASSPORT (12)
53
- * @example BRN: 202001234567
54
- */
55
- registrationNumber: string;
56
- /** Supplier's address. */
57
- address: Address;
58
- /** Supplier's contact number (E.164 standard). Max 20 chars.
59
- * @example +60123456789
60
- */
61
- contactNumber: string;
62
- /**
63
- * Supplier's industry classification code. Max 10 chars.
64
- * @example 41001
65
- */
66
- industryClassificationCode: MSICCode['code'];
67
- /**
68
- * Supplier's industry classification description. Max 300 chars.
69
- * @example Other retail sale in non-specialised stores
70
- */
71
- industryClassificationDescription: MSICCode['description'];
72
- }
73
-
74
- /**
75
- * Represents the buyer information.
76
- * Based on the Buyer section of the documentation.
77
- */
78
- interface Buyer {
79
- /** Buyer's name. Max 300 chars.
80
- * @example Hebat Group
81
- */
82
- name: string;
83
- /** Buyer's Tax Identification Number (TIN). Max 14 chars.
84
- * @example C12345678901
85
- */
86
- tin: string;
87
- /**
88
- * Buyer's Registration Type. NRIC, BRN, PASSPORT
89
- * @example BRN
90
- */
91
- registrationType: RegistrationType;
92
- /**
93
- * Buyer's Registration / Identification Number / Passport Number.
94
- * Format depends on schemeID: NRIC (12), BRN (20), PASSPORT (12).
95
- * @example BRN: 202001234567
96
- */
97
- registrationNumber: string;
98
- /**
99
- * Buyer's SST registration number. Max 35 chars.
100
- * Mandatory for SST-registrants.
101
- * Allows up to two numbers separated by ';'.
102
- * @example W10-1909-32000060
103
- */
104
- sstRegistrationNumber?: string;
105
- /** Buyer's address. */
106
- address: Address;
107
- /** Buyer's contact number (E.164 standard). Max 20 chars.
108
- * @example +60123456789
109
- */
110
- contactNumber: string;
111
- }
112
-
113
- /**
114
- * Represents a single line item in an invoice.
115
- * Based on the Invoice Line Item section of the documentation.
116
- * https://sdk.myinvois.hasil.gov.my/documents/invoice-v1-1/#invoice-line-item
117
- */
118
- interface InvoiceLineItem {
119
- /**
120
- * Item classification code. Refer to /codes/item-classifications/. Max 50 chars.
121
- * @example 001
122
- */
123
- itemClassificationCode: ClassificationCode;
124
- /**
125
- * Item description. Max 300 chars.
126
- * @example Laptop
127
- */
128
- itemDescription: string;
129
- /**
130
- * Unit price before tax. Max 18 digits, 6 decimal places.
131
- * @example 1500.00
132
- */
133
- unitPrice: number;
134
- /**
135
- * Tax type code. Refer to /codes/tax-types/. Max 2 chars.
136
- * @example 01
137
- */
138
- taxType: TaxTypeCode;
139
- /**
140
- * Tax rate percentage. Max 18 digits, 2 decimal places.
141
- * Used for percentage-based taxation.
142
- * @example 6.00
143
- */
144
- taxRate?: number;
145
- /**
146
- * Tax amount per unit for fixed rate taxation. Max 18 digits, 2 decimal places.
147
- * Used when tax is calculated as a fixed amount per unit.
148
- * @example 10.00
149
- */
150
- taxPerUnitAmount?: number;
151
- /**
152
- * Number of units for fixed rate taxation.
153
- * Used when tax is calculated as a fixed amount per unit.
154
- * @example 5
155
- */
156
- baseUnitMeasure?: number;
157
- /**
158
- * Unit code for BaseUnitMeasure (e.g., 'C62' for units, 'DAY' for days).
159
- * Required when using fixed rate taxation.
160
- * @example 'C62'
161
- */
162
- baseUnitMeasureCode?: UnitTypeCode;
163
- /**
164
- * Discount amount. Optional per spec; include when a line discount exists.
165
- * UBL mapping: / ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:Amount
166
- * Max 18 digits, 2 decimal places.
167
- * @example 10.00
168
- */
169
- discountAmount?: number;
170
- /**
171
- * Discount rate. Optional helper if you calculate discount by rate.
172
- * If provided, maps to UBL cbc:MultiplierFactorNumeric on cac:AllowanceCharge.
173
- * Ranges from 0.00 to 1.00.
174
- * @example 0.15
175
- */
176
- discountRate?: number;
177
- /**
178
- * Tax amount. Max 18 digits, 2 decimal places.
179
- * For percentage tax: calculated as taxableAmount * taxRate / 100
180
- * For fixed rate: calculated as taxPerUnitAmount * baseUnitMeasure
181
- * @example 90.00
182
- */
183
- taxAmount: number;
184
- /**
185
- * Tax exemption reason code. Refer to /codes/tax-exemption-reasons/. Max 2 chars.
186
- * Mandatory if tax rate is 0%.
187
- * @example 02
188
- */
189
- taxExemptionReasonCode?: string;
190
- /**
191
- * Tax exemption reason amount. Max 18 digits, 2 decimal places.
192
- * Mandatory if tax rate is 0%.
193
- * @example 1500.00
194
- */
195
- taxExemptionReasonAmount?: number;
196
- /**
197
- * Total taxable amount per line (Quantity * Unit Price - Discount Amount). Max 18 digits, 2 decimal places.
198
- * @example 1500.00
199
- */
200
- totalTaxableAmountPerLine: number;
201
- /**
202
- * Total amount per line including tax (Total Taxable Amount Per Line + Tax Amount). Max 18 digits, 2 decimal places.
203
- * @example 1590.00
204
- */
205
- totalAmountPerLine: number;
206
- /**
207
- * Number of units of a particular product or service in a commercial transaction.
208
- * UBL mapping: / ubl:Invoice / cac:InvoiceLine / cbc:InvoicedQuantity
209
- * Optional. Recommended: Up to 5 decimal places.
210
- * @example 1.00
211
- */
212
- quantity?: number;
213
- /**
214
- * Standard unit or system used to measure the product or service.
215
- * This value should be represented in actual decimal value like 0.15.
216
- * This field follows the UN/ECE Recommendation 20, Revision 17 (2021) standard.
217
- * UBL mapping: / ubl:Invoice / cac:InvoiceLine / cbc:InvoicedQuantity / @unitCode
218
- * Optional. Max 3 characters.
219
- * @example KGM
220
- */
221
- measurement?: string;
222
- }
223
-
224
- /** Represents monetary totals for the invoice. Based on UBL cac:LegalMonetaryTotal. */
225
- interface LegalMonetaryTotal {
226
- /** Total amount exclusive of taxes. Max 18 digits, 2 decimal places. */
227
- taxExclusiveAmount: number;
228
- /** Total amount inclusive of taxes. Max 18 digits, 2 decimal places. */
229
- taxInclusiveAmount: number;
230
- /** Rounding amount applied to the payable amount. Max 18 digits, 2 decimal places. */
231
- payableRoundingAmount: number;
232
- /** The final payable amount. Max 18 digits, 2 decimal places. */
233
- payableAmount: number;
234
- }
235
-
236
- /** Represents tax category information. Based on UBL cac:TaxCategory. */
237
- interface TaxCategory {
238
- /** Tax type code. Refer to /codes/tax-types/. Max 2 chars. */
239
- taxTypeCode: TaxTypeCode;
240
- /** Tax rate percentage. Max 18 digits, 2 decimal places. */
241
- taxRate: number;
242
- }
243
-
244
- /** Represents a subtotal for a specific tax category. Based on UBL cac:TaxSubtotal. */
245
- interface TaxSubtotal {
246
- /** Taxable amount for this category. Max 18 digits, 2 decimal places. */
247
- taxableAmount: number;
248
- /** Tax amount for this category. Max 18 digits, 2 decimal places. */
249
- taxAmount: number;
250
- /** Tax category details. */
251
- taxCategory: TaxCategory;
252
- }
253
-
254
- /** Represents the total tax amount for the invoice. Based on UBL cac:TaxTotal. */
255
- interface TaxTotal {
256
- /** Total tax amount for the entire invoice. Max 18 digits, 2 decimal places. */
257
- taxAmount: number;
258
- }
259
-
260
- /**
261
- * Represents the core Invoice v1.1 document structure.
262
- * Based on the Core section of the documentation.
263
- */
264
- interface InvoiceV1_1 {
265
- /** Supplier information. */
266
- supplier: Supplier;
267
- /** Buyer information. */
268
- buyer: Buyer;
269
- /** e-Invoice version. Fixed value '1.1'. */
270
- eInvoiceVersion: '1.1';
271
- /** e-Invoice type code. Refer to /codes/e-invoice-types/. Max 2 chars. */
272
- eInvoiceTypeCode: EInvoiceTypeCode; // e.g., '01'
273
- /** Document reference number used by Supplier. Max 50 chars. */
274
- eInvoiceCodeOrNumber: string; // e.g., 'INV12345'
275
- /** Date of issuance (YYYY-MM-DD) in UTC. Max 10 chars. */
276
- eInvoiceDate: string; // e.g., '2017-11-26'
277
- /** Time of issuance (HH:mm:ssZ) in UTC. Max 9 chars. */
278
- eInvoiceTime: string; // e.g., '15:30:00Z'
279
- /** Invoice currency code. Refer to /codes/currencies/. Max 3 chars. */
280
- invoiceCurrencyCode: CurrencyCode; // e.g., 'MYR'
281
- /** Invoice line items. */
282
- invoiceLineItems: InvoiceLineItem[];
283
- /**
284
- * Currency exchange rate to MYR. Max 15 decimal places.
285
- * Mandatory if InvoiceCurrencyCode is not MYR.
286
- */
287
- currencyExchangeRate?: number; // e.g., 1.0 or 4.75
288
-
289
- /** Overall monetary totals for the invoice. */
290
- legalMonetaryTotal: LegalMonetaryTotal;
291
- /** Total tax amounts and subtotals. */
292
- taxTotal: TaxTotal;
293
- }
294
- interface CreditNoteV1_1 {
295
- /** Supplier information (AccountingSupplierParty). */
296
- supplier: Supplier;
297
- /** Buyer information (AccountingCustomerParty). */
298
- buyer: Buyer;
299
-
300
- /** e-Invoice version. Fixed value '1.1'. */
301
- eInvoiceVersion: '1.1';
302
- /** e-Invoice type code for Credit Note. Fixed value '02'. */
303
- eInvoiceTypeCode: EInvoiceTypeCode;
304
- /** Document reference number used by Supplier for internal tracking purpose. Max 50 chars. */
305
- eInvoiceCodeOrNumber: string;
306
- /** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. 26 chars. */
307
- originalEInvoiceReferenceNumber: string;
308
- /** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. Mandatory where applicable (Debit/Credit/Refund notes). */
309
- originalEInvoiceInternalId: string;
310
- /** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
311
- eInvoiceDate: string;
312
- /** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
313
- eInvoiceTime: string;
314
-
315
- /** Specific currency that is used to represent the monetary value stated in the e-Invoice. */
316
- invoiceCurrencyCode: CurrencyCode;
317
- /** Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.
318
- * Mandatory when invoiceCurrencyCode is not 'MYR'.
319
- */
320
- currencyExchangeRate?: number;
321
-
322
- /** Credit note line items. */
323
- creditNoteLineItems: InvoiceLineItem[];
324
-
325
- /** Overall monetary totals for the credit note. */
326
- legalMonetaryTotal: LegalMonetaryTotal;
327
- /** Total tax amounts and subtotals. */
328
- taxTotal: TaxTotal;
329
- }
330
- interface DebitNoteV1_1 {
331
- /** Supplier information (AccountingSupplierParty). */
332
- supplier: Supplier;
333
- /** Buyer information (AccountingCustomerParty). */
334
- buyer: Buyer;
335
-
336
- /** e-Invoice version. Fixed value '1.1'. */
337
- eInvoiceVersion: '1.1';
338
- /** e-Invoice type code for Debit Note. Fixed value '03'. */
339
- eInvoiceTypeCode: EInvoiceTypeCode;
340
- /** Document reference number used by Supplier for internal tracking purpose. Max 50 chars. */
341
- eInvoiceCodeOrNumber: string;
342
- /** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. Mandatory where applicable (Debit/Credit/Refund notes). */
343
- originalEInvoiceReferenceNumber: string;
344
- /** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. Mandatory where applicable (Debit/Credit/Refund notes). */
345
- originalEInvoiceInternalId: string;
346
- /** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
347
- eInvoiceDate: string;
348
- /** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
349
- eInvoiceTime: string;
350
-
351
- /** Specific currency that is used to represent the monetary value stated in the e-Invoice. */
352
- invoiceCurrencyCode: CurrencyCode;
353
- /** Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.
354
- * Mandatory when invoiceCurrencyCode is not 'MYR'.
355
- */
356
- currencyExchangeRate?: number;
357
-
358
- /** Debit note line items (InvoiceLine section with required fields). */
359
- debitNoteLineItems: InvoiceLineItem[];
360
-
361
- /** Overall monetary totals for the debit note. */
362
- legalMonetaryTotal: LegalMonetaryTotal;
363
- /** Total tax amounts and subtotals. */
364
- taxTotal: TaxTotal;
365
- }
366
- interface RefundNoteV1_1 {
367
- /** Supplier information (AccountingSupplierParty). */
368
- supplier: Supplier;
369
- /** Buyer information (AccountingCustomerParty). */
370
- buyer: Buyer;
371
-
372
- /** e-Invoice version. Fixed value '1.1'. */
373
- eInvoiceVersion: '1.1';
374
- /** e-Invoice type code for Refund Note. Fixed value '04'. */
375
- eInvoiceTypeCode: EInvoiceTypeCode;
376
- /** Document reference number used by Supplier for internal tracking purpose. Max 50 chars. */
377
- eInvoiceCodeOrNumber: string;
378
- /** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. Mandatory where applicable (Debit/Credit/Refund notes). */
379
- originalEInvoiceReferenceNumber: string;
380
- /** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
381
- eInvoiceDate: string;
382
- /** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
383
- eInvoiceTime: string;
384
-
385
- /** Specific currency that is used to represent the monetary value stated in the e-Invoice. */
386
- invoiceCurrencyCode: CurrencyCode;
387
- /** Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.
388
- * Mandatory when invoiceCurrencyCode is not 'MYR'.
389
- */
390
- currencyExchangeRate?: number;
391
-
392
- /** Refund note line items. */
393
- refundNoteLineItems: InvoiceLineItem[];
394
-
395
- /** Overall monetary totals for the refund note. */
396
- legalMonetaryTotal: LegalMonetaryTotal;
397
- /** Total tax amounts and subtotals. */
398
- taxTotal: TaxTotal;
399
- }
400
- interface SelfBilledInvoiceV1_1 {
401
- /** Supplier information (AccountingSupplierParty). */
402
- supplier: Supplier;
403
- /** Buyer information (AccountingCustomerParty). */
404
- buyer: Buyer;
405
-
406
- /** e-Invoice version. Fixed value '1.1'. */
407
- eInvoiceVersion: '1.1';
408
- /** e-Invoice type code for Self-Billed Invoice. Fixed value '11'. */
409
- eInvoiceTypeCode: EInvoiceTypeCode;
410
- /** Document reference number used by Buyer (acting as issuer) for internal tracking purpose. Max 50 chars. */
411
- eInvoiceCodeOrNumber: string;
412
- /** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
413
- eInvoiceDate: string;
414
- /** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
415
- eInvoiceTime: string;
416
-
417
- /** Specific currency used to represent the monetary values stated in the e-Invoice. */
418
- invoiceCurrencyCode: CurrencyCode;
419
- /** Currency exchange rate to MYR when invoiceCurrencyCode is not 'MYR'. Mandatory where applicable. */
420
- currencyExchangeRate?: number;
421
-
422
- /** Frequency of billing (e.g., Daily, Monthly). Optional. */
423
- frequencyOfBilling?: string;
424
- /** Billing period start date (YYYY-MM-DD). Optional but allowed; include to match spec for optional elements. */
425
- billingPeriodStartDate?: string;
426
- /** Billing period end date (YYYY-MM-DD). Optional. */
427
- billingPeriodEndDate?: string;
428
-
429
- /** Invoice line items. */
430
- invoiceLineItems: InvoiceLineItem[];
431
-
432
- /** Overall monetary totals for the invoice. */
433
- legalMonetaryTotal: LegalMonetaryTotal;
434
- /** Total tax amounts and subtotals. */
435
- taxTotal: TaxTotal;
436
- }
437
- interface SelfBilledCreditNoteV1_1 {
438
- /** Supplier information. */
439
- supplier: Supplier;
440
- /** Buyer information. */
441
- buyer: Buyer;
442
-
443
- /** Fixed e-Invoice version '1.1'. */
444
- eInvoiceVersion: '1.1';
445
- /** e-Invoice type code for Self-Billed Credit Note (code '12'). */
446
- eInvoiceTypeCode: EInvoiceTypeCode;
447
- /** Internal document reference number issued by Buyer. Max 50 chars. */
448
- eInvoiceCodeOrNumber: string;
449
- /** LHDNM unique identifier of the original self-billed invoice being adjusted. */
450
- originalEInvoiceReferenceNumber: string;
451
- /** Date of issuance (YYYY-MM-DD, UTC). */
452
- eInvoiceDate: string;
453
- /** Time of issuance (HH:mm:ssZ, UTC). */
454
- eInvoiceTime: string;
455
-
456
- /** Currency code for monetary values. */
457
- invoiceCurrencyCode: CurrencyCode;
458
- /** Exchange rate to MYR – required when invoiceCurrencyCode ≠ 'MYR'. */
459
- currencyExchangeRate?: number;
460
-
461
- /** Line items for the credit note. */
462
- selfBilledCreditNoteLineItems: InvoiceLineItem[];
463
-
464
- /** Monetary totals. */
465
- legalMonetaryTotal: LegalMonetaryTotal;
466
- /** Tax totals. */
467
- taxTotal: TaxTotal;
468
- }
469
- interface SelfBilledRefundNoteV1_1 {
470
- /** Supplier information issued in the self-billed refund note. */
471
- supplier: Supplier;
472
- /** Buyer information (issuer of the self-billed document). */
473
- buyer: Buyer;
474
-
475
- /** Fixed e-Invoice version. */
476
- eInvoiceVersion: '1.1';
477
- /** e-Invoice type code for Self-Billed Refund Note (code '14'). */
478
- eInvoiceTypeCode: EInvoiceTypeCode;
479
- /** Internal tracking reference number. Max 50 chars. */
480
- eInvoiceCodeOrNumber: string;
481
- /** Original self-billed invoice UUID being adjusted (mandatory for refund/credit/debit). */
482
- originalEInvoiceReferenceNumber: string;
483
- /** Issue date (YYYY-MM-DD, UTC). */
484
- eInvoiceDate: string;
485
- /** Issue time (HH:mm:ssZ, UTC). */
486
- eInvoiceTime: string;
487
-
488
- /** Document currency code. */
489
- invoiceCurrencyCode: CurrencyCode;
490
- /** Exchange rate to MYR when currency ≠ 'MYR'. */
491
- currencyExchangeRate?: number;
492
-
493
- /** Line items contained in the refund note. */
494
- selfBilledRefundNoteLineItems: InvoiceLineItem[];
495
-
496
- /** Monetary totals for the document. */
497
- legalMonetaryTotal: LegalMonetaryTotal;
498
- /** Tax totals for the document. */
499
- taxTotal: TaxTotal;
500
- }
501
- type AllDocumentsV1_1 = InvoiceV1_1 | CreditNoteV1_1 | DebitNoteV1_1 | RefundNoteV1_1 | SelfBilledInvoiceV1_1 | SelfBilledCreditNoteV1_1 | SelfBilledRefundNoteV1_1;
502
- type SubmissionStatus = 'InProgress' | 'Valid' | 'PartiallyValid' | 'Invalid' | 'TimedOut' | 'Submitted';
503
- type DocumentStatus = 'Valid' | 'Invalid' | 'Cancelled' | 'Submitted';
504
- type StandardError = {
505
- code: string;
506
- message: string;
507
- target: string;
508
- details: {
509
- code: string;
510
- message: string;
511
- target: string;
512
- }[];
513
- };
514
- type DocumentValidationResult = 'Valid' | 'Invalid' | 'Pending';
515
- interface DocumentValidationStepResult {
516
- name: string;
517
- status: DocumentValidationResult;
518
- error?: StandardError;
519
- }
520
- interface DocumentSummary {
521
- uuid: string;
522
- submissionUid: string;
523
- longId: string;
524
- internalId: string;
525
- typeName: string;
526
- typeVersionName: string;
527
- issuerTin: string;
528
- issuerName: string;
529
- receiverId: string;
530
- receiverName: string;
531
- dateTimeIssued: string;
532
- dateTimeReceived: string;
533
- dateTimeValidated: string;
534
- totalPayableAmount: number;
535
- totalExcludingTax: number;
536
- totalDiscount: number;
537
- totalNetAmount: number;
538
- status: DocumentStatus;
539
- cancelDateTime: string | null;
540
- rejectRequestDateTime: string | null;
541
- documentStatusReason: string | null;
542
- createdByUserId: string;
543
- }
544
- interface GetSubmissionResponse {
545
- submissionUid?: string;
546
- documentCount?: number;
547
- dateTimeReceived?: string;
548
- overallStatus?: SubmissionStatus;
549
- documentSummary?: DocumentSummary[];
550
- error?: StandardError;
551
- }
552
- interface ResponseDocument {
553
- invoiceCodeNumber: string;
554
- error?: StandardError;
555
- }
556
- interface SubmissionResponse {
557
- submissionUid: string;
558
- acceptedDocuments: ResponseDocument[];
559
- rejectedDocuments: ResponseDocument[];
560
- }
561
- interface SigningCredentials {
562
- /** Private key in PEM format for signing */
563
- privateKeyPem: string;
564
- /** Certificate in PEM format */
565
- certificatePem: string;
566
- /** Certificate issuer name (e.g., "CN=Trial LHDNM Sub CA V1, OU=Terms of use at https://www.posdigicert.com.my, O=LHDNM, C=MY") */
567
- issuerName: string;
568
- /** Certificate serial number as string */
569
- serialNumber: string;
570
- }
571
- interface FinalDocumentData {
572
- signatureValue: string; // Base64 encoded RSA signature (Sig from Step 4)
573
- propsDigest: string; // Base64 encoded hash of SignedProperties (PropsDigest from Step 7)
574
- docDigest: string; // Base64 encoded hash of Canonicalized Document (DocDigest from Step 3)
575
- certificatePem: string; // Signing certificate in PEM format
576
- }
577
- interface SignedPropertiesData {
578
- certDigest: string; // Base64 encoded SHA-256 hash of certificate (Step 5)
579
- signingTime: string; // ISO 8601 UTC timestamp string (e.g., 2023-10-26T10:30:00Z)
580
- issuerName: string; // Certificate Issuer Name
581
- serialNumber: string; // Certificate Serial Number
582
- }
583
- interface InvoiceSubmission {
584
- /** Invoice ID */
585
- ID: {
586
- _: string;
587
- }[];
588
-
589
- /** Issue date in YYYY-MM-DD format */
590
- IssueDate: {
591
- _: string;
592
- }[];
593
-
594
- /** Issue time in HH:mm:ssZ format */
595
- IssueTime: {
596
- _: string;
597
- }[];
598
-
599
- /** Invoice type code with version */
600
- InvoiceTypeCode: {
601
- _: string;
602
- listVersionID: string;
603
- }[];
604
-
605
- /** Document currency code */
606
- DocumentCurrencyCode: {
607
- _: string;
608
- }[];
609
-
610
- /** Supplier party information */
611
- AccountingSupplierParty: {
612
- Party: {
613
- IndustryClassificationCode: {
614
- _: string;
615
- name: string;
616
- }[];
617
- PartyIdentification: {
618
- ID: {
619
- _: string;
620
- schemeID: string;
621
- }[];
622
- }[];
623
- PostalAddress: {
624
- CityName: {
625
- _: string;
626
- }[];
627
- CountrySubentityCode: {
628
- _: string;
629
- }[];
630
- AddressLine: {
631
- Line: {
632
- _: string;
633
- }[];
634
- }[];
635
- Country: {
636
- IdentificationCode: {
637
- _: string;
638
- listID: string;
639
- listAgencyID: string;
640
- }[];
641
- }[];
642
- }[];
643
- PartyLegalEntity: {
644
- RegistrationName: {
645
- _: string;
646
- }[];
647
- }[];
648
- Contact: {
649
- Telephone: {
650
- _: string;
651
- }[];
652
- }[];
653
- }[];
654
- }[];
655
-
656
- /** Customer party information */
657
- AccountingCustomerParty: {
658
- Party: {
659
- PartyIdentification: {
660
- ID: {
661
- _: string;
662
- schemeID: string;
663
- }[];
664
- }[];
665
- PostalAddress: {
666
- CityName: {
667
- _: string;
668
- }[];
669
- CountrySubentityCode: {
670
- _: string;
671
- }[];
672
- AddressLine: {
673
- Line: {
674
- _: string;
675
- }[];
676
- }[];
677
- Country: {
678
- IdentificationCode: {
679
- _: string;
680
- listID: string;
681
- listAgencyID: string;
682
- }[];
683
- }[];
684
- }[];
685
- PartyLegalEntity: {
686
- RegistrationName: {
687
- _: string;
688
- }[];
689
- }[];
690
- Contact: {
691
- Telephone: {
692
- _: string;
693
- }[];
694
- }[];
695
- }[];
696
- }[];
697
-
698
- /** Tax total */
699
- TaxTotal: {
700
- TaxAmount: {
701
- _: number;
702
- currencyID: string;
703
- }[];
704
- TaxSubtotal: {
705
- TaxableAmount: {
706
- _: number;
707
- currencyID: string;
708
- }[];
709
- TaxAmount: {
710
- _: number;
711
- currencyID: string;
712
- }[];
713
- TaxCategory: {
714
- ID: {
715
- _: string;
716
- }[];
717
- TaxScheme: {
718
- ID: {
719
- _: string;
720
- schemeAgencyID: string;
721
- schemeID: string;
722
- }[];
723
- }[];
724
- }[];
725
- }[];
726
- }[];
727
-
728
- /** Legal monetary total */
729
- LegalMonetaryTotal: {
730
- LineExtensionAmount: {
731
- _: number;
732
- currencyID: string;
733
- }[];
734
- TaxExclusiveAmount: {
735
- _: number;
736
- currencyID: string;
737
- }[];
738
- TaxInclusiveAmount: {
739
- _: number;
740
- currencyID: string;
741
- }[];
742
- /** Total allowance (discount) amount at document level (optional) */
743
- AllowanceTotalAmount?: {
744
- _: number;
745
- currencyID: string;
746
- }[];
747
- PayableRoundingAmount: {
748
- _: number;
749
- currencyID: string;
750
- }[];
751
- PayableAmount: {
752
- _: number;
753
- currencyID: string;
754
- }[];
755
- }[];
756
-
757
- /** Invoice line items */
758
- InvoiceLine: {
759
- ID: {
760
- _: string;
761
- }[];
762
- Item: {
763
- CommodityClassification: {
764
- ItemClassificationCode: {
765
- _: string;
766
- listID: string;
767
- }[];
768
- }[];
769
- Description: {
770
- _: string;
771
- }[];
772
- }[];
773
- ItemPriceExtension: {
774
- Amount: {
775
- _: number;
776
- currencyID: string;
777
- }[];
778
- }[];
779
- LineExtensionAmount: {
780
- _: number;
781
- currencyID: string;
782
- }[];
783
- Price: {
784
- PriceAmount: {
785
- _: number;
786
- currencyID: string;
787
- }[];
788
- }[];
789
- /** Line-level discount (AllowanceCharge with ChargeIndicator=false) */
790
- AllowanceCharge?: {
791
- ChargeIndicator: {
792
- _: boolean;
793
- }[];
794
- Amount: {
795
- _: number;
796
- currencyID: string;
797
- }[];
798
- /** Optional when discount is specified by rate */
799
- MultiplierFactorNumeric?: {
800
- _: number;
801
- }[];
802
- /** Optional base amount for discount calculation */
803
- BaseAmount?: {
804
- _: number;
805
- currencyID: string;
806
- }[];
807
- }[];
808
- TaxTotal: {
809
- TaxAmount: {
810
- _: number;
811
- currencyID: string;
812
- }[];
813
- TaxSubtotal: {
814
- TaxableAmount: {
815
- _: number;
816
- currencyID: string;
817
- }[];
818
- TaxAmount: {
819
- _: number;
820
- currencyID: string;
821
- }[];
822
- /** For percentage-based taxation */
823
- Percent?: {
824
- _: number;
825
- }[];
826
- /** For fixed rate taxation - Total Amount per Unit */
827
- PerUnitAmount?: {
828
- _: number;
829
- currencyID: string;
830
- }[];
831
- /** For fixed rate taxation - Number of Units */
832
- BaseUnitMeasure?: {
833
- _: number;
834
- unitCode: string;
835
- }[];
836
- TaxCategory: {
837
- ID: {
838
- _: string;
839
- }[];
840
- TaxScheme: {
841
- ID: {
842
- _: string;
843
- schemeAgencyID: string;
844
- schemeID: string;
845
- }[];
846
- }[];
847
- }[];
848
- }[];
849
- }[];
850
- }[];
851
-
852
- /** Tax exchange rate - Mandatory where applicable */
853
- TaxExchangeRate?: {
854
- SourceCurrencyCode: {
855
- _: string;
856
- }[];
857
- TargetCurrencyCode: {
858
- _: string;
859
- }[];
860
- CalculationRate: {
861
- _: number;
862
- }[];
863
- }[];
864
-
865
- /** UBL Extensions for signatures (optional - only present in signed documents) */
866
- UBLExtensions?: {
867
- UBLExtension: {
868
- ExtensionURI: {
869
- _: string;
870
- }[];
871
- ExtensionContent: {
872
- UBLDocumentSignatures: {
873
- SignatureInformation: {
874
- ID: {
875
- _: string;
876
- }[];
877
- ReferencedSignatureID: {
878
- _: string;
879
- }[];
880
- Signature: {
881
- Id: string;
882
- Object: {
883
- QualifyingProperties: {
884
- Target: string;
885
- SignedProperties: {
886
- Id: string;
887
- SignedSignatureProperties: {
888
- SigningTime: {
889
- _: string;
890
- }[];
891
- SigningCertificate: {
892
- Cert: {
893
- CertDigest: {
894
- DigestMethod: {
895
- /** Optional text content field (required by MyInvois JSON signature spec). Typically blank string */
896
- _?: string;
897
- Algorithm: string;
898
- }[];
899
- DigestValue: {
900
- _: string;
901
- }[];
902
- }[];
903
- IssuerSerial: {
904
- X509IssuerName: {
905
- _: string;
906
- }[];
907
- X509SerialNumber: {
908
- _: string;
909
- }[];
910
- }[];
911
- }[];
912
- }[];
913
- }[];
914
- }[];
915
- }[];
916
- }[];
917
- KeyInfo: {
918
- X509Data: {
919
- X509Certificate: {
920
- _: string;
921
- }[];
922
- X509SubjectName: {
923
- _: string;
924
- }[];
925
- X509IssuerSerial: {
926
- X509IssuerName: {
927
- _: string;
928
- }[];
929
- X509SerialNumber: {
930
- _: string;
931
- }[];
932
- }[];
933
- }[];
934
- }[];
935
- SignatureValue: {
936
- _: string;
937
- }[];
938
- SignedInfo: SignedInfoObject[];
939
- }[];
940
- }[];
941
- }[];
942
- }[];
943
- }[];
944
- }[];
945
-
946
- /** Signature reference (optional - only present in signed documents) */
947
- Signature?: {
948
- ID: {
949
- _: string;
950
- }[];
951
- SignatureMethod: {
952
- _: string;
953
- }[];
954
- }[];
955
-
956
- /** Billing reference linking to original invoice (used for credit/debit/refund). Optional. */
957
- BillingReference?: {
958
- InvoiceDocumentReference: {
959
- /** LHDNM Unique Identifier Number */
960
- UUID: {
961
- _: string;
962
- }[];
963
- /** Internal ID (e-Invoice Code/Number) */
964
- ID: {
965
- _: string;
966
- }[];
967
- }[];
968
- }[];
969
- }
970
-
971
- /** Represents the complete UBL document structure with namespace declarations */
972
- interface UBLDocument {
973
- /** UBL Invoice namespace */
974
- _D: string;
975
- /** UBL CommonAggregateComponents namespace */
976
- _A: string;
977
- /** UBL CommonBasicComponents namespace */
978
- _B: string;
979
- /** Array of invoice submissions */
980
- Invoice: InvoiceSubmission[];
981
- }
982
-
983
- /** Represents the signed properties structure for digital signatures */
984
- interface SignedPropertiesObject {
985
- SignedProperties: {
986
- /** Unique identifier for the signed properties */
987
- Id: string;
988
- /** Signed signature properties containing signing details */
989
- SignedSignatureProperties: {
990
- /** Signing timestamp */
991
- SigningTime: {
992
- _: string;
993
- }[];
994
- /** Signing certificate information */
995
- SigningCertificate: {
996
- /** Certificate details */
997
- Cert: {
998
- /** Certificate digest information */
999
- CertDigest: {
1000
- /** Digest method algorithm */
1001
- DigestMethod: {
1002
- /** Optional text content field (required by MyInvois JSON signature spec). Typically blank string */
1003
- _?: string;
1004
- Algorithm: string;
1005
- }[];
1006
- /** Base64 encoded digest value */
1007
- DigestValue: {
1008
- _: string;
1009
- }[];
1010
- }[];
1011
- /** Certificate issuer and serial information */
1012
- IssuerSerial: {
1013
- /** X.509 issuer distinguished name */
1014
- X509IssuerName: {
1015
- _: string;
1016
- }[];
1017
- /** X.509 certificate serial number */
1018
- X509SerialNumber: {
1019
- _: string;
1020
- }[];
1021
- }[];
1022
- }[];
1023
- }[];
1024
- }[];
1025
- }[];
1026
- }
1027
-
1028
- /** Represents the signed info structure for digital signatures */
1029
- interface SignedInfoObject {
1030
- /** Canonicalization method */
1031
- CanonicalizationMethod: {
1032
- _: string;
1033
- Algorithm: string;
1034
- }[];
1035
- /** Signature method */
1036
- SignatureMethod: {
1037
- _: string;
1038
- Algorithm: string;
1039
- }[];
1040
- /** References being signed */
1041
- Reference: {
1042
- Id: string;
1043
- Type: string;
1044
- URI: string;
1045
- DigestMethod: {
1046
- _: string;
1047
- Algorithm: string;
1048
- }[];
1049
- DigestValue: {
1050
- _: string;
1051
- }[];
1052
- }[];
1053
- }
1054
-
1055
- /** Represents a complete signed invoice with all signature elements */
1056
- interface SignedInvoiceSubmission extends InvoiceSubmission {
1057
- /** UBL Extensions for signatures - required for signed documents */
1058
- UBLExtensions: {
1059
- UBLExtension: {
1060
- ExtensionURI: {
1061
- _: string;
1062
- }[];
1063
- ExtensionContent: {
1064
- UBLDocumentSignatures: {
1065
- SignatureInformation: {
1066
- ID: {
1067
- _: string;
1068
- }[];
1069
- ReferencedSignatureID: {
1070
- _: string;
1071
- }[];
1072
- Signature: {
1073
- Id: string;
1074
- Object: {
1075
- QualifyingProperties: {
1076
- Target: string;
1077
- SignedProperties: {
1078
- Id: string;
1079
- SignedSignatureProperties: {
1080
- SigningTime: {
1081
- _: string;
1082
- }[];
1083
- SigningCertificate: {
1084
- Cert: {
1085
- CertDigest: {
1086
- DigestMethod: {
1087
- /** Optional text content field (required by MyInvois JSON signature spec). Typically blank string */
1088
- _?: string;
1089
- Algorithm: string;
1090
- }[];
1091
- DigestValue: {
1092
- _: string;
1093
- }[];
1094
- }[];
1095
- IssuerSerial: {
1096
- X509IssuerName: {
1097
- _: string;
1098
- }[];
1099
- X509SerialNumber: {
1100
- _: string;
1101
- }[];
1102
- }[];
1103
- }[];
1104
- }[];
1105
- }[];
1106
- }[];
1107
- }[];
1108
- }[];
1109
- KeyInfo: {
1110
- X509Data: {
1111
- X509Certificate: {
1112
- _: string;
1113
- }[];
1114
- X509SubjectName: {
1115
- _: string;
1116
- }[];
1117
- X509IssuerSerial: {
1118
- X509IssuerName: {
1119
- _: string;
1120
- }[];
1121
- X509SerialNumber: {
1122
- _: string;
1123
- }[];
1124
- }[];
1125
- }[];
1126
- }[];
1127
- SignatureValue: {
1128
- _: string;
1129
- }[];
1130
- SignedInfo: SignedInfoObject[];
1131
- }[];
1132
- }[];
1133
- }[];
1134
- }[];
1135
- }[];
1136
- }[];
1137
-
1138
- /** Signature reference - required for signed documents */
1139
- Signature: {
1140
- ID: {
1141
- _: string;
1142
- }[];
1143
- SignatureMethod: {
1144
- _: string;
1145
- }[];
1146
- }[];
1147
- }
1148
- interface CompleteInvoice {
1149
- /** UBL Invoice namespace */
1150
- _D: string;
1151
- /** UBL CommonAggregateComponents namespace */
1152
- _A: string;
1153
- /** UBL CommonBasicComponents namespace */
1154
- _B: string;
1155
- /** Array of signed invoice submissions */
1156
- Invoice: SignedInvoiceSubmission[];
1157
- }
1158
- interface DocumentTypeVersion {
1159
- id: number;
1160
- name: string;
1161
- description: string;
1162
- activeFrom: string;
1163
- activeTo: string;
1164
- versionNumber: number;
1165
- status: 'draft' | 'published' | 'deactivated';
1166
- }
1167
- interface WorkflowParameter {
1168
- id: number;
1169
- parameter: string;
1170
- value: number;
1171
- activeFrom: string;
1172
- activeTo: string;
1173
- }
1174
- interface DocumentTypeResponse {
1175
- id: number;
1176
- invoiceTypeCode: EInvoiceTypeCode;
1177
- description: string;
1178
- activeFrom: string;
1179
- activeTo: string;
1180
- documentTypeVersions: DocumentTypeVersion[];
1181
- workflowParameters: WorkflowParameter[];
1182
- }
1183
- interface DocumentTypesResponse {
1184
- result: Omit<DocumentTypeResponse, 'workflowParameters'>[];
1185
- }
1186
- interface DocumentTypeVersionResponse {
1187
- invoiceTypeCode: EInvoiceTypeCode;
1188
- name: string;
1189
- description: string;
1190
- versionNumber: number;
1191
- status: 'published' | 'deactivated';
1192
- activeFrom: string;
1193
- activeTo: string;
1194
- }
1195
- //#endregion
1196
- export { Address, AllDocumentsV1_1, Buyer, CompleteInvoice, CreditNoteV1_1, DebitNoteV1_1, DocumentStatus, DocumentSummary, DocumentTypeResponse, DocumentTypeVersion, DocumentTypeVersionResponse, DocumentTypesResponse, DocumentValidationResult, DocumentValidationStepResult, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, LegalMonetaryTotal, RefundNoteV1_1, RegistrationType, ResponseDocument, SelfBilledCreditNoteV1_1, SelfBilledInvoiceV1_1, SelfBilledRefundNoteV1_1, SignedInfoObject, SignedInvoiceSubmission, SignedPropertiesData, SignedPropertiesObject, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, UBLDocument, WorkflowParameter };