@ripwords/myinvois-client 0.4.0 → 0.4.1

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 (515) hide show
  1. package/dist/0X-Cr3M7hci.d.cts +211 -0
  2. package/dist/0X-bPhcc9Vv.d.ts +211 -0
  3. package/dist/1X-Bqi8dmY1.d.ts +20 -0
  4. package/dist/1X-CWwmfCzo.d.cts +112 -0
  5. package/dist/1X-DKHYQyRy.d.ts +112 -0
  6. package/dist/1X-DYw2tURz.d.cts +20 -0
  7. package/dist/2X-CXtqiwRg.d.cts +40 -0
  8. package/dist/2X-CemxuAeL.d.ts +40 -0
  9. package/dist/2X-DN6M21cV.d.ts +140 -0
  10. package/dist/2X-DNtkJ0tj.d.cts +140 -0
  11. package/dist/3X-BOxfatu3.d.cts +62 -0
  12. package/dist/3X-Bk_fUIAk.d.cts +21 -0
  13. package/dist/3X-DIYh_ue4.d.ts +21 -0
  14. package/dist/3X-DJRj5xLv.d.ts +62 -0
  15. package/dist/4X-BCvTomUF.d.ts +265 -0
  16. package/dist/4X-C7fzDWJ_.d.cts +265 -0
  17. package/dist/4X-CK9rj5qd.d.cts +31 -0
  18. package/dist/4X-CZi5nwIr.d.ts +31 -0
  19. package/dist/5X-CNAFsDm2.d.cts +77 -0
  20. package/dist/5X-CpAvNxvd.d.cts +22 -0
  21. package/dist/5X-Dji6Soz5.d.ts +77 -0
  22. package/dist/5X-DyYBCAvY.d.ts +22 -0
  23. package/dist/6X-CO_u4RIY.d.ts +105 -0
  24. package/dist/6X-Csxu6lwi.d.ts +16 -0
  25. package/dist/6X-bXWr_7xY.d.cts +16 -0
  26. package/dist/6X-uObUP4VG.d.cts +105 -0
  27. package/dist/7X-BJBOlWhV.d.cts +16 -0
  28. package/dist/7X-BifJnY24.d.cts +71 -0
  29. package/dist/7X-DivvfBsk.d.ts +16 -0
  30. package/dist/7X-vzJ01lNF.d.ts +71 -0
  31. package/dist/8X-C4Wf4jYK.d.ts +110 -0
  32. package/dist/8X-D_Pw1H3K.d.ts +19 -0
  33. package/dist/8X-DioBXCJ0.d.cts +110 -0
  34. package/dist/8X-dshwiOxU.d.cts +19 -0
  35. package/dist/9X-1VwxN9g-.d.ts +98 -0
  36. package/dist/9X-9j2Djy4W.d.cts +15 -0
  37. package/dist/9X-BjffnXuq.d.cts +98 -0
  38. package/dist/9X-BwR9pibT.d.ts +15 -0
  39. package/dist/AX-CDubGAZO.d.ts +111 -0
  40. package/dist/AX-CWCopjCC.d.cts +111 -0
  41. package/dist/BX-CBsKI8np.d.ts +115 -0
  42. package/dist/BX-Cq7WdhD3.d.cts +115 -0
  43. package/dist/CX-DhOdAFyg.d.ts +128 -0
  44. package/dist/CX-DlcVZfxx.d.cts +128 -0
  45. package/dist/DX-CBiRJGqR.d.ts +115 -0
  46. package/dist/DX-DLdv-Nxj.d.cts +115 -0
  47. package/dist/EX-CAn62WaX.d.ts +107 -0
  48. package/dist/EX-CIJv8-Lw.d.cts +107 -0
  49. package/dist/FX-CANpsLC4.d.ts +127 -0
  50. package/dist/FX-DlDM_Zea.d.cts +127 -0
  51. package/dist/GX-BFGNX6Jy.d.cts +136 -0
  52. package/dist/GX-BvSZZ8pE.d.ts +136 -0
  53. package/dist/HX-CxrnY-YC.d.ts +126 -0
  54. package/dist/HX-D7Y9qRSm.d.cts +126 -0
  55. package/dist/IX-DPTrbhgX.d.cts +23 -0
  56. package/dist/IX-wdAD6eW8.d.ts +23 -0
  57. package/dist/JX-B5v815to.d.ts +104 -0
  58. package/dist/JX-D8JmtNpo.d.cts +104 -0
  59. package/dist/KX-B46KJZrH.d.cts +151 -0
  60. package/dist/KX-BI8n7ACj.d.ts +151 -0
  61. package/dist/LX-BVvEz6Ji.d.ts +123 -0
  62. package/dist/LX-CfTKy8Sx.d.cts +123 -0
  63. package/dist/MX-BKJ4gNvV.d.cts +153 -0
  64. package/dist/MX-D_OsOP_v.d.ts +153 -0
  65. package/dist/NX-CSdLIFqU.d.cts +122 -0
  66. package/dist/NX-DIhAzAY3.d.ts +122 -0
  67. package/dist/OX-BZrRnj5g.d.ts +26 -0
  68. package/dist/OX-BwqOsulT.d.cts +26 -0
  69. package/dist/PX-BTx0TXsJ.d.cts +121 -0
  70. package/dist/PX-DGGrJNym.d.ts +121 -0
  71. package/dist/QX-BUXR8RJL.d.cts +59 -0
  72. package/dist/QX-DuTJFnHX.d.ts +59 -0
  73. package/dist/RX-CZ8HiH37.d.cts +23 -0
  74. package/dist/RX-DYQoV7am.d.ts +23 -0
  75. package/dist/SX-CLxsqiQk.d.cts +40 -0
  76. package/dist/SX-Dl1RlNnc.d.ts +40 -0
  77. package/dist/TX-DKc8hLc4.d.cts +31 -0
  78. package/dist/TX-SoIfFaZj.d.ts +31 -0
  79. package/dist/UX-DqBfrSsY.d.ts +18 -0
  80. package/dist/UX-bc7xDnZI.d.cts +18 -0
  81. package/dist/VX-Ahcpp3Si.d.ts +17 -0
  82. package/dist/VX-CIHTFyoC.d.cts +17 -0
  83. package/dist/WX-BHvlq7Jx.d.cts +26 -0
  84. package/dist/WX-Di6vYD7A.d.ts +26 -0
  85. package/dist/XX-BE4flzh6.d.ts +828 -0
  86. package/dist/XX-DztQxYHJ.d.cts +828 -0
  87. package/dist/YX-BPO04gSZ.d.ts +20 -0
  88. package/dist/YX-CkxLeFb4.d.cts +20 -0
  89. package/dist/ZX-DHu4FRKS.d.ts +22 -0
  90. package/dist/ZX-DVb_buNI.d.cts +22 -0
  91. package/dist/{index2.cjs → api/documentManagement.cjs} +1 -1
  92. package/dist/api/documentManagement.d.cts +90 -0
  93. package/dist/api/documentManagement.d.ts +90 -0
  94. package/dist/api/documentManagement.js +3 -0
  95. package/dist/{index3.cjs → api/documentSubmission.cjs} +3 -3
  96. package/dist/api/documentSubmission.d.cts +93 -0
  97. package/dist/api/documentSubmission.d.ts +93 -0
  98. package/dist/api/documentSubmission.js +5 -0
  99. package/dist/{index4.cjs → api/documentTypeManagement.cjs} +1 -1
  100. package/dist/api/documentTypeManagement.d.cts +71 -0
  101. package/dist/api/documentTypeManagement.d.ts +71 -0
  102. package/dist/api/documentTypeManagement.js +3 -0
  103. package/dist/api/notificationManagement.cjs +3 -0
  104. package/dist/api/notificationManagement.d.cts +69 -0
  105. package/dist/api/notificationManagement.d.ts +69 -0
  106. package/dist/api/notificationManagement.js +3 -0
  107. package/dist/api/platformLogin.cjs +3 -0
  108. package/dist/api/platformLogin.d.cts +69 -0
  109. package/dist/api/platformLogin.d.ts +69 -0
  110. package/dist/api/platformLogin.js +3 -0
  111. package/dist/api/taxpayerValidation.cjs +6 -0
  112. package/dist/api/taxpayerValidation.d.cts +72 -0
  113. package/dist/api/taxpayerValidation.d.ts +72 -0
  114. package/dist/api/taxpayerValidation.js +4 -0
  115. package/dist/apiQueue-B6Q644Bz.js +202 -0
  116. package/dist/apiQueue-B6Q644Bz.js.map +1 -0
  117. package/dist/certificate-Cg6spxUs.js +52 -0
  118. package/dist/certificate-Cg6spxUs.js.map +1 -0
  119. package/dist/classification-codes-B15PbWxz.d.cts +118 -0
  120. package/dist/classification-codes-BQMnAQFr.d.ts +118 -0
  121. package/dist/country-code-DAejE5RV.d.ts +543 -0
  122. package/dist/country-code-DPeNFMMi.d.cts +543 -0
  123. package/dist/currencies-Cg9RkxRB.d.ts +208 -0
  124. package/dist/currencies-S5g1gzBU.d.cts +208 -0
  125. package/dist/document-BC52NCdW.js +653 -0
  126. package/dist/document-BC52NCdW.js.map +1 -0
  127. package/dist/document-BQdoGqOl.d.cts +157 -0
  128. package/dist/document-CnamySca.d.ts +157 -0
  129. package/dist/documentManagement-DZKm582-.js +51 -0
  130. package/dist/documentManagement-DZKm582-.js.map +1 -0
  131. package/dist/documentSubmission-DSsX0ldK.js +136 -0
  132. package/dist/documentSubmission-DSsX0ldK.js.map +1 -0
  133. package/dist/documentTypeManagement-cBtVCOY3.js +23 -0
  134. package/dist/documentTypeManagement-cBtVCOY3.js.map +1 -0
  135. package/dist/documents-BpZn3hJq.d.ts +1197 -0
  136. package/dist/documents-D_V38Q_U.d.cts +1197 -0
  137. package/dist/e-invoice-BSCFsH-H.d.ts +44 -0
  138. package/dist/e-invoice-BuwtFnlI.d.cts +44 -0
  139. package/dist/formatIdValue-qTxJqj9o.js +8 -0
  140. package/dist/formatIdValue-qTxJqj9o.js.map +1 -0
  141. package/dist/getBaseUrl-D7nUmoYb.js +8 -0
  142. package/dist/getBaseUrl-D7nUmoYb.js.map +1 -0
  143. package/dist/index-Dn3JIREW.d.ts +16 -0
  144. package/dist/index-Yr1QAbIF.d.cts +16 -0
  145. package/dist/index.d.cts +616 -0
  146. package/dist/index.d.ts +616 -0
  147. package/dist/index.js +629 -0
  148. package/dist/index.js.map +1 -0
  149. package/dist/lineItems-Btjkf6VX.js +58 -0
  150. package/dist/lineItems-Btjkf6VX.js.map +1 -0
  151. package/dist/lineItems-CBSo7giH.d.cts +32 -0
  152. package/dist/lineItems-CrkEXi2m.d.ts +32 -0
  153. package/dist/msic-codes-CIKdPqag.d.cts +26 -0
  154. package/dist/msic-codes-kysVPGdN.d.ts +26 -0
  155. package/dist/notificationManagement-n4Z5e-My.js +20 -0
  156. package/dist/notificationManagement-n4Z5e-My.js.map +1 -0
  157. package/dist/notifications-B4BymhRJ.d.ts +63 -0
  158. package/dist/notifications-DdlEkprb.d.cts +63 -0
  159. package/dist/payment-modes-7c1lWlIr.d.cts +44 -0
  160. package/dist/payment-modes-BGP5McTY.d.ts +44 -0
  161. package/dist/platformLogin-CqI9OLYP.js +40 -0
  162. package/dist/platformLogin-CqI9OLYP.js.map +1 -0
  163. package/dist/signatures-Bk5aKcq6.d.ts +173 -0
  164. package/dist/signatures-CyDSZr_e.d.cts +173 -0
  165. package/dist/state-codes-CAkYQnTd.d.ts +62 -0
  166. package/dist/state-codes-u3ppueWo.d.cts +62 -0
  167. package/dist/tax-types-QeZFKqew.d.ts +42 -0
  168. package/dist/tax-types-fu5Q6dic.d.cts +42 -0
  169. package/dist/taxpayer-B1CSMqNS.d.ts +36 -0
  170. package/dist/taxpayer-DwGzY1IL.d.cts +36 -0
  171. package/dist/taxpayerValidation-Xd_EHDvk.js +48 -0
  172. package/dist/taxpayerValidation-Xd_EHDvk.js.map +1 -0
  173. package/dist/{index17.cjs → types/classification-codes.d.cjs} +1 -1
  174. package/dist/types/classification-codes.d.cjs.map +1 -0
  175. package/dist/types/classification-codes.d.cts +2 -0
  176. package/dist/types/classification-codes.d.ts +2 -0
  177. package/dist/{index18.cjs → types/country-code.d.cjs} +1 -1
  178. package/dist/types/country-code.d.cjs.map +1 -0
  179. package/dist/types/country-code.d.cts +2 -0
  180. package/dist/types/country-code.d.ts +2 -0
  181. package/dist/{index19.cjs → types/currencies.d.cjs} +1 -1
  182. package/dist/types/currencies.d.cjs.map +1 -0
  183. package/dist/types/currencies.d.cts +2 -0
  184. package/dist/types/currencies.d.ts +2 -0
  185. package/dist/types/documents.d.cts +55 -0
  186. package/dist/types/documents.d.ts +55 -0
  187. package/dist/{index21.cjs → types/e-invoice.d.cjs} +1 -1
  188. package/dist/types/e-invoice.d.cjs.map +1 -0
  189. package/dist/types/e-invoice.d.cts +2 -0
  190. package/dist/types/e-invoice.d.ts +2 -0
  191. package/dist/types/index.d.cts +61 -0
  192. package/dist/types/index.d.ts +61 -0
  193. package/dist/{index32.cjs → types/msic/0X.d.cjs} +1 -1
  194. package/dist/types/msic/0X.d.cjs.map +1 -0
  195. package/dist/types/msic/0X.d.cts +2 -0
  196. package/dist/types/msic/0X.d.ts +2 -0
  197. package/dist/{index33.cjs → types/msic/1X.d.cjs} +1 -1
  198. package/dist/types/msic/1X.d.cjs.map +1 -0
  199. package/dist/types/msic/1X.d.cts +2 -0
  200. package/dist/types/msic/1X.d.ts +2 -0
  201. package/dist/{index34.cjs → types/msic/2X.d.cjs} +1 -1
  202. package/dist/types/msic/2X.d.cjs.map +1 -0
  203. package/dist/types/msic/2X.d.cts +2 -0
  204. package/dist/types/msic/2X.d.ts +2 -0
  205. package/dist/{index35.cjs → types/msic/3X.d.cjs} +1 -1
  206. package/dist/types/msic/3X.d.cjs.map +1 -0
  207. package/dist/types/msic/3X.d.cts +2 -0
  208. package/dist/types/msic/3X.d.ts +2 -0
  209. package/dist/{index36.cjs → types/msic/4X.d.cjs} +1 -1
  210. package/dist/types/msic/4X.d.cjs.map +1 -0
  211. package/dist/types/msic/4X.d.cts +2 -0
  212. package/dist/types/msic/4X.d.ts +2 -0
  213. package/dist/{index37.cjs → types/msic/5X.d.cjs} +1 -1
  214. package/dist/types/msic/5X.d.cjs.map +1 -0
  215. package/dist/types/msic/5X.d.cts +2 -0
  216. package/dist/types/msic/5X.d.ts +2 -0
  217. package/dist/{index38.cjs → types/msic/6X.d.cjs} +1 -1
  218. package/dist/types/msic/6X.d.cjs.map +1 -0
  219. package/dist/types/msic/6X.d.cts +2 -0
  220. package/dist/types/msic/6X.d.ts +2 -0
  221. package/dist/{index39.cjs → types/msic/7X.d.cjs} +1 -1
  222. package/dist/types/msic/7X.d.cjs.map +1 -0
  223. package/dist/types/msic/7X.d.cts +2 -0
  224. package/dist/types/msic/7X.d.ts +2 -0
  225. package/dist/{index40.cjs → types/msic/8X.d.cjs} +1 -1
  226. package/dist/types/msic/8X.d.cjs.map +1 -0
  227. package/dist/types/msic/8X.d.cts +2 -0
  228. package/dist/types/msic/8X.d.ts +2 -0
  229. package/dist/{index41.cjs → types/msic/9X.d.cjs} +1 -1
  230. package/dist/types/msic/9X.d.cjs.map +1 -0
  231. package/dist/types/msic/9X.d.cts +2 -0
  232. package/dist/types/msic/9X.d.ts +2 -0
  233. package/dist/types/msic-codes.d.cts +12 -0
  234. package/dist/types/msic-codes.d.ts +12 -0
  235. package/dist/{index24.cjs → types/notifications.d.cjs} +1 -1
  236. package/dist/types/notifications.d.cjs.map +1 -0
  237. package/dist/types/notifications.d.cts +2 -0
  238. package/dist/types/notifications.d.ts +2 -0
  239. package/dist/{index25.cjs → types/payment-modes.d.cjs} +1 -1
  240. package/dist/types/payment-modes.d.cjs.map +1 -0
  241. package/dist/types/payment-modes.d.cts +2 -0
  242. package/dist/types/payment-modes.d.ts +2 -0
  243. package/dist/types/signatures.d.cts +2 -0
  244. package/dist/types/signatures.d.ts +2 -0
  245. package/dist/{index27.cjs → types/state-codes.d.cjs} +1 -1
  246. package/dist/types/state-codes.d.cjs.map +1 -0
  247. package/dist/types/state-codes.d.cts +2 -0
  248. package/dist/types/state-codes.d.ts +2 -0
  249. package/dist/{index28.cjs → types/tax-types.d.cjs} +1 -1
  250. package/dist/types/tax-types.d.cjs.map +1 -0
  251. package/dist/types/tax-types.d.cts +2 -0
  252. package/dist/types/tax-types.d.ts +2 -0
  253. package/dist/types/taxpayer.d.cts +56 -0
  254. package/dist/types/taxpayer.d.ts +56 -0
  255. package/dist/{index42.cjs → types/unit/1X.d.cjs} +1 -1
  256. package/dist/types/unit/1X.d.cjs.map +1 -0
  257. package/dist/types/unit/1X.d.cts +2 -0
  258. package/dist/types/unit/1X.d.ts +2 -0
  259. package/dist/{index43.cjs → types/unit/2X.d.cjs} +1 -1
  260. package/dist/types/unit/2X.d.cjs.map +1 -0
  261. package/dist/types/unit/2X.d.cts +2 -0
  262. package/dist/types/unit/2X.d.ts +2 -0
  263. package/dist/{index44.cjs → types/unit/3X.d.cjs} +1 -1
  264. package/dist/types/unit/3X.d.cjs.map +1 -0
  265. package/dist/types/unit/3X.d.cts +2 -0
  266. package/dist/types/unit/3X.d.ts +2 -0
  267. package/dist/{index45.cjs → types/unit/4X.d.cjs} +1 -1
  268. package/dist/types/unit/4X.d.cjs.map +1 -0
  269. package/dist/types/unit/4X.d.cts +2 -0
  270. package/dist/types/unit/4X.d.ts +2 -0
  271. package/dist/{index46.cjs → types/unit/5X.d.cjs} +1 -1
  272. package/dist/types/unit/5X.d.cjs.map +1 -0
  273. package/dist/types/unit/5X.d.cts +2 -0
  274. package/dist/types/unit/5X.d.ts +2 -0
  275. package/dist/{index47.cjs → types/unit/6X.d.cjs} +1 -1
  276. package/dist/types/unit/6X.d.cjs.map +1 -0
  277. package/dist/types/unit/6X.d.cts +2 -0
  278. package/dist/types/unit/6X.d.ts +2 -0
  279. package/dist/{index48.cjs → types/unit/7X.d.cjs} +1 -1
  280. package/dist/types/unit/7X.d.cjs.map +1 -0
  281. package/dist/types/unit/7X.d.cts +2 -0
  282. package/dist/types/unit/7X.d.ts +2 -0
  283. package/dist/{index49.cjs → types/unit/8X.d.cjs} +1 -1
  284. package/dist/types/unit/8X.d.cjs.map +1 -0
  285. package/dist/types/unit/8X.d.cts +2 -0
  286. package/dist/types/unit/8X.d.ts +2 -0
  287. package/dist/{index50.cjs → types/unit/9X.d.cjs} +1 -1
  288. package/dist/types/unit/9X.d.cjs.map +1 -0
  289. package/dist/types/unit/9X.d.cts +2 -0
  290. package/dist/types/unit/9X.d.ts +2 -0
  291. package/dist/{index51.cjs → types/unit/AX.d.cjs} +1 -1
  292. package/dist/types/unit/AX.d.cjs.map +1 -0
  293. package/dist/types/unit/AX.d.cts +2 -0
  294. package/dist/types/unit/AX.d.ts +2 -0
  295. package/dist/{index52.cjs → types/unit/BX.d.cjs} +1 -1
  296. package/dist/types/unit/BX.d.cjs.map +1 -0
  297. package/dist/types/unit/BX.d.cts +2 -0
  298. package/dist/types/unit/BX.d.ts +2 -0
  299. package/dist/{index53.cjs → types/unit/CX.d.cjs} +1 -1
  300. package/dist/types/unit/CX.d.cjs.map +1 -0
  301. package/dist/types/unit/CX.d.cts +2 -0
  302. package/dist/types/unit/CX.d.ts +2 -0
  303. package/dist/{index54.cjs → types/unit/DX.d.cjs} +1 -1
  304. package/dist/types/unit/DX.d.cjs.map +1 -0
  305. package/dist/types/unit/DX.d.cts +2 -0
  306. package/dist/types/unit/DX.d.ts +2 -0
  307. package/dist/{index55.cjs → types/unit/EX.d.cjs} +1 -1
  308. package/dist/types/unit/EX.d.cjs.map +1 -0
  309. package/dist/types/unit/EX.d.cts +2 -0
  310. package/dist/types/unit/EX.d.ts +2 -0
  311. package/dist/{index56.cjs → types/unit/FX.d.cjs} +1 -1
  312. package/dist/types/unit/FX.d.cjs.map +1 -0
  313. package/dist/types/unit/FX.d.cts +2 -0
  314. package/dist/types/unit/FX.d.ts +2 -0
  315. package/dist/{index57.cjs → types/unit/GX.d.cjs} +1 -1
  316. package/dist/types/unit/GX.d.cjs.map +1 -0
  317. package/dist/types/unit/GX.d.cts +2 -0
  318. package/dist/types/unit/GX.d.ts +2 -0
  319. package/dist/{index58.cjs → types/unit/HX.d.cjs} +1 -1
  320. package/dist/types/unit/HX.d.cjs.map +1 -0
  321. package/dist/types/unit/HX.d.cts +2 -0
  322. package/dist/types/unit/HX.d.ts +2 -0
  323. package/dist/{index59.cjs → types/unit/IX.d.cjs} +1 -1
  324. package/dist/types/unit/IX.d.cjs.map +1 -0
  325. package/dist/types/unit/IX.d.cts +2 -0
  326. package/dist/types/unit/IX.d.ts +2 -0
  327. package/dist/{index60.cjs → types/unit/JX.d.cjs} +1 -1
  328. package/dist/types/unit/JX.d.cjs.map +1 -0
  329. package/dist/types/unit/JX.d.cts +2 -0
  330. package/dist/types/unit/JX.d.ts +2 -0
  331. package/dist/{index61.cjs → types/unit/KX.d.cjs} +1 -1
  332. package/dist/types/unit/KX.d.cjs.map +1 -0
  333. package/dist/types/unit/KX.d.cts +2 -0
  334. package/dist/types/unit/KX.d.ts +2 -0
  335. package/dist/{index62.cjs → types/unit/LX.d.cjs} +1 -1
  336. package/dist/types/unit/LX.d.cjs.map +1 -0
  337. package/dist/types/unit/LX.d.cts +2 -0
  338. package/dist/types/unit/LX.d.ts +2 -0
  339. package/dist/{index63.cjs → types/unit/MX.d.cjs} +1 -1
  340. package/dist/types/unit/MX.d.cjs.map +1 -0
  341. package/dist/types/unit/MX.d.cts +2 -0
  342. package/dist/types/unit/MX.d.ts +2 -0
  343. package/dist/{index64.cjs → types/unit/NX.d.cjs} +1 -1
  344. package/dist/types/unit/NX.d.cjs.map +1 -0
  345. package/dist/types/unit/NX.d.cts +2 -0
  346. package/dist/types/unit/NX.d.ts +2 -0
  347. package/dist/{index65.cjs → types/unit/OX.d.cjs} +1 -1
  348. package/dist/types/unit/OX.d.cjs.map +1 -0
  349. package/dist/types/unit/OX.d.cts +2 -0
  350. package/dist/types/unit/OX.d.ts +2 -0
  351. package/dist/{index66.cjs → types/unit/PX.d.cjs} +1 -1
  352. package/dist/types/unit/PX.d.cjs.map +1 -0
  353. package/dist/types/unit/PX.d.cts +2 -0
  354. package/dist/types/unit/PX.d.ts +2 -0
  355. package/dist/{index67.cjs → types/unit/QX.d.cjs} +1 -1
  356. package/dist/types/unit/QX.d.cjs.map +1 -0
  357. package/dist/types/unit/QX.d.cts +2 -0
  358. package/dist/types/unit/QX.d.ts +2 -0
  359. package/dist/{index68.cjs → types/unit/RX.d.cjs} +1 -1
  360. package/dist/types/unit/RX.d.cjs.map +1 -0
  361. package/dist/types/unit/RX.d.cts +2 -0
  362. package/dist/types/unit/RX.d.ts +2 -0
  363. package/dist/{index69.cjs → types/unit/SX.d.cjs} +1 -1
  364. package/dist/types/unit/SX.d.cjs.map +1 -0
  365. package/dist/types/unit/SX.d.cts +2 -0
  366. package/dist/types/unit/SX.d.ts +2 -0
  367. package/dist/{index70.cjs → types/unit/TX.d.cjs} +1 -1
  368. package/dist/types/unit/TX.d.cjs.map +1 -0
  369. package/dist/types/unit/TX.d.cts +2 -0
  370. package/dist/types/unit/TX.d.ts +2 -0
  371. package/dist/{index71.cjs → types/unit/UX.d.cjs} +1 -1
  372. package/dist/types/unit/UX.d.cjs.map +1 -0
  373. package/dist/types/unit/UX.d.cts +2 -0
  374. package/dist/types/unit/UX.d.ts +2 -0
  375. package/dist/{index72.cjs → types/unit/VX.d.cjs} +1 -1
  376. package/dist/types/unit/VX.d.cjs.map +1 -0
  377. package/dist/types/unit/VX.d.cts +2 -0
  378. package/dist/types/unit/VX.d.ts +2 -0
  379. package/dist/{index73.cjs → types/unit/WX.d.cjs} +1 -1
  380. package/dist/types/unit/WX.d.cjs.map +1 -0
  381. package/dist/types/unit/WX.d.cts +2 -0
  382. package/dist/types/unit/WX.d.ts +2 -0
  383. package/dist/{index74.cjs → types/unit/XX.d.cjs} +1 -1
  384. package/dist/types/unit/XX.d.cjs.map +1 -0
  385. package/dist/types/unit/XX.d.cts +2 -0
  386. package/dist/types/unit/XX.d.ts +2 -0
  387. package/dist/{index75.cjs → types/unit/YX.d.cjs} +1 -1
  388. package/dist/types/unit/YX.d.cjs.map +1 -0
  389. package/dist/types/unit/YX.d.cts +2 -0
  390. package/dist/types/unit/YX.d.ts +2 -0
  391. package/dist/{index76.cjs → types/unit/ZX.d.cjs} +1 -1
  392. package/dist/types/unit/ZX.d.cjs.map +1 -0
  393. package/dist/types/unit/ZX.d.cts +2 -0
  394. package/dist/types/unit/ZX.d.ts +2 -0
  395. package/dist/types/unit-types.d.cts +37 -0
  396. package/dist/types/unit-types.d.ts +37 -0
  397. package/dist/types/utils.d.cts +2 -0
  398. package/dist/types/utils.d.ts +2 -0
  399. package/dist/unit-types-BXdufGWm.d.cts +56 -0
  400. package/dist/unit-types-CZdxXbVN.d.ts +56 -0
  401. package/dist/{index8.cjs → utils/apiQueue.cjs} +1 -1
  402. package/dist/utils/apiQueue.d.cts +46 -0
  403. package/dist/utils/apiQueue.d.ts +46 -0
  404. package/dist/utils/apiQueue.js +3 -0
  405. package/dist/{index9.cjs → utils/base64.cjs} +1 -1
  406. package/dist/utils/base64.cjs.map +1 -0
  407. package/dist/utils/base64.d.cts +6 -0
  408. package/dist/utils/base64.d.ts +6 -0
  409. package/dist/utils/base64.js +11 -0
  410. package/dist/utils/base64.js.map +1 -0
  411. package/dist/utils/certificate.cjs +7 -0
  412. package/dist/utils/certificate.d.cts +78 -0
  413. package/dist/utils/certificate.d.ts +78 -0
  414. package/dist/utils/certificate.js +5 -0
  415. package/dist/{index11.cjs → utils/document.cjs} +2 -2
  416. package/dist/utils/document.d.cts +62 -0
  417. package/dist/utils/document.d.ts +62 -0
  418. package/dist/utils/document.js +4 -0
  419. package/dist/utils/formatIdValue.cjs +3 -0
  420. package/dist/utils/formatIdValue.d.cts +5 -0
  421. package/dist/utils/formatIdValue.d.ts +5 -0
  422. package/dist/utils/formatIdValue.js +3 -0
  423. package/dist/utils/getBaseUrl.cjs +3 -0
  424. package/dist/utils/getBaseUrl.d.cts +5 -0
  425. package/dist/utils/getBaseUrl.d.ts +5 -0
  426. package/dist/utils/getBaseUrl.js +3 -0
  427. package/dist/utils/lineItems.cjs +3 -0
  428. package/dist/utils/lineItems.d.cts +62 -0
  429. package/dist/utils/lineItems.d.ts +62 -0
  430. package/dist/utils/lineItems.js +3 -0
  431. package/dist/{index15.cjs → utils/signature-diagnostics.cjs} +3 -3
  432. package/dist/utils/signature-diagnostics.cjs.map +1 -0
  433. package/dist/utils/signature-diagnostics.d.cts +97 -0
  434. package/dist/utils/signature-diagnostics.d.ts +97 -0
  435. package/dist/utils/signature-diagnostics.js +328 -0
  436. package/dist/utils/signature-diagnostics.js.map +1 -0
  437. package/dist/{index16.cjs → utils/validation.cjs} +1 -1
  438. package/dist/utils/validation.cjs.map +1 -0
  439. package/dist/utils/validation.d.cts +109 -0
  440. package/dist/utils/validation.d.ts +109 -0
  441. package/dist/utils/validation.js +187 -0
  442. package/dist/utils/validation.js.map +1 -0
  443. package/dist/utils-BYVq373g.d.ts +5 -0
  444. package/dist/utils-Cdqbbzca.d.cts +5 -0
  445. package/package.json +17 -7
  446. package/dist/index10.cjs +0 -7
  447. package/dist/index12.cjs +0 -3
  448. package/dist/index13.cjs +0 -3
  449. package/dist/index14.cjs +0 -3
  450. package/dist/index15.cjs.map +0 -1
  451. package/dist/index16.cjs.map +0 -1
  452. package/dist/index17.cjs.map +0 -1
  453. package/dist/index18.cjs.map +0 -1
  454. package/dist/index19.cjs.map +0 -1
  455. package/dist/index21.cjs.map +0 -1
  456. package/dist/index24.cjs.map +0 -1
  457. package/dist/index25.cjs.map +0 -1
  458. package/dist/index27.cjs.map +0 -1
  459. package/dist/index28.cjs.map +0 -1
  460. package/dist/index32.cjs.map +0 -1
  461. package/dist/index33.cjs.map +0 -1
  462. package/dist/index34.cjs.map +0 -1
  463. package/dist/index35.cjs.map +0 -1
  464. package/dist/index36.cjs.map +0 -1
  465. package/dist/index37.cjs.map +0 -1
  466. package/dist/index38.cjs.map +0 -1
  467. package/dist/index39.cjs.map +0 -1
  468. package/dist/index40.cjs.map +0 -1
  469. package/dist/index41.cjs.map +0 -1
  470. package/dist/index42.cjs.map +0 -1
  471. package/dist/index43.cjs.map +0 -1
  472. package/dist/index44.cjs.map +0 -1
  473. package/dist/index45.cjs.map +0 -1
  474. package/dist/index46.cjs.map +0 -1
  475. package/dist/index47.cjs.map +0 -1
  476. package/dist/index48.cjs.map +0 -1
  477. package/dist/index49.cjs.map +0 -1
  478. package/dist/index5.cjs +0 -3
  479. package/dist/index50.cjs.map +0 -1
  480. package/dist/index51.cjs.map +0 -1
  481. package/dist/index52.cjs.map +0 -1
  482. package/dist/index53.cjs.map +0 -1
  483. package/dist/index54.cjs.map +0 -1
  484. package/dist/index55.cjs.map +0 -1
  485. package/dist/index56.cjs.map +0 -1
  486. package/dist/index57.cjs.map +0 -1
  487. package/dist/index58.cjs.map +0 -1
  488. package/dist/index59.cjs.map +0 -1
  489. package/dist/index6.cjs +0 -3
  490. package/dist/index60.cjs.map +0 -1
  491. package/dist/index61.cjs.map +0 -1
  492. package/dist/index62.cjs.map +0 -1
  493. package/dist/index63.cjs.map +0 -1
  494. package/dist/index64.cjs.map +0 -1
  495. package/dist/index65.cjs.map +0 -1
  496. package/dist/index66.cjs.map +0 -1
  497. package/dist/index67.cjs.map +0 -1
  498. package/dist/index68.cjs.map +0 -1
  499. package/dist/index69.cjs.map +0 -1
  500. package/dist/index7.cjs +0 -6
  501. package/dist/index70.cjs.map +0 -1
  502. package/dist/index71.cjs.map +0 -1
  503. package/dist/index72.cjs.map +0 -1
  504. package/dist/index73.cjs.map +0 -1
  505. package/dist/index74.cjs.map +0 -1
  506. package/dist/index75.cjs.map +0 -1
  507. package/dist/index76.cjs.map +0 -1
  508. package/dist/index9.cjs.map +0 -1
  509. /package/dist/{index20.cjs → types/documents.d.cjs} +0 -0
  510. /package/dist/{index22.cjs → types/index.d.cjs} +0 -0
  511. /package/dist/{index23.cjs → types/msic-codes.d.cjs} +0 -0
  512. /package/dist/{index26.cjs → types/signatures.d.cjs} +0 -0
  513. /package/dist/{index29.cjs → types/taxpayer.d.cjs} +0 -0
  514. /package/dist/{index30.cjs → types/unit-types.d.cjs} +0 -0
  515. /package/dist/{index31.cjs → types/utils.d.cjs} +0 -0
