@ripwords/myinvois-client 0.1.7 → 0.2.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.
- package/dist/api/documentManagement.d.ts +89 -0
- package/dist/api/documentManagement.js +3 -0
- package/dist/api/documentSubmission.d.ts +92 -0
- package/dist/api/documentSubmission.js +4 -0
- package/dist/api/documentTypeManagement.d.ts +70 -0
- package/dist/api/documentTypeManagement.js +3 -0
- package/dist/api/notificationManagement.d.ts +68 -0
- package/dist/api/notificationManagement.js +3 -0
- package/dist/api/platformLogin.d.ts +68 -0
- package/dist/api/platformLogin.js +3 -0
- package/dist/api/taxpayerValidation.d.ts +79 -0
- package/dist/api/taxpayerValidation.js +3 -0
- package/dist/{certificate-DFK-788s.cjs → certificate-CxsfE91s.cjs} +1 -1
- package/dist/{certificate-DFK-788s.cjs.map → certificate-CxsfE91s.cjs.map} +1 -1
- package/dist/{document-CARHiGdp.cjs → document-vDphtJTv.cjs} +1 -1
- package/dist/{document-CARHiGdp.cjs.map → document-vDphtJTv.cjs.map} +1 -1
- package/dist/documentManagement-CIQPkmyb.js +35 -0
- package/dist/documentManagement-DQ7JEcBq.cjs +54 -0
- package/dist/documentManagement-DQ7JEcBq.cjs.map +1 -0
- package/dist/documentSubmission-BdJxIB_I.js +119 -0
- package/dist/documentSubmission-D5TC0MPC.cjs +137 -0
- package/dist/documentSubmission-D5TC0MPC.cjs.map +1 -0
- package/dist/documentTypeManagement-DXRLfTsW.cjs +41 -0
- package/dist/documentTypeManagement-DXRLfTsW.cjs.map +1 -0
- package/dist/documentTypeManagement-tojgXfm9.js +22 -0
- package/dist/{documents-i5EV868Y.d.ts → documents-BgXt86Qp.d.ts} +44 -7
- package/dist/{documents-CQy_uB6C.d.cts → documents-BqM9qOnB.d.cts} +39 -2
- package/dist/{getBaseUrl-CO7Jp27d.cjs → getBaseUrl-D2iJdUGL.cjs} +1 -1
- package/dist/{getBaseUrl-CO7Jp27d.cjs.map → getBaseUrl-D2iJdUGL.cjs.map} +1 -1
- package/dist/{index-D2_HVwCz.d.cts → index-Yr1QAbIF.d.cts} +1 -1
- package/dist/index.cjs +234 -131
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +250 -60
- package/dist/index.js +234 -131
- package/dist/index10.cjs +25 -0
- package/dist/index10.cjs.map +1 -0
- package/dist/index11.cjs +0 -34
- package/dist/index12.cjs +25 -15
- package/dist/index12.cjs.map +1 -1
- package/dist/index13.cjs +24 -0
- package/dist/index13.cjs.map +1 -0
- package/dist/index14.cjs +0 -13
- package/dist/index15.cjs +0 -4
- package/dist/index16.cjs +0 -13
- package/dist/index17.cjs +4 -2
- package/dist/index18.cjs +5 -339
- package/dist/index19.cjs +4 -328
- package/dist/index20.cjs +2 -139
- package/dist/index21.cjs +1 -1
- package/dist/index22.cjs +4 -207
- package/dist/index23.cjs +9 -105
- package/dist/index23.cjs.map +1 -1
- package/dist/index24.cjs +3 -136
- package/dist/index25.cjs +12 -63
- package/dist/index26.cjs +2 -266
- package/dist/index27.cjs +325 -75
- package/dist/index27.cjs.map +1 -1
- package/dist/index28.cjs +136 -103
- package/dist/index28.cjs.map +1 -1
- package/dist/index29.cjs +203 -68
- package/dist/index29.cjs.map +1 -1
- package/dist/index30.cjs +104 -107
- package/dist/index30.cjs.map +1 -1
- package/dist/index31.cjs +132 -95
- package/dist/index31.cjs.map +1 -1
- package/dist/index32.cjs +59 -13
- package/dist/index32.cjs.map +1 -1
- package/dist/index33.cjs +262 -33
- package/dist/index33.cjs.map +1 -1
- package/dist/index34.cjs +74 -14
- package/dist/index34.cjs.map +1 -1
- package/dist/index35.cjs +102 -24
- package/dist/index35.cjs.map +1 -1
- package/dist/index36.cjs +68 -15
- package/dist/index36.cjs.map +1 -1
- package/dist/index37.cjs +107 -9
- package/dist/index37.cjs.map +1 -1
- package/dist/index38.cjs +95 -9
- package/dist/index38.cjs.map +1 -1
- package/dist/index39.cjs +11 -10
- package/dist/index39.cjs.map +1 -1
- package/dist/index40.cjs +31 -6
- package/dist/index40.cjs.map +1 -1
- package/dist/index41.cjs +12 -101
- package/dist/index41.cjs.map +1 -1
- package/dist/index42.cjs +22 -106
- package/dist/index42.cjs.map +1 -1
- package/dist/index43.cjs +13 -119
- package/dist/index43.cjs.map +1 -1
- package/dist/index44.cjs +7 -106
- package/dist/index44.cjs.map +1 -1
- package/dist/index45.cjs +7 -98
- package/dist/index45.cjs.map +1 -1
- package/dist/index46.cjs +10 -118
- package/dist/index46.cjs.map +1 -1
- package/dist/index47.cjs +6 -127
- package/dist/index47.cjs.map +1 -1
- package/dist/index48.cjs +101 -117
- package/dist/index48.cjs.map +1 -1
- package/dist/index49.cjs +106 -14
- package/dist/index49.cjs.map +1 -1
- package/dist/index50.cjs +119 -95
- package/dist/index50.cjs.map +1 -1
- package/dist/index51.cjs +106 -142
- package/dist/index51.cjs.map +1 -1
- package/dist/index52.cjs +98 -114
- package/dist/index52.cjs.map +1 -1
- package/dist/index53.cjs +118 -144
- package/dist/index53.cjs.map +1 -1
- package/dist/index54.cjs +127 -113
- package/dist/index54.cjs.map +1 -1
- package/dist/index55.cjs +117 -17
- package/dist/index55.cjs.map +1 -1
- package/dist/index56.cjs +14 -112
- package/dist/index56.cjs.map +1 -1
- package/dist/index57.cjs +95 -47
- package/dist/index57.cjs.map +1 -1
- package/dist/index58.cjs +142 -14
- package/dist/index58.cjs.map +1 -1
- package/dist/index59.cjs +114 -28
- package/dist/index59.cjs.map +1 -1
- package/dist/index60.cjs +144 -22
- package/dist/index60.cjs.map +1 -1
- package/dist/index61.cjs +113 -9
- package/dist/index61.cjs.map +1 -1
- package/dist/index61.cts.map +1 -1
- package/dist/index62.cjs +17 -8
- package/dist/index62.cjs.map +1 -1
- package/dist/index62.cts.map +1 -1
- package/dist/index63.cjs +112 -17
- package/dist/index63.cjs.map +1 -1
- package/dist/index63.cts.map +1 -1
- package/dist/index64.cjs +47 -412
- package/dist/index64.cjs.map +1 -1
- package/dist/index64.cts.map +1 -1
- package/dist/index65.cjs +14 -8
- package/dist/index65.cjs.map +1 -1
- package/dist/index65.cts.map +1 -1
- package/dist/index66.cjs +28 -9
- package/dist/index66.cjs.map +1 -1
- package/dist/index66.cts.map +1 -1
- package/dist/index67.cjs +29 -0
- package/dist/index67.cjs.map +1 -0
- package/dist/index67.cts.map +1 -0
- package/dist/index68.cjs +16 -0
- package/dist/index68.cjs.map +1 -0
- package/dist/{index60.cts.map → index68.cts.map} +1 -1
- package/dist/index69.cjs +15 -0
- package/dist/index69.cjs.map +1 -0
- package/dist/index69.cts.map +1 -0
- package/dist/index70.cjs +24 -0
- package/dist/index70.cjs.map +1 -0
- package/dist/index70.cts.map +1 -0
- package/dist/index71.cjs +419 -0
- package/dist/index71.cjs.map +1 -0
- package/dist/index71.cts.map +1 -0
- package/dist/index72.cjs +15 -0
- package/dist/index72.cjs.map +1 -0
- package/dist/index72.cts.map +1 -0
- package/dist/index73.cjs +16 -0
- package/dist/index73.cjs.map +1 -0
- package/dist/index73.cts.map +1 -0
- package/dist/index9.cjs +24 -20
- package/dist/index9.cjs.map +1 -1
- package/dist/{msic-codes-C8PJVOaA.d.ts → msic-codes-CiPeemFK.d.ts} +10 -10
- package/dist/notificationManagement-CHDRVy8J.js +19 -0
- package/dist/notificationManagement-C_qrFwWL.cjs +26 -0
- package/dist/notificationManagement-C_qrFwWL.cjs.map +1 -0
- package/dist/notifications-B4l_qRj7.d.ts +62 -0
- package/dist/notifications-DdlEkprb.d.cts +63 -0
- package/dist/{platformLogin-PGzMhw1X.cjs → platformLogin-CPiPiVUh.cjs} +2 -2
- package/dist/platformLogin-CPiPiVUh.cjs.map +1 -0
- package/dist/{platformLogin-f0bNAoZI.js → platformLogin-Ck1Fge2n.js} +1 -1
- package/dist/taxpayer-D67d2zAC.d.ts +26 -0
- package/dist/taxpayer-sGkviG8J.d.cts +27 -0
- package/dist/taxpayerValidation-DI4B6kWx.js +54 -0
- package/dist/taxpayerValidation-DdeXCvPT.cjs +73 -0
- package/dist/taxpayerValidation-DdeXCvPT.cjs.map +1 -0
- package/dist/types/classification-codes.d.ts +1 -1
- package/dist/types/country-code.d.ts +1 -1
- package/dist/types/currencies.d.ts +1 -1
- package/dist/types/documents.d.ts +18 -18
- package/dist/types/e-invoice.d.ts +1 -1
- package/dist/types/index.d.ts +61 -58
- package/dist/types/msic/0X.d.ts +1 -1
- package/dist/types/msic/1X.d.ts +1 -1
- package/dist/types/msic/2X.d.ts +1 -1
- package/dist/types/msic/3X.d.ts +1 -1
- package/dist/types/msic/4X.d.ts +1 -1
- package/dist/types/msic/5X.d.ts +1 -1
- package/dist/types/msic/6X.d.ts +1 -1
- package/dist/types/msic/7X.d.ts +1 -1
- package/dist/types/msic/8X.d.ts +1 -1
- package/dist/types/msic/9X.d.ts +1 -1
- package/dist/types/msic-codes.d.ts +11 -11
- package/dist/types/notifications.d.ts +2 -0
- package/dist/types/payment-modes.d.ts +1 -1
- package/dist/types/signatures.d.ts +1 -1
- package/dist/types/state-codes.d.ts +1 -1
- package/dist/types/tax-types.d.ts +1 -1
- package/dist/types/taxpayer.d.ts +19 -0
- package/dist/types/unit/1X.d.ts +1 -1
- package/dist/types/unit/2X.d.ts +1 -1
- package/dist/types/unit/3X.d.ts +1 -1
- package/dist/types/unit/4X.d.ts +1 -1
- package/dist/types/unit/5X.d.ts +1 -1
- package/dist/types/unit/6X.d.ts +1 -1
- package/dist/types/unit/7X.d.ts +1 -1
- package/dist/types/unit/8X.d.ts +1 -1
- package/dist/types/unit/9X.d.ts +1 -1
- package/dist/types/unit/AX.d.ts +1 -1
- package/dist/types/unit/BX.d.ts +1 -1
- package/dist/types/unit/CX.d.ts +1 -1
- package/dist/types/unit/DX.d.ts +1 -1
- package/dist/types/unit/EX.d.ts +1 -1
- package/dist/types/unit/FX.d.ts +1 -1
- package/dist/types/unit/GX.d.ts +1 -1
- package/dist/types/unit/HX.d.ts +1 -1
- package/dist/types/unit/IX.d.ts +1 -1
- package/dist/types/unit/JX.d.ts +1 -1
- package/dist/types/unit/KX.d.ts +1 -1
- package/dist/types/unit/LX.d.ts +1 -1
- package/dist/types/unit/MX.d.ts +1 -1
- package/dist/types/unit/NX.d.ts +1 -1
- package/dist/types/unit/OX.d.ts +1 -1
- package/dist/types/unit/PX.d.ts +1 -1
- package/dist/types/unit/QX.d.ts +1 -1
- package/dist/types/unit/RX.d.ts +1 -1
- package/dist/types/unit/SX.d.ts +1 -1
- package/dist/types/unit/TX.d.ts +1 -1
- package/dist/types/unit/UX.d.ts +1 -1
- package/dist/types/unit/VX.d.ts +1 -1
- package/dist/types/unit/WX.d.ts +1 -1
- package/dist/types/unit/XX.d.ts +1 -1
- package/dist/types/unit/YX.d.ts +1 -1
- package/dist/types/unit/ZX.d.ts +1 -1
- package/dist/types/unit-types.d.ts +36 -36
- package/dist/types/utils.d.ts +2 -0
- package/dist/unit-types-VgYXIwTT.d.ts +55 -0
- package/dist/utils/certificate.js +1 -1
- package/dist/utils/document.d.ts +60 -57
- package/dist/utils/document.js +1 -1
- package/dist/utils/getBaseUrl.js +1 -1
- package/dist/utils/signature-diagnostics.d.ts +60 -57
- package/dist/utils/signature-diagnostics.js +1 -1
- package/dist/utils-B3mo51Zp.d.ts +4 -0
- package/dist/utils-Cdqbbzca.d.cts +5 -0
- package/package.json +1 -1
- package/dist/api/platform/platformLogin.d.ts +0 -65
- package/dist/api/platform/platformLogin.js +0 -3
- package/dist/index11.cjs.map +0 -1
- package/dist/index14.cjs.map +0 -1
- package/dist/index18.cjs.map +0 -1
- package/dist/index19.cjs.map +0 -1
- package/dist/index20.cjs.map +0 -1
- package/dist/index22.cjs.map +0 -1
- package/dist/index24.cjs.map +0 -1
- package/dist/index25.cjs.map +0 -1
- package/dist/index26.cjs.map +0 -1
- package/dist/index58.cts.map +0 -1
- package/dist/index59.cts.map +0 -1
- package/dist/platformLogin-PGzMhw1X.cjs.map +0 -1
- package/dist/unit-types-B41YFOLT.d.ts +0 -55
- package/dist/utils/helpers.d.ts +0 -271
- package/dist/utils/helpers.js +0 -330
- /package/dist/{0X-CTIq3y3a.d.ts → 0X-DZnB0al0.d.ts} +0 -0
- /package/dist/{1X-BywXCqtn.d.ts → 1X-C72Wa4pk.d.ts} +0 -0
- /package/dist/{1X-Bu4oiv8D.d.ts → 1X-Dg5J6Bfg.d.ts} +0 -0
- /package/dist/{2X-3fSEGIuE.d.ts → 2X-CH89y3Af.d.ts} +0 -0
- /package/dist/{2X-DnG3FY1f.d.ts → 2X-D_qwTeDT.d.ts} +0 -0
- /package/dist/{3X-CLdmoel1.d.ts → 3X-BJHYxgxa.d.ts} +0 -0
- /package/dist/{3X-Ynjfgoll.d.ts → 3X-DryrwYRf.d.ts} +0 -0
- /package/dist/{4X-B5ePdMky.d.ts → 4X-BPMLRoDv.d.ts} +0 -0
- /package/dist/{4X-BTG6o1Gn.d.ts → 4X-BbZgoRHO.d.ts} +0 -0
- /package/dist/{5X-dhP6fyou.d.ts → 5X-Bv7M6KyG.d.ts} +0 -0
- /package/dist/{5X-CjSz1zxJ.d.ts → 5X-oQRBnO0f.d.ts} +0 -0
- /package/dist/{6X-B9KP_vEn.d.ts → 6X-B9I2XJa4.d.ts} +0 -0
- /package/dist/{6X-BHaY0TCf.d.ts → 6X-ZeZ8OB57.d.ts} +0 -0
- /package/dist/{7X-DtkQutx2.d.ts → 7X-Ckv9bbzG.d.ts} +0 -0
- /package/dist/{7X-C4eX_tAk.d.ts → 7X-Dvw2Z2VN.d.ts} +0 -0
- /package/dist/{8X-D6HTLShY.d.ts → 8X-BkgoX8dg.d.ts} +0 -0
- /package/dist/{8X-5n9seY3z.d.ts → 8X-C37BJTl6.d.ts} +0 -0
- /package/dist/{9X-CHZKsIdD.d.ts → 9X-Du0e44cq.d.ts} +0 -0
- /package/dist/{9X-Cpb6V4JC.d.ts → 9X-_XRgT2-_.d.ts} +0 -0
- /package/dist/{AX-C0w_r3PA.d.ts → AX-BSPLpkVT.d.ts} +0 -0
- /package/dist/{BX-RadlZ-6m.d.ts → BX-u4yMaIkz.d.ts} +0 -0
- /package/dist/{CX-CT1Zzb9D.d.ts → CX-BKZG0pVE.d.ts} +0 -0
- /package/dist/{DX-CtUeTKMM.d.ts → DX-CwA9WJAf.d.ts} +0 -0
- /package/dist/{EX-084Yu7Wt.d.ts → EX-BRNu1Ooi.d.ts} +0 -0
- /package/dist/{FX-BrbQM0CW.d.ts → FX-DBxjq6xY.d.ts} +0 -0
- /package/dist/{GX-gKj8iAAh.d.ts → GX-B3CvWNrP.d.ts} +0 -0
- /package/dist/{HX-9D-ZXTy5.d.ts → HX-D7FABgTv.d.ts} +0 -0
- /package/dist/{IX-DR4Fc92A.d.ts → IX-D3ZknsAB.d.ts} +0 -0
- /package/dist/{JX-DIKa9ma-.d.ts → JX-BRaZM3Gc.d.ts} +0 -0
- /package/dist/{KX-DpsJ_unT.d.ts → KX-B1K0OWoi.d.ts} +0 -0
- /package/dist/{LX-DeXPPWUX.d.ts → LX-CKRefinL.d.ts} +0 -0
- /package/dist/{MX-CKMjg_zK.d.ts → MX-DKmaeO9r.d.ts} +0 -0
- /package/dist/{NX-oYdb4NDo.d.ts → NX-CJL2Gn1U.d.ts} +0 -0
- /package/dist/{OX-Bid9es3D.d.ts → OX-Do2ap5v_.d.ts} +0 -0
- /package/dist/{PX-D7jy9CFk.d.ts → PX-_DOr_rm9.d.ts} +0 -0
- /package/dist/{QX-BFWOR4g3.d.ts → QX-HlXLkIki.d.ts} +0 -0
- /package/dist/{RX-XHgCyMV1.d.ts → RX-DVPGOVES.d.ts} +0 -0
- /package/dist/{SX-Cl8RN8oH.d.ts → SX-OGT3qwlS.d.ts} +0 -0
- /package/dist/{TX-ZymoIbtr.d.ts → TX-cPDINmZ5.d.ts} +0 -0
- /package/dist/{UX-D-Ndd1ov.d.ts → UX-Be3sqvPV.d.ts} +0 -0
- /package/dist/{VX-B-1b34r7.d.ts → VX-CoEuBNDK.d.ts} +0 -0
- /package/dist/{WX-0GuMjPNZ.d.ts → WX-DMvw__jH.d.ts} +0 -0
- /package/dist/{XX-CF2NANsy.d.ts → XX-DOA-10JW.d.ts} +0 -0
- /package/dist/{YX-B51BbNSg.d.ts → YX-F34sJ7Ik.d.ts} +0 -0
- /package/dist/{ZX-BMJS1iAv.d.ts → ZX-CDQOfsHh.d.ts} +0 -0
- /package/dist/{certificate-aooIRf9A.js → certificate-BDECQL9C.js} +0 -0
- /package/dist/{classification-codes-BKxV-rO9.d.ts → classification-codes-B1D5xbq5.d.ts} +0 -0
- /package/dist/{country-code-CQuaiQm2.d.ts → country-code-D42kAyNH.d.ts} +0 -0
- /package/dist/{currencies-BYJK-m6v.d.ts → currencies-CDveO_yz.d.ts} +0 -0
- /package/dist/{document-D6VKMAtx.js → document-BSuYbfXR.js} +0 -0
- /package/dist/{e-invoice-CmbLQkHw.d.ts → e-invoice-BxNC6V_j.d.ts} +0 -0
- /package/dist/{getBaseUrl-R3IdgCu3.js → getBaseUrl-BYkBwhQP.js} +0 -0
- /package/dist/{index-0-EvC6Nv.d.ts → index-FTgB2nM6.d.ts} +0 -0
- /package/dist/{payment-modes-BOTSRC_X.d.ts → payment-modes-NpE3OcCV.d.ts} +0 -0
- /package/dist/{signatures-W-_brwdb.d.ts → signatures-DOKNMiZI.d.ts} +0 -0
- /package/dist/{state-codes-oeFKlwXZ.d.ts → state-codes-VOFWhHA0.d.ts} +0 -0
- /package/dist/{tax-types-CsQ76JMf.d.ts → tax-types-ieqw5Ze7.d.ts} +0 -0
package/dist/index9.cjs
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/types/
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
//#region src/types/notifications.d.ts
|
|
3
|
+
let NotificationTypeEnum = /* @__PURE__ */ function(NotificationTypeEnum$1) {
|
|
4
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["Profile data validation"] = 3] = "Profile data validation";
|
|
5
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["Document received"] = 6] = "Document received";
|
|
6
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["Document validated"] = 7] = "Document validated";
|
|
7
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["Document cancelled"] = 8] = "Document cancelled";
|
|
8
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["User profile changed"] = 10] = "User profile changed";
|
|
9
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["Taxpayer profile changed"] = 11] = "Taxpayer profile changed";
|
|
10
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["Document rejection initiated"] = 15] = "Document rejection initiated";
|
|
11
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["ERP data validation"] = 26] = "ERP data validation";
|
|
12
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["Documents processing summary"] = 33] = "Documents processing summary";
|
|
13
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["Document Template Published"] = 34] = "Document Template Published";
|
|
14
|
+
NotificationTypeEnum$1[NotificationTypeEnum$1["Document Template Deletion"] = 35] = "Document Template Deletion";
|
|
15
|
+
return NotificationTypeEnum$1;
|
|
16
|
+
}({});
|
|
17
|
+
let NotificationStatusEnum = /* @__PURE__ */ function(NotificationStatusEnum$1) {
|
|
18
|
+
NotificationStatusEnum$1[NotificationStatusEnum$1["New"] = 1] = "New";
|
|
19
|
+
NotificationStatusEnum$1[NotificationStatusEnum$1["Pending"] = 2] = "Pending";
|
|
20
|
+
NotificationStatusEnum$1[NotificationStatusEnum$1["Batched"] = 3] = "Batched";
|
|
21
|
+
NotificationStatusEnum$1[NotificationStatusEnum$1["Delivered"] = 4] = "Delivered";
|
|
22
|
+
NotificationStatusEnum$1[NotificationStatusEnum$1["Error"] = 5] = "Error";
|
|
23
|
+
return NotificationStatusEnum$1;
|
|
21
24
|
}({});
|
|
22
25
|
|
|
23
26
|
//#endregion
|
|
24
|
-
exports.
|
|
27
|
+
exports.NotificationStatusEnum = NotificationStatusEnum;
|
|
28
|
+
exports.NotificationTypeEnum = NotificationTypeEnum;
|
|
25
29
|
//# sourceMappingURL=index9.cjs.map
|
package/dist/index9.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index9.cjs","names":[],"sources":["../src/types/
|
|
1
|
+
{"version":3,"file":"index9.cjs","names":[],"sources":["../src/types/notifications.d.ts"],"sourcesContent":["export type NotificationType = 3 | 6 | 7 | 8 | 10 | 11 | 15 | 26 | 33 | 34 | 35\n\nexport enum NotificationTypeEnum {\n 'Profile data validation' = 3,\n 'Document received' = 6,\n 'Document validated' = 7,\n 'Document cancelled' = 8,\n 'User profile changed' = 10,\n 'Taxpayer profile changed' = 11,\n 'Document rejection initiated' = 15,\n 'ERP data validation' = 26,\n 'Documents processing summary' = 33,\n 'Document Template Published' = 34,\n 'Document Template Deletion' = 35,\n}\n\nexport type NotificationStatus = 1 | 2 | 3 | 4 | 5\n\nexport enum NotificationStatusEnum {\n 'New' = 1,\n 'Pending' = 2,\n 'Batched' = 3,\n 'Delivered' = 4,\n 'Error' = 5,\n}\n\nexport type NotificationDeliveryAttempt = {\n attemptDateTime: string\n status: string\n statusDetails: string\n}\n\nexport type NotificationMetadata = {\n hasNext: boolean\n}\n\nexport type Notification = {\n notificationId: string\n receiverNName: string\n notificationDeliveryId: string\n creationDateTime: string\n receivedDateTime: string\n notificationSubject: string\n deliveredDateTime: string\n typeId: string\n typeName: string\n finalMessage: string\n address: string\n language: string\n status: string\n deliveryAttempts: NotificationDeliveryAttempt[]\n}\n\nexport type NotificationResponse = {\n notifications: Notification[]\n metadata: NotificationMetadata\n}\n\nexport type NotificationSearchParams = {\n dateFrom?: string\n dateTo?: string\n type?: NotificationType\n language?: string\n status?: NotificationStatus\n pageNo?: number\n pageSize?: number\n}\n"],"mappings":";;AAEA,IAAY,wEAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACD;AAID,IAAY,4EAAL;AACL;AACA;AACA;AACA;AACA;;AACD"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { MSIC_0X_CODE } from "./0X-
|
|
2
|
-
import { MSIC_1X_CODE } from "./1X-
|
|
3
|
-
import { MSIC_2X_CODE } from "./2X-
|
|
4
|
-
import { MSIC_3X_CODE } from "./3X-
|
|
5
|
-
import { MSIC_4X_CODE } from "./4X-
|
|
6
|
-
import { MSIC_5X_CODE } from "./5X-
|
|
7
|
-
import { MSIC_6X_CODE } from "./6X-
|
|
8
|
-
import { MSIC_7X_CODE } from "./7X-
|
|
9
|
-
import { MSIC_8X_CODE } from "./8X-
|
|
10
|
-
import { MSIC_9X_CODE } from "./9X-
|
|
1
|
+
import { MSIC_0X_CODE } from "./0X-DZnB0al0.js";
|
|
2
|
+
import { MSIC_1X_CODE } from "./1X-Dg5J6Bfg.js";
|
|
3
|
+
import { MSIC_2X_CODE } from "./2X-D_qwTeDT.js";
|
|
4
|
+
import { MSIC_3X_CODE } from "./3X-BJHYxgxa.js";
|
|
5
|
+
import { MSIC_4X_CODE } from "./4X-BbZgoRHO.js";
|
|
6
|
+
import { MSIC_5X_CODE } from "./5X-oQRBnO0f.js";
|
|
7
|
+
import { MSIC_6X_CODE } from "./6X-B9I2XJa4.js";
|
|
8
|
+
import { MSIC_7X_CODE } from "./7X-Ckv9bbzG.js";
|
|
9
|
+
import { MSIC_8X_CODE } from "./8X-C37BJTl6.js";
|
|
10
|
+
import { MSIC_9X_CODE } from "./9X-_XRgT2-_.js";
|
|
11
11
|
|
|
12
12
|
//#region src/types/msic-codes.d.ts
|
|
13
13
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/api/notificationManagement.ts
|
|
2
|
+
async function getNotifications(context, params) {
|
|
3
|
+
const { fetch } = context;
|
|
4
|
+
const { dateFrom, dateTo, type, language, status, pageNo, pageSize } = params;
|
|
5
|
+
const queryParams = new URLSearchParams();
|
|
6
|
+
if (dateFrom) queryParams.set("dateFrom", dateFrom);
|
|
7
|
+
if (dateTo) queryParams.set("dateTo", dateTo);
|
|
8
|
+
if (type) queryParams.set("type", type.toString());
|
|
9
|
+
if (language) queryParams.set("language", language);
|
|
10
|
+
if (status) queryParams.set("status", status.toString());
|
|
11
|
+
if (pageNo) queryParams.set("pageNo", pageNo.toString());
|
|
12
|
+
if (pageSize) queryParams.set("pageSize", pageSize.toString());
|
|
13
|
+
const response = await fetch(`/api/v1.0/notifications/taxpayer?${queryParams.toString()}`);
|
|
14
|
+
const data = await response.json();
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { getNotifications };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/api/notificationManagement.ts
|
|
3
|
+
async function getNotifications(context, params) {
|
|
4
|
+
const { fetch } = context;
|
|
5
|
+
const { dateFrom, dateTo, type, language, status, pageNo, pageSize } = params;
|
|
6
|
+
const queryParams = new URLSearchParams();
|
|
7
|
+
if (dateFrom) queryParams.set("dateFrom", dateFrom);
|
|
8
|
+
if (dateTo) queryParams.set("dateTo", dateTo);
|
|
9
|
+
if (type) queryParams.set("type", type.toString());
|
|
10
|
+
if (language) queryParams.set("language", language);
|
|
11
|
+
if (status) queryParams.set("status", status.toString());
|
|
12
|
+
if (pageNo) queryParams.set("pageNo", pageNo.toString());
|
|
13
|
+
if (pageSize) queryParams.set("pageSize", pageSize.toString());
|
|
14
|
+
const response = await fetch(`/api/v1.0/notifications/taxpayer?${queryParams.toString()}`);
|
|
15
|
+
const data = await response.json();
|
|
16
|
+
return data;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
Object.defineProperty(exports, 'getNotifications', {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return getNotifications;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=notificationManagement-C_qrFwWL.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationManagement-C_qrFwWL.cjs","names":["context: NotificationContext","params: NotificationSearchParams"],"sources":["../src/api/notificationManagement.ts"],"sourcesContent":["import type {\n NotificationResponse,\n NotificationSearchParams,\n StandardError,\n Fetch,\n} from '../types'\n\ninterface NotificationContext {\n fetch: Fetch\n}\n\nexport async function getNotifications(\n context: NotificationContext,\n params: NotificationSearchParams,\n): Promise<NotificationResponse | StandardError> {\n const { fetch } = context\n const { dateFrom, dateTo, type, language, status, pageNo, pageSize } = params\n\n const queryParams = new URLSearchParams()\n if (dateFrom) queryParams.set('dateFrom', dateFrom)\n if (dateTo) queryParams.set('dateTo', dateTo)\n if (type) queryParams.set('type', type.toString())\n if (language) queryParams.set('language', language)\n if (status) queryParams.set('status', status.toString())\n if (pageNo) queryParams.set('pageNo', pageNo.toString())\n if (pageSize) queryParams.set('pageSize', pageSize.toString())\n\n const response = await fetch(\n `/api/v1.0/notifications/taxpayer?${queryParams.toString()}`,\n )\n\n const data = (await response.json()) as NotificationResponse\n\n return data\n}\n"],"mappings":";;AAWA,eAAsB,iBACpBA,SACAC,QAC+C;CAC/C,MAAM,EAAE,OAAO,GAAG;CAClB,MAAM,EAAE,UAAU,QAAQ,MAAM,UAAU,QAAQ,QAAQ,UAAU,GAAG;CAEvE,MAAM,cAAc,IAAI;AACxB,KAAI,SAAU,aAAY,IAAI,YAAY,SAAS;AACnD,KAAI,OAAQ,aAAY,IAAI,UAAU,OAAO;AAC7C,KAAI,KAAM,aAAY,IAAI,QAAQ,KAAK,UAAU,CAAC;AAClD,KAAI,SAAU,aAAY,IAAI,YAAY,SAAS;AACnD,KAAI,OAAQ,aAAY,IAAI,UAAU,OAAO,UAAU,CAAC;AACxD,KAAI,OAAQ,aAAY,IAAI,UAAU,OAAO,UAAU,CAAC;AACxD,KAAI,SAAU,aAAY,IAAI,YAAY,SAAS,UAAU,CAAC;CAE9D,MAAM,WAAW,MAAM,OACpB,mCAAmC,YAAY,UAAU,CAAC,EAC5D;CAED,MAAM,OAAQ,MAAM,SAAS,MAAM;AAEnC,QAAO;AACR"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region src/types/notifications.d.ts
|
|
2
|
+
type NotificationType = 3 | 6 | 7 | 8 | 10 | 11 | 15 | 26 | 33 | 34 | 35;
|
|
3
|
+
declare enum NotificationTypeEnum {
|
|
4
|
+
'Profile data validation' = 3,
|
|
5
|
+
'Document received' = 6,
|
|
6
|
+
'Document validated' = 7,
|
|
7
|
+
'Document cancelled' = 8,
|
|
8
|
+
'User profile changed' = 10,
|
|
9
|
+
'Taxpayer profile changed' = 11,
|
|
10
|
+
'Document rejection initiated' = 15,
|
|
11
|
+
'ERP data validation' = 26,
|
|
12
|
+
'Documents processing summary' = 33,
|
|
13
|
+
'Document Template Published' = 34,
|
|
14
|
+
'Document Template Deletion' = 35,
|
|
15
|
+
}
|
|
16
|
+
type NotificationStatus = 1 | 2 | 3 | 4 | 5;
|
|
17
|
+
declare enum NotificationStatusEnum {
|
|
18
|
+
'New' = 1,
|
|
19
|
+
'Pending' = 2,
|
|
20
|
+
'Batched' = 3,
|
|
21
|
+
'Delivered' = 4,
|
|
22
|
+
'Error' = 5,
|
|
23
|
+
}
|
|
24
|
+
type NotificationDeliveryAttempt = {
|
|
25
|
+
attemptDateTime: string;
|
|
26
|
+
status: string;
|
|
27
|
+
statusDetails: string;
|
|
28
|
+
};
|
|
29
|
+
type NotificationMetadata = {
|
|
30
|
+
hasNext: boolean;
|
|
31
|
+
};
|
|
32
|
+
type Notification = {
|
|
33
|
+
notificationId: string;
|
|
34
|
+
receiverNName: string;
|
|
35
|
+
notificationDeliveryId: string;
|
|
36
|
+
creationDateTime: string;
|
|
37
|
+
receivedDateTime: string;
|
|
38
|
+
notificationSubject: string;
|
|
39
|
+
deliveredDateTime: string;
|
|
40
|
+
typeId: string;
|
|
41
|
+
typeName: string;
|
|
42
|
+
finalMessage: string;
|
|
43
|
+
address: string;
|
|
44
|
+
language: string;
|
|
45
|
+
status: string;
|
|
46
|
+
deliveryAttempts: NotificationDeliveryAttempt[];
|
|
47
|
+
};
|
|
48
|
+
type NotificationResponse = {
|
|
49
|
+
notifications: Notification[];
|
|
50
|
+
metadata: NotificationMetadata;
|
|
51
|
+
};
|
|
52
|
+
type NotificationSearchParams = {
|
|
53
|
+
dateFrom?: string;
|
|
54
|
+
dateTo?: string;
|
|
55
|
+
type?: NotificationType;
|
|
56
|
+
language?: string;
|
|
57
|
+
status?: NotificationStatus;
|
|
58
|
+
pageNo?: number;
|
|
59
|
+
pageSize?: number;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
export { Notification, NotificationDeliveryAttempt, NotificationMetadata, NotificationResponse, NotificationSearchParams, NotificationStatus, NotificationStatusEnum, NotificationType, NotificationTypeEnum };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
//#region src/types/notifications.d.ts
|
|
2
|
+
type NotificationType = 3 | 6 | 7 | 8 | 10 | 11 | 15 | 26 | 33 | 34 | 35;
|
|
3
|
+
declare enum NotificationTypeEnum {
|
|
4
|
+
'Profile data validation' = 3,
|
|
5
|
+
'Document received' = 6,
|
|
6
|
+
'Document validated' = 7,
|
|
7
|
+
'Document cancelled' = 8,
|
|
8
|
+
'User profile changed' = 10,
|
|
9
|
+
'Taxpayer profile changed' = 11,
|
|
10
|
+
'Document rejection initiated' = 15,
|
|
11
|
+
'ERP data validation' = 26,
|
|
12
|
+
'Documents processing summary' = 33,
|
|
13
|
+
'Document Template Published' = 34,
|
|
14
|
+
'Document Template Deletion' = 35,
|
|
15
|
+
}
|
|
16
|
+
type NotificationStatus = 1 | 2 | 3 | 4 | 5;
|
|
17
|
+
declare enum NotificationStatusEnum {
|
|
18
|
+
'New' = 1,
|
|
19
|
+
'Pending' = 2,
|
|
20
|
+
'Batched' = 3,
|
|
21
|
+
'Delivered' = 4,
|
|
22
|
+
'Error' = 5,
|
|
23
|
+
}
|
|
24
|
+
type NotificationDeliveryAttempt = {
|
|
25
|
+
attemptDateTime: string;
|
|
26
|
+
status: string;
|
|
27
|
+
statusDetails: string;
|
|
28
|
+
};
|
|
29
|
+
type NotificationMetadata = {
|
|
30
|
+
hasNext: boolean;
|
|
31
|
+
};
|
|
32
|
+
type Notification = {
|
|
33
|
+
notificationId: string;
|
|
34
|
+
receiverNName: string;
|
|
35
|
+
notificationDeliveryId: string;
|
|
36
|
+
creationDateTime: string;
|
|
37
|
+
receivedDateTime: string;
|
|
38
|
+
notificationSubject: string;
|
|
39
|
+
deliveredDateTime: string;
|
|
40
|
+
typeId: string;
|
|
41
|
+
typeName: string;
|
|
42
|
+
finalMessage: string;
|
|
43
|
+
address: string;
|
|
44
|
+
language: string;
|
|
45
|
+
status: string;
|
|
46
|
+
deliveryAttempts: NotificationDeliveryAttempt[];
|
|
47
|
+
};
|
|
48
|
+
type NotificationResponse = {
|
|
49
|
+
notifications: Notification[];
|
|
50
|
+
metadata: NotificationMetadata;
|
|
51
|
+
};
|
|
52
|
+
type NotificationSearchParams = {
|
|
53
|
+
dateFrom?: string;
|
|
54
|
+
dateTo?: string;
|
|
55
|
+
type?: NotificationType;
|
|
56
|
+
language?: string;
|
|
57
|
+
status?: NotificationStatus;
|
|
58
|
+
pageNo?: number;
|
|
59
|
+
pageSize?: number;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
export { Notification, NotificationDeliveryAttempt, NotificationMetadata, NotificationResponse, NotificationSearchParams, NotificationStatus, NotificationStatusEnum, NotificationType, NotificationTypeEnum };
|
|
63
|
+
//# sourceMappingURL=notifications-DdlEkprb.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/api/
|
|
2
|
+
//#region src/api/platformLogin.ts
|
|
3
3
|
const platformLogin = async (client) => {
|
|
4
4
|
const { clientId, clientSecret, baseUrl, onBehalfOf, debug } = client;
|
|
5
5
|
try {
|
|
@@ -34,4 +34,4 @@ Object.defineProperty(exports, 'platformLogin', {
|
|
|
34
34
|
return platformLogin;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
//# sourceMappingURL=platformLogin-
|
|
37
|
+
//# sourceMappingURL=platformLogin-CPiPiVUh.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platformLogin-CPiPiVUh.cjs","names":["client: ClientCredentials","tokenResponse: TokenResponse"],"sources":["../src/api/platformLogin.ts"],"sourcesContent":["import type { ClientCredentials, TokenResponse } from '../types'\n\nexport const platformLogin = async (\n client: ClientCredentials,\n): Promise<{\n token: string\n tokenExpiration: Date\n}> => {\n const { clientId, clientSecret, baseUrl, onBehalfOf, debug } = client\n try {\n const response = await fetch(`${baseUrl}/connect/token`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n ...(onBehalfOf ? { onbehalfof: onBehalfOf } : {}),\n },\n body: new URLSearchParams({\n grant_type: 'client_credentials',\n client_id: clientId,\n client_secret: clientSecret,\n scope: 'InvoicingAPI',\n }),\n })\n\n const tokenResponse: TokenResponse = await response.json()\n return {\n token: tokenResponse.access_token,\n tokenExpiration: new Date(Date.now() + tokenResponse.expires_in * 1000),\n }\n } catch (error) {\n if (debug) console.error(error)\n throw error\n }\n}\n"],"mappings":";;AAEA,MAAa,gBAAgB,OAC3BA,WAII;CACJ,MAAM,EAAE,UAAU,cAAc,SAAS,YAAY,OAAO,GAAG;AAC/D,KAAI;EACF,MAAM,WAAW,MAAM,OAAO,EAAE,QAAQ,iBAAiB;GACvD,QAAQ;GACR,SAAS;IACP,gBAAgB;IAChB,GAAI,aAAa,EAAE,YAAY,WAAY,IAAG,CAAE;GACjD;GACD,MAAM,IAAI,gBAAgB;IACxB,YAAY;IACZ,WAAW;IACX,eAAe;IACf,OAAO;GACR;EACF,EAAC;EAEF,MAAMC,gBAA+B,MAAM,SAAS,MAAM;AAC1D,SAAO;GACL,OAAO,cAAc;GACrB,iBAAiB,IAAI,KAAK,KAAK,KAAK,GAAG,cAAc,aAAa;EACnE;CACF,SAAQ,OAAO;AACd,MAAI,MAAO,SAAQ,MAAM,MAAM;AAC/B,QAAM;CACP;AACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MSICCode } from "./msic-codes-CiPeemFK.js";
|
|
2
|
+
import { RegistrationType } from "./documents-BgXt86Qp.js";
|
|
3
|
+
|
|
4
|
+
//#region src/types/taxpayer.d.ts
|
|
5
|
+
interface TaxpayerQRCodeResponse {
|
|
6
|
+
tin: string;
|
|
7
|
+
name: string;
|
|
8
|
+
idType: RegistrationType;
|
|
9
|
+
idNumber: string;
|
|
10
|
+
sst: string;
|
|
11
|
+
email: string;
|
|
12
|
+
contactNumber: string;
|
|
13
|
+
ttx: string;
|
|
14
|
+
businessActivityDescriptionBM: string;
|
|
15
|
+
businessActivityDescriptionEN: string;
|
|
16
|
+
msic: MSICCode['code'];
|
|
17
|
+
addressLine1: string;
|
|
18
|
+
addressLine2: string;
|
|
19
|
+
postalZone: string;
|
|
20
|
+
city: string;
|
|
21
|
+
state: string;
|
|
22
|
+
country: string;
|
|
23
|
+
generatedTimestamp: string;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { TaxpayerQRCodeResponse };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MSICCode } from "./msic-codes-CIKdPqag.cjs";
|
|
2
|
+
import { RegistrationType } from "./documents-BqM9qOnB.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/types/taxpayer.d.ts
|
|
5
|
+
interface TaxpayerQRCodeResponse {
|
|
6
|
+
tin: string;
|
|
7
|
+
name: string;
|
|
8
|
+
idType: RegistrationType;
|
|
9
|
+
idNumber: string;
|
|
10
|
+
sst: string;
|
|
11
|
+
email: string;
|
|
12
|
+
contactNumber: string;
|
|
13
|
+
ttx: string;
|
|
14
|
+
businessActivityDescriptionBM: string;
|
|
15
|
+
businessActivityDescriptionEN: string;
|
|
16
|
+
msic: MSICCode['code'];
|
|
17
|
+
addressLine1: string;
|
|
18
|
+
addressLine2: string;
|
|
19
|
+
postalZone: string;
|
|
20
|
+
city: string;
|
|
21
|
+
state: string;
|
|
22
|
+
country: string;
|
|
23
|
+
generatedTimestamp: string;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { TaxpayerQRCodeResponse };
|
|
27
|
+
//# sourceMappingURL=taxpayer-sGkviG8J.d.cts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//#region src/api/taxpayerValidation.ts
|
|
2
|
+
async function tinSearch(context, params) {
|
|
3
|
+
const { fetch, debug } = context;
|
|
4
|
+
const { taxpayerName, idType, idValue } = params;
|
|
5
|
+
if (!taxpayerName && (!idType || !idValue)) throw new Error("Either taxpayerName must be provided, or both idType and idValue must be provided");
|
|
6
|
+
if (idType && !idValue || !idType && idValue) throw new Error("idType and idValue must be provided together");
|
|
7
|
+
const queryParams = new URLSearchParams();
|
|
8
|
+
if (taxpayerName) queryParams.append("taxpayerName", taxpayerName);
|
|
9
|
+
if (idType && idValue) {
|
|
10
|
+
queryParams.append("idType", idType);
|
|
11
|
+
queryParams.append("idValue", idValue);
|
|
12
|
+
}
|
|
13
|
+
const queryString = queryParams.toString();
|
|
14
|
+
try {
|
|
15
|
+
const response = await fetch(`/api/v1.0/taxpayer/search/tin?${queryString}`, { method: "GET" });
|
|
16
|
+
if (response.status === 200) return await response.json();
|
|
17
|
+
if (response.status === 400) {
|
|
18
|
+
const errorData$1 = await response.json();
|
|
19
|
+
if (debug) console.error("TIN search failed - search criteria not conclusive or invalid parameters:", errorData$1);
|
|
20
|
+
return errorData$1;
|
|
21
|
+
}
|
|
22
|
+
if (response.status === 404) {
|
|
23
|
+
const errorData$1 = await response.json();
|
|
24
|
+
if (debug) console.error("TIN search failed - no TIN found for given search criteria:", errorData$1);
|
|
25
|
+
return errorData$1;
|
|
26
|
+
}
|
|
27
|
+
const errorData = await response.json();
|
|
28
|
+
if (debug) console.error("TIN search failed with status:", response.status, errorData);
|
|
29
|
+
return errorData;
|
|
30
|
+
} catch (error) {
|
|
31
|
+
if (debug) console.error("TIN search error:", error);
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async function verifyTin(context, tin, idType, idValue) {
|
|
36
|
+
const { fetch, debug } = context;
|
|
37
|
+
try {
|
|
38
|
+
const response = await fetch(`/api/v1.0/taxpayer/validate/${tin}?idType=${idType}&idValue=${idValue}`, { method: "GET" });
|
|
39
|
+
if (response.status === 200) return true;
|
|
40
|
+
return false;
|
|
41
|
+
} catch (error) {
|
|
42
|
+
if (debug) console.error(error);
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async function taxpayerQRCode(context, qrCodeText) {
|
|
47
|
+
const { fetch } = context;
|
|
48
|
+
const base64EncodedQRCodeText = Buffer.from(qrCodeText).toString("base64");
|
|
49
|
+
const response = await fetch(`/api/v1.0/taxpayer/qrcodeinfo/${base64EncodedQRCodeText}`);
|
|
50
|
+
return response.json();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { taxpayerQRCode, tinSearch, verifyTin };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/api/taxpayerValidation.ts
|
|
3
|
+
async function tinSearch(context, params) {
|
|
4
|
+
const { fetch, debug } = context;
|
|
5
|
+
const { taxpayerName, idType, idValue } = params;
|
|
6
|
+
if (!taxpayerName && (!idType || !idValue)) throw new Error("Either taxpayerName must be provided, or both idType and idValue must be provided");
|
|
7
|
+
if (idType && !idValue || !idType && idValue) throw new Error("idType and idValue must be provided together");
|
|
8
|
+
const queryParams = new URLSearchParams();
|
|
9
|
+
if (taxpayerName) queryParams.append("taxpayerName", taxpayerName);
|
|
10
|
+
if (idType && idValue) {
|
|
11
|
+
queryParams.append("idType", idType);
|
|
12
|
+
queryParams.append("idValue", idValue);
|
|
13
|
+
}
|
|
14
|
+
const queryString = queryParams.toString();
|
|
15
|
+
try {
|
|
16
|
+
const response = await fetch(`/api/v1.0/taxpayer/search/tin?${queryString}`, { method: "GET" });
|
|
17
|
+
if (response.status === 200) return await response.json();
|
|
18
|
+
if (response.status === 400) {
|
|
19
|
+
const errorData$1 = await response.json();
|
|
20
|
+
if (debug) console.error("TIN search failed - search criteria not conclusive or invalid parameters:", errorData$1);
|
|
21
|
+
return errorData$1;
|
|
22
|
+
}
|
|
23
|
+
if (response.status === 404) {
|
|
24
|
+
const errorData$1 = await response.json();
|
|
25
|
+
if (debug) console.error("TIN search failed - no TIN found for given search criteria:", errorData$1);
|
|
26
|
+
return errorData$1;
|
|
27
|
+
}
|
|
28
|
+
const errorData = await response.json();
|
|
29
|
+
if (debug) console.error("TIN search failed with status:", response.status, errorData);
|
|
30
|
+
return errorData;
|
|
31
|
+
} catch (error) {
|
|
32
|
+
if (debug) console.error("TIN search error:", error);
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async function verifyTin(context, tin, idType, idValue) {
|
|
37
|
+
const { fetch, debug } = context;
|
|
38
|
+
try {
|
|
39
|
+
const response = await fetch(`/api/v1.0/taxpayer/validate/${tin}?idType=${idType}&idValue=${idValue}`, { method: "GET" });
|
|
40
|
+
if (response.status === 200) return true;
|
|
41
|
+
return false;
|
|
42
|
+
} catch (error) {
|
|
43
|
+
if (debug) console.error(error);
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function taxpayerQRCode(context, qrCodeText) {
|
|
48
|
+
const { fetch } = context;
|
|
49
|
+
const base64EncodedQRCodeText = Buffer.from(qrCodeText).toString("base64");
|
|
50
|
+
const response = await fetch(`/api/v1.0/taxpayer/qrcodeinfo/${base64EncodedQRCodeText}`);
|
|
51
|
+
return response.json();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
Object.defineProperty(exports, 'taxpayerQRCode', {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () {
|
|
58
|
+
return taxpayerQRCode;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, 'tinSearch', {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () {
|
|
64
|
+
return tinSearch;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, 'verifyTin', {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () {
|
|
70
|
+
return verifyTin;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=taxpayerValidation-DdeXCvPT.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taxpayerValidation-DdeXCvPT.cjs","names":["context: TaxpayerContext","params: TinSearchParams","errorData","tin: string","idType: RegistrationType","idValue: string","qrCodeText: string"],"sources":["../src/api/taxpayerValidation.ts"],"sourcesContent":["import type {\n Fetch,\n RegistrationType,\n StandardError,\n TaxpayerQRCodeResponse,\n} from '../types'\n\ninterface TaxpayerContext {\n fetch: Fetch\n debug: boolean\n}\n\ninterface TinSearchParams {\n taxpayerName?: string\n idType?: RegistrationType\n idValue?: string\n}\n\ninterface TinSearchResponse {\n tin: string\n}\n\nexport async function tinSearch(\n context: TaxpayerContext,\n params: TinSearchParams,\n): Promise<TinSearchResponse | StandardError> {\n const { fetch, debug } = context\n const { taxpayerName, idType, idValue } = params\n\n // Validate input parameters according to API requirements\n if (!taxpayerName && (!idType || !idValue)) {\n throw new Error(\n 'Either taxpayerName must be provided, or both idType and idValue must be provided',\n )\n }\n\n if ((idType && !idValue) || (!idType && idValue)) {\n throw new Error('idType and idValue must be provided together')\n }\n\n // Build query parameters\n const queryParams = new URLSearchParams()\n\n if (taxpayerName) {\n queryParams.append('taxpayerName', taxpayerName)\n }\n\n if (idType && idValue) {\n queryParams.append('idType', idType)\n queryParams.append('idValue', idValue)\n }\n\n const queryString = queryParams.toString()\n\n try {\n const response = await fetch(\n `/api/v1.0/taxpayer/search/tin?${queryString}`,\n {\n method: 'GET',\n },\n )\n\n if (response.status === 200) {\n return (await response.json()) as TinSearchResponse\n }\n\n // Handle specific error cases mentioned in the API documentation\n if (response.status === 400) {\n const errorData = (await response.json()) as StandardError\n if (debug) {\n console.error(\n 'TIN search failed - search criteria not conclusive or invalid parameters:',\n errorData,\n )\n }\n return errorData\n }\n\n if (response.status === 404) {\n const errorData = (await response.json()) as StandardError\n if (debug) {\n console.error(\n 'TIN search failed - no TIN found for given search criteria:',\n errorData,\n )\n }\n return errorData\n }\n\n // Handle other error status codes\n const errorData = (await response.json()) as StandardError\n if (debug) {\n console.error(\n 'TIN search failed with status:',\n response.status,\n errorData,\n )\n }\n return errorData\n } catch (error) {\n if (debug) {\n console.error('TIN search error:', error)\n }\n throw error\n }\n}\n\nexport async function verifyTin(\n context: TaxpayerContext,\n tin: string,\n idType: RegistrationType,\n idValue: string,\n): Promise<boolean> {\n const { fetch, debug } = context\n\n try {\n const response = await fetch(\n `/api/v1.0/taxpayer/validate/${tin}?idType=${idType}&idValue=${idValue}`,\n {\n method: 'GET',\n },\n )\n\n if (response.status === 200) {\n return true\n }\n\n return false\n } catch (error) {\n if (debug) {\n console.error(error)\n }\n return false\n }\n}\n\nexport async function taxpayerQRCode(\n context: TaxpayerContext,\n qrCodeText: string,\n): Promise<TaxpayerQRCodeResponse | StandardError> {\n const { fetch } = context\n\n const base64EncodedQRCodeText = Buffer.from(qrCodeText).toString('base64')\n\n const response = await fetch(\n `/api/v1.0/taxpayer/qrcodeinfo/${base64EncodedQRCodeText}`,\n )\n\n return response.json()\n}\n"],"mappings":";;AAsBA,eAAsB,UACpBA,SACAC,QAC4C;CAC5C,MAAM,EAAE,OAAO,OAAO,GAAG;CACzB,MAAM,EAAE,cAAc,QAAQ,SAAS,GAAG;AAG1C,MAAK,kBAAkB,WAAW,SAChC,OAAM,IAAI,MACR;AAIJ,KAAK,WAAW,YAAc,UAAU,QACtC,OAAM,IAAI,MAAM;CAIlB,MAAM,cAAc,IAAI;AAExB,KAAI,aACF,aAAY,OAAO,gBAAgB,aAAa;AAGlD,KAAI,UAAU,SAAS;AACrB,cAAY,OAAO,UAAU,OAAO;AACpC,cAAY,OAAO,WAAW,QAAQ;CACvC;CAED,MAAM,cAAc,YAAY,UAAU;AAE1C,KAAI;EACF,MAAM,WAAW,MAAM,OACpB,gCAAgC,YAAY,GAC7C,EACE,QAAQ,MACT,EACF;AAED,MAAI,SAAS,WAAW,IACtB,QAAQ,MAAM,SAAS,MAAM;AAI/B,MAAI,SAAS,WAAW,KAAK;GAC3B,MAAMC,cAAa,MAAM,SAAS,MAAM;AACxC,OAAI,MACF,SAAQ,MACN,6EACAA,YACD;AAEH,UAAOA;EACR;AAED,MAAI,SAAS,WAAW,KAAK;GAC3B,MAAMA,cAAa,MAAM,SAAS,MAAM;AACxC,OAAI,MACF,SAAQ,MACN,+DACAA,YACD;AAEH,UAAOA;EACR;EAGD,MAAM,YAAa,MAAM,SAAS,MAAM;AACxC,MAAI,MACF,SAAQ,MACN,kCACA,SAAS,QACT,UACD;AAEH,SAAO;CACR,SAAQ,OAAO;AACd,MAAI,MACF,SAAQ,MAAM,qBAAqB,MAAM;AAE3C,QAAM;CACP;AACF;AAED,eAAsB,UACpBF,SACAG,KACAC,QACAC,SACkB;CAClB,MAAM,EAAE,OAAO,OAAO,GAAG;AAEzB,KAAI;EACF,MAAM,WAAW,MAAM,OACpB,8BAA8B,IAAI,UAAU,OAAO,WAAW,QAAQ,GACvE,EACE,QAAQ,MACT,EACF;AAED,MAAI,SAAS,WAAW,IACtB,QAAO;AAGT,SAAO;CACR,SAAQ,OAAO;AACd,MAAI,MACF,SAAQ,MAAM,MAAM;AAEtB,SAAO;CACR;AACF;AAED,eAAsB,eACpBL,SACAM,YACiD;CACjD,MAAM,EAAE,OAAO,GAAG;CAElB,MAAM,0BAA0B,OAAO,KAAK,WAAW,CAAC,SAAS,SAAS;CAE1E,MAAM,WAAW,MAAM,OACpB,gCAAgC,wBAAwB,EAC1D;AAED,QAAO,SAAS,MAAM;AACvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Classification, ClassificationCode, ClassificationCodeEnum } from "../classification-codes-
|
|
1
|
+
import { Classification, ClassificationCode, ClassificationCodeEnum } from "../classification-codes-B1D5xbq5.js";
|
|
2
2
|
export { Classification, ClassificationCode, ClassificationCodeEnum };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Country, CountryCode, CountryCodeEnum, CountryNameEnum } from "../country-code-
|
|
1
|
+
import { Country, CountryCode, CountryCodeEnum, CountryNameEnum } from "../country-code-D42kAyNH.js";
|
|
2
2
|
export { Country, CountryCode, CountryCodeEnum, CountryNameEnum };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Currency, CurrencyCode, CurrencyCodeEnum } from "../currencies-
|
|
1
|
+
import { Currency, CurrencyCode, CurrencyCodeEnum } from "../currencies-CDveO_yz.js";
|
|
2
2
|
export { Currency, CurrencyCode, CurrencyCodeEnum };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import "../classification-codes-
|
|
2
|
-
import "../currencies-
|
|
3
|
-
import "../e-invoice-
|
|
4
|
-
import "../0X-
|
|
5
|
-
import "../1X-
|
|
6
|
-
import "../2X-
|
|
7
|
-
import "../3X-
|
|
8
|
-
import "../4X-
|
|
9
|
-
import "../5X-
|
|
10
|
-
import "../6X-
|
|
11
|
-
import "../7X-
|
|
12
|
-
import "../8X-
|
|
13
|
-
import "../9X-
|
|
14
|
-
import "../msic-codes-
|
|
15
|
-
import "../signatures-
|
|
16
|
-
import "../tax-types-
|
|
17
|
-
import { Address, Buyer, CompleteInvoice, DocumentStatus, DocumentSummary, DocumentValidationResult, DocumentValidationStepResult, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, LegalMonetaryTotal, RegistrationType, ResponseDocument, SignedInfoObject, SignedInvoiceSubmission, SignedPropertiesData, SignedPropertiesObject, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, UBLDocument } from "../documents-
|
|
18
|
-
export { Address, Buyer, CompleteInvoice, DocumentStatus, DocumentSummary, DocumentValidationResult, DocumentValidationStepResult, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, LegalMonetaryTotal, RegistrationType, ResponseDocument, SignedInfoObject, SignedInvoiceSubmission, SignedPropertiesData, SignedPropertiesObject, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, UBLDocument };
|
|
1
|
+
import "../classification-codes-B1D5xbq5.js";
|
|
2
|
+
import "../currencies-CDveO_yz.js";
|
|
3
|
+
import "../e-invoice-BxNC6V_j.js";
|
|
4
|
+
import "../0X-DZnB0al0.js";
|
|
5
|
+
import "../1X-Dg5J6Bfg.js";
|
|
6
|
+
import "../2X-D_qwTeDT.js";
|
|
7
|
+
import "../3X-BJHYxgxa.js";
|
|
8
|
+
import "../4X-BbZgoRHO.js";
|
|
9
|
+
import "../5X-oQRBnO0f.js";
|
|
10
|
+
import "../6X-B9I2XJa4.js";
|
|
11
|
+
import "../7X-Ckv9bbzG.js";
|
|
12
|
+
import "../8X-C37BJTl6.js";
|
|
13
|
+
import "../9X-_XRgT2-_.js";
|
|
14
|
+
import "../msic-codes-CiPeemFK.js";
|
|
15
|
+
import "../signatures-DOKNMiZI.js";
|
|
16
|
+
import "../tax-types-ieqw5Ze7.js";
|
|
17
|
+
import { Address, Buyer, CompleteInvoice, DocumentStatus, DocumentSummary, DocumentTypeResponse, DocumentTypeVersion, DocumentTypeVersionResponse, DocumentTypesResponse, DocumentValidationResult, DocumentValidationStepResult, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, LegalMonetaryTotal, RegistrationType, ResponseDocument, SignedInfoObject, SignedInvoiceSubmission, SignedPropertiesData, SignedPropertiesObject, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, UBLDocument, WorkflowParameter } from "../documents-BgXt86Qp.js";
|
|
18
|
+
export { Address, Buyer, CompleteInvoice, DocumentStatus, DocumentSummary, DocumentTypeResponse, DocumentTypeVersion, DocumentTypeVersionResponse, DocumentTypesResponse, DocumentValidationResult, DocumentValidationStepResult, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, LegalMonetaryTotal, RegistrationType, ResponseDocument, SignedInfoObject, SignedInvoiceSubmission, SignedPropertiesData, SignedPropertiesObject, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, UBLDocument, WorkflowParameter };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EInvoiceType, EInvoiceTypeCode, EInvoiceTypeCodeEnum } from "../e-invoice-
|
|
1
|
+
import { EInvoiceType, EInvoiceTypeCode, EInvoiceTypeCodeEnum } from "../e-invoice-BxNC6V_j.js";
|
|
2
2
|
export { EInvoiceType, EInvoiceTypeCode, EInvoiceTypeCodeEnum };
|