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