@@ -0,0 +1,616 @@
1
+ import { Classification, ClassificationCode, ClassificationCodeEnum } from "./classification-codes-BQMnAQFr.js";
2
+ import { Country, CountryCode, CountryCodeEnum, CountryNameEnum } from "./country-code-DAejE5RV.js";
3
+ import { Currency, CurrencyCode, CurrencyCodeEnum } from "./currencies-Cg9RkxRB.js";
4
+ import { EInvoiceType, EInvoiceTypeCode, EInvoiceTypeCodeEnum } from "./e-invoice-BSCFsH-H.js";
5
+ import "./0X-bPhcc9Vv.js";
6
+ import "./1X-DKHYQyRy.js";
7
+ import "./2X-DN6M21cV.js";
8
+ import "./3X-DJRj5xLv.js";
9
+ import "./4X-BCvTomUF.js";
10
+ import "./5X-Dji6Soz5.js";
11
+ import "./6X-CO_u4RIY.js";
12
+ import "./7X-vzJ01lNF.js";
13
+ import "./8X-C4Wf4jYK.js";
14
+ import "./9X-1VwxN9g-.js";
15
+ import { MSICCode } from "./msic-codes-kysVPGdN.js";
16
+ import { TaxType, TaxTypeCode, TaxTypeCodeEnum } from "./tax-types-QeZFKqew.js";
17
+ import { State, StateCode, StateCodeEnum } from "./state-codes-CAkYQnTd.js";
18
+ import "./1X-Bqi8dmY1.js";
19
+ import "./2X-CemxuAeL.js";
20
+ import "./3X-DIYh_ue4.js";
21
+ import "./4X-CZi5nwIr.js";
22
+ import "./5X-DyYBCAvY.js";
23
+ import "./6X-Csxu6lwi.js";
24
+ import "./7X-DivvfBsk.js";
25
+ import "./8X-D_Pw1H3K.js";
26
+ import "./9X-BwR9pibT.js";
27
+ import "./AX-CDubGAZO.js";
28
+ import "./BX-CBsKI8np.js";
29
+ import "./CX-DhOdAFyg.js";
30
+ import "./DX-CBiRJGqR.js";
31
+ import "./EX-CAn62WaX.js";
32
+ import "./FX-CANpsLC4.js";
33
+ import "./GX-BvSZZ8pE.js";
34
+ import "./HX-CxrnY-YC.js";
35
+ import "./IX-wdAD6eW8.js";
36
+ import "./JX-B5v815to.js";
37
+ import "./KX-BI8n7ACj.js";
38
+ import "./LX-BVvEz6Ji.js";
39
+ import "./MX-D_OsOP_v.js";
40
+ import "./NX-DIhAzAY3.js";
41
+ import "./OX-BZrRnj5g.js";
42
+ import "./PX-DGGrJNym.js";
43
+ import "./QX-DuTJFnHX.js";
44
+ import "./RX-DYQoV7am.js";
45
+ import "./SX-Dl1RlNnc.js";
46
+ import "./TX-SoIfFaZj.js";
47
+ import "./UX-DqBfrSsY.js";
48
+ import "./VX-Ahcpp3Si.js";
49
+ import "./WX-Di6vYD7A.js";
50
+ import "./YX-BPO04gSZ.js";
51
+ import "./ZX-DHu4FRKS.js";
52
+ import "./XX-BE4flzh6.js";
53
+ import { UnitType, UnitTypeCode } from "./unit-types-CZdxXbVN.js";
54
+ import { 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 } from "./documents-BpZn3hJq.js";
55
+ import { PaymentMode, PaymentModeCode, PaymentModeCodeEnum } from "./payment-modes-BGP5McTY.js";
56
+ import { CanonicalizationMethod, Cert, CertDigest, DigestMethod, IssuerDigitalSignature, IssuerSerial, KeyInfo, QualifyingProperties, Reference, SignatureMethod, SignedInfo, SignedProperties, SignedSignatureProperties, SigningCertificate, Transform, X509Data } from "./signatures-Bk5aKcq6.js";
57
+ import { Notification, NotificationDeliveryAttempt, NotificationMetadata, NotificationResponse, NotificationSearchParams, NotificationStatus, NotificationStatusEnum, NotificationType, NotificationTypeEnum } from "./notifications-B4BymhRJ.js";
58
+ import { TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse } from "./taxpayer-B1CSMqNS.js";
59
+ import { Fetch } from "./utils-BYVq373g.js";
60
+ import { ClientCredentials, TokenResponse } from "./index-Dn3JIREW.js";
61
+ import { AggregateByTaxCategoryOptions, aggregateLineItemsByTaxCategory } from "./lineItems-CrkEXi2m.js";
62
+
63
+ //#region src/index.d.ts
64
+ declare class MyInvoisClient {
65
+ private readonly baseUrl;
66
+ private readonly clientId;
67
+ private readonly clientSecret;
68
+ private readonly environment;
69
+ private onBehalfOf?;
70
+ private readonly signingCredentials;
71
+ private readonly debug;
72
+ private token;
73
+ private tokenExpiration;
74
+ private requestCount;
75
+ constructor(clientId: string, clientSecret: string, environment: "sandbox" | "production", certificatePem: string, privateKeyPem: string, onBehalfOf?: string, debug?: boolean);
76
+ updateOnBehalfOf(onBehalfOf: string): Promise<void>;
77
+ private refreshToken;
78
+ private getToken;
79
+ private fetch;
80
+ /**
81
+ * Validates a TIN against a NRIC/ARMY/PASSPORT/BRN (Business Registration Number)
82
+ *
83
+ * This method verifies if a given Tax Identification Number (TIN) is valid by checking it against
84
+ * the provided identification type and value through the MyInvois platform's validation service.
85
+ *
86
+ * @param tin - The TIN to validate
87
+ * @param idType - The type of ID to validate against ('NRIC', 'ARMY', 'PASSPORT', or 'BRN')
88
+ * @param idValue - The value of the ID to validate against
89
+ * @returns Promise resolving to true if the TIN is valid, false otherwise
90
+ *
91
+ * @example
92
+ * ```typescript
93
+ * // Validate TIN against NRIC
94
+ * const isValid = await client.verifyTin('C12345678901234', 'NRIC', '123456789012');
95
+ * if (isValid) {
96
+ * console.log('TIN is valid');
97
+ * }
98
+ *
99
+ * // Validate TIN against Business Registration Number
100
+ * const isValidBusiness = await client.verifyTin('C98765432109876', 'BRN', '123456-K');
101
+ * ```
102
+ *
103
+ * @remarks
104
+ * - Returns false if validation fails due to network errors or invalid credentials
105
+ * - Debug mode provides error logging for troubleshooting validation failures
106
+ * - This is a non-blocking validation that won't throw exceptions on failure
107
+ */
108
+ verifyTin(tin: string, idType: RegistrationType, idValue: string): Promise<boolean>;
109
+ /**
110
+ * Searches for a Tax Identification Number (TIN) using taxpayer information.
111
+ *
112
+ * This method allows searching for a TIN using either a taxpayer name or a combination
113
+ * of identification type and value. The search is flexible and supports multiple
114
+ * identification types including NRIC, ARMY, PASSPORT, and BRN.
115
+ *
116
+ * @param params - Search parameters object
117
+ * @param params.taxpayerName - Optional name of the taxpayer to search for
118
+ * @param params.idType - Optional type of ID to search with (NRIC, ARMY, PASSPORT, BRN)
119
+ * @param params.idValue - Optional value of the ID to search with
120
+ * @returns Promise resolving to TIN search response or standard error
121
+ *
122
+ * @example
123
+ * ```typescript
124
+ * // Search by taxpayer name
125
+ * const result = await client.searchTin({ taxpayerName: 'John Doe' });
126
+ * if ('tin' in result) {
127
+ * console.log('Found TIN:', result.tin);
128
+ * }
129
+ *
130
+ * // Search by ID type and value
131
+ * const result = await client.searchTin({
132
+ * idType: 'NRIC',
133
+ * idValue: '123456789012'
134
+ * });
135
+ * ```
136
+ *
137
+ * @remarks
138
+ * - Either taxpayerName or both idType and idValue must be provided
139
+ * - Returns StandardError object if search criteria are invalid or inconclusive
140
+ * - Debug mode provides detailed error logging for troubleshooting
141
+ * - Search results are not guaranteed to be unique
142
+ */
143
+ searchTin(params: TinSearchParams): Promise<TinSearchResponse>;
144
+ /**
145
+ * Retrieves taxpayer information from a QR code.
146
+ *
147
+ * This method decodes a QR code containing taxpayer information and returns
148
+ * detailed taxpayer data including TIN, name, contact details, and business information.
149
+ *
150
+ * @param qrCodeText - The QR code text to decode
151
+ * @returns Promise resolving to taxpayer QR code response or standard error
152
+ *
153
+ * @example
154
+ * ```typescript
155
+ * // Get taxpayer info from QR code
156
+ * const taxpayerInfo = await client.getTaxpayerQRCode('QR_CODE_TEXT');
157
+ * if ('tin' in taxpayerInfo) {
158
+ * console.log('Taxpayer TIN:', taxpayerInfo.tin);
159
+ * console.log('Business Name:', taxpayerInfo.name);
160
+ * console.log('Address:', taxpayerInfo.addressLine1);
161
+ * }
162
+ * ```
163
+ *
164
+ * @remarks
165
+ * - QR code must be in the correct format specified by MyInvois
166
+ * - Returns StandardError if QR code is invalid or cannot be decoded
167
+ * - Debug mode provides detailed error logging
168
+ */
169
+ getTaxpayerQRCode(qrCodeText: string): Promise<TaxpayerQRCodeResponse>;
170
+ /**
171
+ * Performs an action on a document such as rejection or cancellation.
172
+ *
173
+ * This method allows updating the status of a document to either rejected or cancelled,
174
+ * along with providing a reason for the action. Useful for managing document workflow
175
+ * and maintaining audit trails.
176
+ *
177
+ * @param documentUid - The unique identifier of the document
178
+ * @param status - The new status to set ('rejected' or 'cancelled')
179
+ * @param reason - The reason for the status change (max 300 characters)
180
+ * @returns Promise resolving to document action response containing UUID, status, and any errors
181
+ *
182
+ * @example
183
+ * ```typescript
184
+ * // Reject a document with reason
185
+ * const result = await client.performDocumentAction(
186
+ * 'doc-123',
187
+ * 'rejected',
188
+ * 'Invalid tax calculation'
189
+ * );
190
+ *
191
+ * // Cancel a document
192
+ * const result = await client.performDocumentAction(
193
+ * 'doc-456',
194
+ * 'cancelled',
195
+ * 'Duplicate submission'
196
+ * );
197
+ * ```
198
+ *
199
+ * @remarks
200
+ * - Only valid for documents in appropriate states
201
+ * - Reason is required, max 300 characters
202
+ * - Action is irreversible once completed
203
+ * - Returns error if document cannot be found or action is invalid
204
+ */
205
+ private performDocumentAction;
206
+ /**
207
+ * Cancels a document that was previously submitted.
208
+ *
209
+ * This is a convenience method that wraps performDocumentAction with 'cancelled' status.
210
+ * Documents can only be cancelled within 72 hours of validation.
211
+ *
212
+ * @param documentUid - The unique identifier of the document to cancel
213
+ * @param reason - The reason for cancellation (max 300 characters)
214
+ * @returns Promise resolving to document action response containing UUID, status, and any errors
215
+ *
216
+ * @example
217
+ * ```typescript
218
+ * const result = await client.cancelDocument(
219
+ * 'doc-456',
220
+ * 'Duplicate submission'
221
+ * );
222
+ * if (!result.error) {
223
+ * console.log('Document cancelled:', result.uuid);
224
+ * }
225
+ * ```
226
+ *
227
+ * @remarks
228
+ * - Must be called within 72 hours of document validation
229
+ * - Reason is required, max 300 characters
230
+ * - Action is irreversible once completed
231
+ * - Rate limited to 12 requests per minute
232
+ */
233
+ cancelDocument(documentUid: string, reason: string): Promise<{
234
+ uuid: string;
235
+ status: string;
236
+ error?: StandardError;
237
+ }>;
238
+ /**
239
+ * Rejects a document received from another party.
240
+ *
241
+ * This is a convenience method that wraps performDocumentAction with 'rejected' status.
242
+ * Only documents received from other taxpayers can be rejected.
243
+ *
244
+ * @param documentUid - The unique identifier of the document to reject
245
+ * @param reason - The reason for rejection (max 300 characters)
246
+ * @returns Promise resolving to document action response containing UUID, status, and any errors
247
+ *
248
+ * @example
249
+ * ```typescript
250
+ * const result = await client.rejectDocument(
251
+ * 'doc-123',
252
+ * 'Invalid tax calculation'
253
+ * );
254
+ * if (!result.error) {
255
+ * console.log('Document rejected:', result.uuid);
256
+ * }
257
+ * ```
258
+ *
259
+ * @remarks
260
+ * - Only applicable to received documents
261
+ * - Reason is required, max 300 characters
262
+ * - Action is irreversible once completed
263
+ * - Rate limited to 12 requests per minute
264
+ */
265
+ rejectDocument(documentUid: string, reason: string): Promise<{
266
+ uuid: string;
267
+ status: string;
268
+ error?: StandardError;
269
+ }>;
270
+ /**
271
+ * Submits one or more e-invoice documents to the MyInvois platform for processing.
272
+ *
273
+ * This method digitally signs each document using the provided certificate and private key,
274
+ * generates document hashes, encodes them for submission, and sends them to the platform.
275
+ * The method includes comprehensive validation warnings for document size and count limits.
276
+ *
277
+ * @param documents - Array of InvoiceV1_1 documents to be submitted
278
+ * @returns Promise resolving to submission response containing the submission data and HTTP status
279
+ * @throws {Error} If PRIVATE_KEY or CERTIFICATE environment variables are missing
280
+ * @throws {Error} If document signing, encoding, or API submission fails
281
+ *
282
+ * @example
283
+ * ```typescript
284
+ * // Submit a single invoice
285
+ * const result = await client.submitDocument([invoiceData]);
286
+ * console.log(result.data.submissionUid); // Track submission with this UID
287
+ *
288
+ * // Submit multiple invoices
289
+ * const result = await client.submitDocument([invoice1, invoice2, invoice3]);
290
+ * if (result.status === 202) {
291
+ * console.log('Documents submitted successfully');
292
+ * }
293
+ * ```
294
+ *
295
+ * @remarks
296
+ * - Requires PRIVATE_KEY and CERTIFICATE environment variables for document signing
297
+ * - Each document is digitally signed with XML-DSIG before submission
298
+ * - Documents are base64-encoded for transmission
299
+ * - API limits: Max 100 documents per submission, 5MB total payload, 300KB per document
300
+ * - Debug mode provides detailed logging of payload sizes and validation warnings
301
+ * - Returns HTTP 202 for successful submissions that require processing
302
+ */
303
+ submitDocument(documents: AllDocumentsV1_1[]): Promise<{
304
+ data: SubmissionResponse;
305
+ status: number;
306
+ }>;
307
+ /**
308
+ * Polls the MyInvois platform to get the current status of a document submission.
309
+ *
310
+ * This method continuously checks the submission status until it receives a final result
311
+ * (Valid or Invalid) or reaches the maximum retry limit. It's designed to handle the
312
+ * asynchronous nature of document processing on the MyInvois platform.
313
+ *
314
+ * @param submissionUid - The unique identifier of the submission to check
315
+ * @param pollInterval - Time in milliseconds between status checks (default: 1000ms)
316
+ * @param maxRetries - Maximum number of retry attempts (default: 10)
317
+ * @returns Promise resolving to submission status object with document summary and any errors
318
+ *
319
+ * @example
320
+ * ```typescript
321
+ * // Check submission status with default polling
322
+ * const result = await client.getSubmissionStatus('submission-uid-123');
323
+ * if (result.status === 'Valid') {
324
+ * console.log('All documents processed successfully');
325
+ * console.log('Document summaries:', result.documentSummary);
326
+ * }
327
+ *
328
+ * // Custom polling interval and retry count
329
+ * const result = await client.getSubmissionStatus(
330
+ * 'submission-uid-123',
331
+ * 2000, // Poll every 2 seconds
332
+ * 20 // Try up to 20 times
333
+ * );
334
+ * ```
335
+ *
336
+ * @remarks
337
+ * - Automatically retries on network errors until maxRetries is reached
338
+ * - Returns 'Invalid' status with timeout error if submission processing takes too long
339
+ * - Debug mode provides detailed logging of polling attempts and responses
340
+ * - Use reasonable poll intervals to avoid overwhelming the API
341
+ */
342
+ getSubmissionStatus(submissionUid: string, pollInterval?: number, maxRetries?: number, pageNo?: number, pageSize?: number): Promise<{
343
+ status: SubmissionStatus;
344
+ documentSummary?: DocumentSummary[];
345
+ error?: {
346
+ code: string;
347
+ message: string | null;
348
+ target: string;
349
+ details: {
350
+ code: string;
351
+ message: string;
352
+ target: string;
353
+ }[];
354
+ };
355
+ }>;
356
+ /**
357
+ * Retrieves a document by its unique identifier with the raw document content.
358
+ *
359
+ * @param documentUid - The unique identifier of the document to retrieve
360
+ * @returns Promise resolving to document summary with raw document content as a string
361
+ * @throws {Error} If the document is not found or request fails
362
+ *
363
+ * @example
364
+ * ```typescript
365
+ * const document = await client.getDocument('doc-uuid-123');
366
+ * console.log(document.document); // Raw XML/JSON content
367
+ * console.log(document.uuid); // Document UUID
368
+ * ```
369
+ */
370
+ getDocument(documentUid: string): Promise<DocumentSummary & {
371
+ document: string;
372
+ }>;
373
+ /**
374
+ * Retrieves detailed information about a document including validation results.
375
+ *
376
+ * @param documentUid - The unique identifier of the document to get details for
377
+ * @returns Promise resolving to document summary with detailed validation results
378
+ * @throws {Error} If the document is not found or request fails
379
+ *
380
+ * @example
381
+ * ```typescript
382
+ * const details = await client.getDocumentDetails('doc-uuid-123');
383
+ * console.log(details.validationResults.status); // 'Valid' | 'Invalid' | 'Processing'
384
+ * console.log(details.validationResults.validationSteps); // Array of validation step results
385
+ * ```
386
+ */
387
+ getDocumentDetails(documentUid: string): Promise<DocumentSummary & {
388
+ validationResults: {
389
+ status: DocumentValidationResult;
390
+ validationSteps: DocumentValidationStepResult[];
391
+ };
392
+ }>;
393
+ /**
394
+ * Searches for documents based on various filter criteria.
395
+ *
396
+ * @param params - Search parameters object
397
+ * @param params.uuid - Optional specific document UUID to search for
398
+ * @param params.submissionDateFrom - Required start date for submission date range (ISO date string)
399
+ * @param params.submissionDateTo - Optional end date for submission date range (ISO date string)
400
+ * @param params.pageSize - Optional number of results per page (default handled by API)
401
+ * @param params.pageNo - Optional page number for pagination (0-based)
402
+ * @param params.issueDateFrom - Optional start date for issue date range (ISO date string)
403
+ * @param params.issueDateTo - Optional end date for issue date range (ISO date string)
404
+ * @param params.invoiceDirection - Optional filter by invoice direction ('Sent' or 'Received')
405
+ * @param params.status - Optional filter by document status
406
+ * @param params.documentType - Optional filter by e-invoice type code
407
+ * @param params.searchQuery - Optional text search across uuid, buyerTIN, supplierTIN, buyerName, supplierName, internalID, total
408
+ * @returns Promise resolving to array of document summaries matching the search criteria
409
+ * @throws {Error} If the search request fails
410
+ *
411
+ * @example
412
+ * ```typescript
413
+ * // Search for documents submitted in the last 30 days
414
+ * const documents = await client.searchDocuments({
415
+ * submissionDateFrom: '2024-01-01',
416
+ * submissionDateTo: '2024-01-31',
417
+ * status: 'Valid',
418
+ * pageSize: 10
419
+ * });
420
+ *
421
+ * // Search by supplier name
422
+ * const supplierDocs = await client.searchDocuments({
423
+ * submissionDateFrom: '2024-01-01',
424
+ * searchQuery: 'ACME Corp',
425
+ * invoiceDirection: 'Received'
426
+ * });
427
+ * ```
428
+ */
429
+ searchDocuments({
430
+ uuid,
431
+ submissionDateFrom,
432
+ submissionDateTo,
433
+ pageSize,
434
+ pageNo,
435
+ issueDateFrom,
436
+ issueDateTo,
437
+ invoiceDirection,
438
+ status,
439
+ documentType,
440
+ searchQuery
441
+ }: {
442
+ uuid?: string;
443
+ submissionDateFrom: string;
444
+ submissionDateTo?: string;
445
+ pageSize?: number;
446
+ pageNo?: number;
447
+ issueDateFrom?: string;
448
+ issueDateTo?: string;
449
+ invoiceDirection?: "Sent" | "Received";
450
+ status?: DocumentStatus;
451
+ documentType?: EInvoiceTypeCode;
452
+ searchQuery?: string;
453
+ }): Promise<DocumentSummary[]>;
454
+ /**
455
+ * Retrieves notifications from the MyInvois platform based on specified search criteria.
456
+ *
457
+ * This method allows you to search for system notifications, alerts, and messages
458
+ * sent by the MyInvois platform regarding document processing, system updates,
459
+ * or account-related information.
460
+ *
461
+ * @param params - Search parameters object for filtering notifications
462
+ * @param params.dateFrom - Optional start date for notification date range (ISO date string)
463
+ * @param params.dateTo - Optional end date for notification date range (ISO date string)
464
+ * @param params.type - Optional notification type filter
465
+ * @param params.language - Optional language preference for notifications
466
+ * @param params.status - Optional notification status filter
467
+ * @param params.pageNo - Optional page number for pagination (0-based)
468
+ * @param params.pageSize - Optional number of results per page
469
+ * @returns Promise resolving to notification response object or standard error
470
+ *
471
+ * @example
472
+ * ```typescript
473
+ * // Get all notifications from the last 7 days
474
+ * const notifications = await client.getNotifications({
475
+ * dateFrom: '2024-01-01',
476
+ * dateTo: '2024-01-07',
477
+ * pageSize: 20
478
+ * });
479
+ *
480
+ * // Get unread notifications only
481
+ * const unreadNotifications = await client.getNotifications({
482
+ * status: 0, // Assuming 0 = unread
483
+ * language: 'en'
484
+ * });
485
+ *
486
+ * // Paginated notification retrieval
487
+ * const firstPage = await client.getNotifications({
488
+ * dateFrom: '2024-01-01',
489
+ * pageNo: 0,
490
+ * pageSize: 10
491
+ * });
492
+ * ```
493
+ *
494
+ * @remarks
495
+ * - All parameters are optional, allowing flexible filtering
496
+ * - Returns paginated results when pageNo and pageSize are specified
497
+ * - Date parameters should be in ISO format (YYYY-MM-DD)
498
+ * - May return StandardError object if the request fails
499
+ */
500
+ getNotifications({
501
+ dateFrom,
502
+ dateTo,
503
+ type,
504
+ language,
505
+ status,
506
+ pageNo,
507
+ pageSize
508
+ }: NotificationSearchParams): Promise<NotificationResponse>;
509
+ getDocumentTypes(): Promise<DocumentTypesResponse>;
510
+ /**
511
+ * Retrieves detailed information about a specific document type from the MyInvois platform.
512
+ *
513
+ * This method fetches metadata and configuration details for a specific document type,
514
+ * including supported versions, validation rules, and structural requirements.
515
+ * Useful for understanding document format requirements before submission.
516
+ *
517
+ * @param id - The unique identifier of the document type to retrieve
518
+ * @returns Promise resolving to document type response object or standard error
519
+ *
520
+ * @example
521
+ * ```typescript
522
+ * // Get details for e-invoice document type
523
+ * const invoiceType = await client.getDocumentType(1);
524
+ * if ('id' in invoiceType) {
525
+ * console.log('Document type name:', invoiceType.name);
526
+ * console.log('Available versions:', invoiceType.versionNumber);
527
+ * console.log('Description:', invoiceType.description);
528
+ * }
529
+ *
530
+ * // Handle potential errors
531
+ * const documentType = await client.getDocumentType(999);
532
+ * if ('error' in documentType) {
533
+ * console.error('Failed to retrieve document type:', documentType.error.message);
534
+ * }
535
+ * ```
536
+ *
537
+ * @remarks
538
+ * - Returns StandardError object if the document type ID doesn't exist
539
+ * - Document type information includes validation schemas and business rules
540
+ * - Use this method to discover supported document formats and versions
541
+ * - Essential for understanding submission requirements for different document types
542
+ */
543
+ getDocumentType(id: number): Promise<DocumentTypeResponse>;
544
+ /**
545
+ * Generates a shareable QR code URL for a specific document.
546
+ *
547
+ * This method retrieves the document details using its unique identifier,
548
+ * then constructs a URL that can be used to access or share the document
549
+ * via the MyInvois platform. The URL format differs between sandbox and
550
+ * production environments.
551
+ *
552
+ * @param documentUid - The unique identifier of the document
553
+ * @returns Promise resolving to a string containing the QR code URL
554
+ *
555
+ * @example
556
+ * ```typescript
557
+ * const qrCodeUrl = await client.getDocumentQrCode('abc123');
558
+ * console.log('Shareable QR code URL:', qrCodeUrl);
559
+ * // Output (sandbox): https://preprod.myinvois.hasil.gov.my/abc123/share/longId
560
+ * // Output (production): https://myinvois.hasil.gov.my/abc123/share/longId
561
+ * ```
562
+ *
563
+ * @remarks
564
+ * - The returned URL can be embedded in a QR code for document sharing.
565
+ * - The method fetches the document to obtain its longId, which is required for the URL.
566
+ * - Ensure the documentUid is valid and accessible by the current client.
567
+ */
568
+ getDocumentQrCode(documentUid: string, longId?: string): Promise<string | null>;
569
+ /**
570
+ * Retrieves detailed information about a specific version of a document type.
571
+ *
572
+ * This method fetches version-specific metadata, schema definitions, and validation rules
573
+ * for a particular document type version. Essential for understanding the exact format
574
+ * and requirements for document submission in a specific version.
575
+ *
576
+ * @param id - The unique identifier of the document type
577
+ * @param versionId - The unique identifier of the specific version to retrieve
578
+ * @returns Promise resolving to document type version response object or standard error
579
+ *
580
+ * @example
581
+ * ```typescript
582
+ * // Get specific version details for e-invoice
583
+ * const invoiceV1_1 = await client.getDocumentTypeVersion(1, 1);
584
+ * if ('id' in invoiceV1_1) {
585
+ * console.log('Version number:', invoiceV1_1.versionNumber);
586
+ * console.log('Schema:', invoiceV1_1.jsonSchema);
587
+ * console.log('Status:', invoiceV1_1.status);
588
+ * }
589
+ *
590
+ * // Compare different versions
591
+ * const [v1_0, v1_1] = await Promise.all([
592
+ * client.getDocumentTypeVersion(1, 0),
593
+ * client.getDocumentTypeVersion(1, 1)
594
+ * ]);
595
+ *
596
+ * // Handle version not found
597
+ * const result = await client.getDocumentTypeVersion(1, 999);
598
+ * if ('error' in result) {
599
+ * console.error('Version not found:', result.error.message);
600
+ * }
601
+ * ```
602
+ *
603
+ * @remarks
604
+ * - Returns StandardError object if document type ID or version ID doesn't exist
605
+ * - Version information includes JSON schema for validation
606
+ * - Different versions may have different validation rules and field requirements
607
+ * - Use this to ensure your documents conform to the specific version requirements
608
+ * - Version status indicates if the version is active, deprecated, or under development
609
+ */
610
+ getDocumentTypeVersion(id: number, versionId: number): Promise<DocumentTypeVersionResponse>;
611
+ // Static helper: create a client directly from a PKCS#12 (.p12) bundle
612
+ static fromP12(clientId: string, clientSecret: string, environment: "sandbox" | "production", p12Input: Buffer | string, passphrase: string, onBehalfOf?: string, debug?: boolean): MyInvoisClient;
613
+ }
614
+ //#endregion
615
+ export { Address, AggregateByTaxCategoryOptions, AllDocumentsV1_1, Buyer, CanonicalizationMethod, Cert, CertDigest, Classification, ClassificationCode, ClassificationCodeEnum, ClientCredentials, CompleteInvoice, Country, CountryCode, CountryCodeEnum, CountryNameEnum, CreditNoteV1_1, Currency, CurrencyCode, CurrencyCodeEnum, DebitNoteV1_1, DigestMethod, DocumentStatus, DocumentSummary, DocumentTypeResponse, DocumentTypeVersion, DocumentTypeVersionResponse, DocumentTypesResponse, DocumentValidationResult, DocumentValidationStepResult, EInvoiceType, EInvoiceTypeCode, EInvoiceTypeCodeEnum, Fetch, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, IssuerDigitalSignature, IssuerSerial, KeyInfo, LegalMonetaryTotal, MSICCode, MyInvoisClient, Notification, NotificationDeliveryAttempt, NotificationMetadata, NotificationResponse, NotificationSearchParams, NotificationStatus, NotificationStatusEnum, NotificationType, NotificationTypeEnum, PaymentMode, PaymentModeCode, PaymentModeCodeEnum, QualifyingProperties, Reference, RefundNoteV1_1, RegistrationType, ResponseDocument, SelfBilledCreditNoteV1_1, SelfBilledInvoiceV1_1, SelfBilledRefundNoteV1_1, SignatureMethod, SignedInfo, SignedInfoObject, SignedInvoiceSubmission, SignedProperties, SignedPropertiesData, SignedPropertiesObject, SignedSignatureProperties, SigningCertificate, SigningCredentials, StandardError, State, StateCode, StateCodeEnum, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, TaxType, TaxTypeCode, TaxTypeCodeEnum, TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse, TokenResponse, Transform, UBLDocument, UnitType, UnitTypeCode, WorkflowParameter, X509Data, aggregateLineItemsByTaxCategory };
616
+ //# sourceMappingURL=index.d.ts.map