@feedmepos/mf-payment 0.0.0-beta.8 → 1.0.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. package/dist/AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js +39 -0
  2. package/dist/AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js +42 -0
  3. package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js +40 -0
  4. package/dist/Modal-DB8M9o1T.js +13 -0
  5. package/dist/PayoutAccount-BHRhEZ9h.js +613 -0
  6. package/dist/{PayoutAccount-CpatyqJa.js → PayoutAccount-Bj5zvmoj.js} +38 -35
  7. package/dist/PayoutAccountSetting-kUQLeAcb.js +780 -0
  8. package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js +33 -0
  9. package/dist/Settlement-Crdfq22j.js +149 -0
  10. package/dist/Settlement-JHOJNkhd.js +194 -0
  11. package/dist/{SettlementTransactions-DT1A_tI5.js → SettlementTransactions-BxuLXUR-.js} +99 -105
  12. package/dist/{SettlementTransactions-CkU0gCHb.js → SettlementTransactions-daWMAmtz.js} +117 -130
  13. package/dist/Terminal-gxGnjFGc.js +372 -0
  14. package/dist/TerminalSetting--ZAJJ_Hf.js +379 -0
  15. package/dist/TerminalTransaction---9nk_4q.js +249 -0
  16. package/dist/TerminalTransaction-B77YK3hF.js +425 -0
  17. package/dist/Transaction-8LlOLPeZ.js +404 -0
  18. package/dist/Transaction-DRQ_uZ30.js +241 -0
  19. package/dist/api/index.d.ts +14 -0
  20. package/dist/api/pagination.d.ts +20 -0
  21. package/dist/api/payment-gateway/index.d.ts +9 -0
  22. package/dist/api/settlement/index.d.ts +12 -13
  23. package/dist/api/terminal/index.d.ts +13 -1
  24. package/dist/api/terminal-transaction/index.d.ts +12 -1
  25. package/dist/api/transaction/index.d.ts +7 -2
  26. package/dist/app-DjzULXn3.js +6356 -0
  27. package/dist/app.js +3 -198
  28. package/dist/assets-NrCec-W0.js +45 -0
  29. package/dist/clipboard-4jh1WteU.js +10 -0
  30. package/dist/components/AsyncButton.vue.d.ts +21 -0
  31. package/dist/components/AutoCopyCell.vue.d.ts +6 -0
  32. package/dist/components/CursorTable/index.vue.d.ts +24 -5
  33. package/dist/components/RestaurantSelector.vue.d.ts +2 -0
  34. package/dist/components/RouteCell.vue.d.ts +8 -0
  35. package/dist/helpers/assets.d.ts +2 -0
  36. package/dist/{index-Bmka-1lQ.js → index-7KNaibcq.js} +1 -1
  37. package/dist/index-BWUtjGg7.js +47 -0
  38. package/dist/{index-CF56zGyu.js → index-BwcJZFsi.js} +1 -1
  39. package/dist/index-CWaKb7bG.js +56107 -0
  40. package/dist/index-CojhNtuG.js +127 -0
  41. package/dist/index-DbJpbpSs.js +52 -0
  42. package/dist/index.vue_vue_type_script_setup_true_lang-JdAFa8vy.js +167 -0
  43. package/dist/model/transaction.d.ts +2 -1
  44. package/dist/package.json +5 -5
  45. package/dist/payout-account-CBT1rfSS.js +1805 -0
  46. package/dist/router/index.d.ts +1 -0
  47. package/dist/stores/payoutAccount.d.ts +4 -4
  48. package/dist/transaction-CQiT7Y_s.js +87 -0
  49. package/dist/tsconfig.app.tsbuildinfo +1 -1
  50. package/dist/validator-D5jtpt9A.js +2877 -0
  51. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
  52. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +81 -0
  53. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
  54. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
  55. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +56 -0
  56. package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +50 -0
  57. package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +52 -0
  58. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  59. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +83 -0
  60. package/dist/views/admin/terminal/TerminalSetting.vue.d.ts +12 -0
  61. package/dist/views/admin/terminal/cell/Actions.vue.d.ts +80 -9
  62. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +94 -0
  63. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +94 -0
  64. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +85 -0
  65. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +94 -0
  66. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +7 -0
  67. package/dist/views/admin/transaction/TransactionTable.vue.d.ts +6 -2
  68. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +7 -0
  69. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
  70. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  71. package/dist/views/terminal-transaction/TerminalTransaction.vue.d.ts +2 -0
  72. package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +9 -0
  73. package/dist/views/terminal-transaction/cell/Status.vue.d.ts +9 -0
  74. package/package.json +5 -5
  75. package/dist/AdminLayout.vue_vue_type_script_setup_true_lang-oPYFBeEo.js +0 -42
  76. package/dist/PayoutAccount-C0xyoyTa.js +0 -3485
  77. package/dist/PayoutAccountSetting-CIeos0md.js +0 -425
  78. package/dist/Settlement-BVGACeme.js +0 -136
  79. package/dist/Settlement-Ce48KHrc.js +0 -132
  80. package/dist/Terminal-ByKV2Rof.js +0 -204
  81. package/dist/TerminalTransaction-ClhuAOOF.js +0 -240
  82. package/dist/Transaction-BYq9Ymp_.js +0 -242
  83. package/dist/Transaction-Doq11qIf.js +0 -241
  84. package/dist/api/auth/index.d.ts +0 -7
  85. package/dist/assets-Dg26uQOf.js +0 -1756
  86. package/dist/index-Coz5aeIO.js +0 -61
  87. package/dist/index-DCPNrUDq.js +0 -40075
  88. package/dist/index.vue_vue_type_script_setup_true_lang-CAR-bNaR.js +0 -150
  89. package/dist/mascot-side-D5UubCy7.js +0 -8
  90. package/dist/payout-account-D2Ftjrss.js +0 -3317
  91. package/dist/transaction-vRrBf3FN.js +0 -64
@@ -0,0 +1,127 @@
1
+ import { g as r, b as s, j as d, l as y, k as p, i as m, r as i } from "./index-CWaKb7bG.js";
2
+ import { h as c } from "./moment-h96o7c8I.js";
3
+ import { d as l } from "./dinero-CIVmXLL-.js";
4
+ function* f(t, n) {
5
+ const e = t[Symbol.iterator](), o = e.next();
6
+ if (!o.done) {
7
+ yield o.value;
8
+ for (const a of e)
9
+ yield n, yield a;
10
+ }
11
+ }
12
+ const A = {
13
+ async updateRemark(t) {
14
+ return r(
15
+ await s().put("/settlements/remark", t)
16
+ );
17
+ },
18
+ async readByDate(t) {
19
+ return r(
20
+ await s().get("/settlements", {
21
+ params: t
22
+ })
23
+ );
24
+ },
25
+ async downloadBankInstructionFile(t) {
26
+ const n = "7161151059", e = t.map((a) => ({
27
+ productCode: "P2A",
28
+ settlementDate: c().format("DDMMYYYY"),
29
+ myRefNo: "",
30
+ companyAccNo: n,
31
+ amount: l(a.totalPayout).toUnit().toString(),
32
+ currency: l.defaultCurrency,
33
+ proxyType: "",
34
+ transferType: "DFLT",
35
+ beneficiaryAccountNo: a.beneficiaryBank.accountNumber.toString().trim(),
36
+ beneficiarySwiftCode: a.beneficiaryBank.swiftCode,
37
+ beneficiaryCountryCode: "",
38
+ duitNowID: "",
39
+ recipientReference: a._id,
40
+ pf_payment: "",
41
+ notifyMethod: "",
42
+ emailAddress: ""
43
+ })), o = new Blob(
44
+ Array.from(
45
+ f(
46
+ e.map(
47
+ (a) => Object.values(a).map((u) => u).join("|")
48
+ ),
49
+ `
50
+ `
51
+ )
52
+ ),
53
+ {
54
+ type: "text/plain;charset=utf-8"
55
+ }
56
+ );
57
+ return d(o, "duitnow_bulk_transfer.txt");
58
+ },
59
+ async downloadSummaryReport(t, n) {
60
+ return y(
61
+ t.map((e) => p(e)),
62
+ {
63
+ filename: `summary-report-${n.start}-${n.end}.xlsx`,
64
+ exclude: [
65
+ "beneficiaryBank.swiftCode",
66
+ "beneficiaryBank.holderName",
67
+ "totalAmount.precision",
68
+ "totalFee.precision",
69
+ "totalPayout.precision",
70
+ "totalAmount.currency",
71
+ "totalFee.currency",
72
+ "totalPayout.currency"
73
+ ],
74
+ rename: {
75
+ _id: "id",
76
+ createdAt: "date",
77
+ "beneficiaryBank.name": "bank",
78
+ "beneficiaryBank.accountNumber": "bankAccountNumber",
79
+ "totalAmount.amount": "salesAmount",
80
+ "totalFee.amount": "feeAmount",
81
+ "totalPayout.amount": "settlementAmount",
82
+ "store.event": "event",
83
+ "store.id": "store"
84
+ },
85
+ transformers: {
86
+ createdAt: (e) => c(e).format("YYYY-MM-DD")
87
+ }
88
+ }
89
+ );
90
+ },
91
+ async downloadSettlementReport(t) {
92
+ return m(
93
+ await s().get("/settlements/audit/v2", {
94
+ params: t
95
+ }),
96
+ `settlement-report-${t.start}-${t.end}.xlsx`
97
+ );
98
+ },
99
+ async downloadRestaurantSettlementReport(t) {
100
+ return m(
101
+ await i().get("/settlements/report", {
102
+ params: t
103
+ }),
104
+ `settlement-report-${t.start}-${t.end}.xlsx`
105
+ );
106
+ },
107
+ async readById(t) {
108
+ return r(
109
+ await s().get(`/settlements/${t}`)
110
+ );
111
+ },
112
+ async readRestaurantSettlementById(t) {
113
+ return r(
114
+ await i().get(`/settlements/${t}`)
115
+ );
116
+ },
117
+ async readRestaurantSettlements(t) {
118
+ return r(
119
+ await i().get("/settlements", {
120
+ params: t
121
+ })
122
+ );
123
+ }
124
+ };
125
+ export {
126
+ A as s
127
+ };
@@ -0,0 +1,52 @@
1
+ import { g as n, b as s, a as t, r as i, l as r } from "./index-CWaKb7bG.js";
2
+ const b = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL4AAAC+CAYAAACLdLWdAAAAAXNSR0IB2cksfwAAAAlwSFlzAAADsQAAA7EB9YPtSQAAE8pJREFUeJztnQl0FHWexzv3fXXuCwIkIZAASSDIEQiQQAIhkHCEHOQ+uM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DSUlVazpC+dXUUOykOlWscZQpZEnydGRfEmLCPc1ClAdC7u7u4fpQ/NzKoob4o3kpqSPop8c1+087nvErYTIiX7JDGqTBBhAeFFXe9JnL7bLskI3e+erTPfH9NMuCLiuX7U9Z6VpR2V9AYj2D+PwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwis3/A2u2TM8QTZA2AAAAAElFTkSuQmCC", f = {
3
+ async queryTransaction(a) {
4
+ return n(
5
+ await s().get(
6
+ `/payments/terminal-transactions/${a}`
7
+ )
8
+ );
9
+ },
10
+ async refundTransaction(a) {
11
+ return n(
12
+ await s().post(
13
+ "/payments/terminal-transactions/refund",
14
+ {
15
+ ...a
16
+ }
17
+ )
18
+ );
19
+ },
20
+ async readTransactions(a) {
21
+ return t(
22
+ await s().get("/payments/terminal-transactions", {
23
+ params: a
24
+ })
25
+ );
26
+ },
27
+ async readRestaurantTransactions(a) {
28
+ return t(
29
+ await i().get("/terminal-transactions", {
30
+ params: a
31
+ })
32
+ );
33
+ },
34
+ async downloadTransactions(a) {
35
+ return r(a, {
36
+ // @ts-ignore : transform data types won't come together from Zod
37
+ exclude: ["logs", "owner", "details", "refund", "raw"],
38
+ rename: {
39
+ _id: "Transaction ID",
40
+ refId: "Reference ID",
41
+ terminalId: "Terminal ID",
42
+ transactionAt: "Transaction At",
43
+ action: "Status"
44
+ },
45
+ filename: "terminal-transaction-report.xlsx"
46
+ });
47
+ }
48
+ };
49
+ export {
50
+ b as E,
51
+ f as t
52
+ };
@@ -0,0 +1,167 @@
1
+ import { defineComponent as U, ref as r, resolveComponent as v, openBlock as w, createBlock as M, withCtx as z, createVNode as m, createElementVNode as u, normalizeStyle as T, createElementBlock as I, Fragment as $, renderList as j, computed as C, watch as L, onMounted as E, unref as P, toDisplayString as D, normalizeClass as O } from "vue";
2
+ import { u as R } from "./index-CWaKb7bG.js";
3
+ import "@feedmepos/ui-library";
4
+ const G = ["id"], S = /* @__PURE__ */ U({
5
+ __name: "FmTableSelection",
6
+ props: {
7
+ value: {},
8
+ items: {}
9
+ },
10
+ emits: ["update:modelValue"],
11
+ setup(p, { emit: F }) {
12
+ const h = F, f = p, i = r(!1);
13
+ return (g, y) => {
14
+ const k = v("FmButton"), V = v("FmMenuItem"), x = v("FmMenu");
15
+ return w(), M(x, {
16
+ "max-height": 264,
17
+ shift: "",
18
+ onMenuChanged: y[0] || (y[0] = (a) => i.value = a)
19
+ }, {
20
+ "menu-button": z(() => {
21
+ var a;
22
+ return [
23
+ m(k, {
24
+ icon: i.value ? "expand_less" : "expand_more",
25
+ label: (a = g.items.find((o) => o.value === f.value)) == null ? void 0 : a.label,
26
+ "icon-position": "append",
27
+ size: "md",
28
+ variant: "tertiary"
29
+ }, null, 8, ["icon", "label"])
30
+ ];
31
+ }),
32
+ "menu-wrapper": z(({ maxHeight: a }) => [
33
+ u("div", {
34
+ id: `menu-wrapper-${a}`,
35
+ style: T({ maxHeight: `${a}px` }),
36
+ class: "bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"
37
+ }, [
38
+ (w(!0), I($, null, j(g.items, (o) => (w(), M(V, {
39
+ key: o.value,
40
+ label: o.label,
41
+ value: o.value,
42
+ "model-value": o.value === f.value,
43
+ "onUpdate:modelValue": (n) => h("update:modelValue", o.value)
44
+ }, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
45
+ ], 12, G)
46
+ ]),
47
+ _: 1
48
+ });
49
+ };
50
+ }
51
+ }), H = { class: "basis-72 bg-white flex items-center justify-between px-24 pt-6" }, J = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, K = { class: "flex gap-8 items-center" }, Q = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible" }, W = {
52
+ class: /* @__PURE__ */ O(["flex gap-8 items-center"])
53
+ }, X = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, Y = { class: "flex gap-8" }, ae = /* @__PURE__ */ U({
54
+ __name: "index",
55
+ props: {
56
+ columnDefs: {
57
+ type: Array,
58
+ required: !0
59
+ },
60
+ rowsDefs: {
61
+ type: Function,
62
+ required: !0
63
+ },
64
+ paginate: {
65
+ type: Function,
66
+ required: !0
67
+ }
68
+ },
69
+ emits: ["row-click"],
70
+ setup(p, { expose: F, emit: h }) {
71
+ const f = [10, 20, 30, 50, 100].map((t) => ({
72
+ label: t.toString(),
73
+ value: t
74
+ })), i = p, g = h, { isLoading: y, startLoading: k, stopLoading: V } = R(!0), x = r(), a = r(), o = r(""), n = r(10), l = r(1), c = r(0), b = async function(t = !1) {
75
+ k(), t && (a.value = [], o.value = "", l.value = 1, c.value = 0);
76
+ const e = await i.paginate(n.value, o.value);
77
+ a.value = [...a.value ?? [], ...e.data], o.value = e.meta.cursor ?? "", c.value += 1, V();
78
+ }, q = C(() => l.value > 1), A = C(() => l.value < c.value ? !0 : o.value > ""), N = C(() => {
79
+ const t = n.value * (l.value - 1), e = t + n.value;
80
+ return (a.value ?? []).slice(t, e).map(i.rowsDefs);
81
+ });
82
+ return L(n, () => b(!0)), L(l, (t) => {
83
+ t > c.value && b();
84
+ }), E(() => b()), F({
85
+ reset: () => b(!0),
86
+ data: () => a.value ?? [],
87
+ allData: async () => {
88
+ let t = [], e = "";
89
+ do {
90
+ const d = await i.paginate(100, e);
91
+ t = [...t, ...d.data], e = d.meta.cursor ?? "";
92
+ } while (e > "");
93
+ return t;
94
+ },
95
+ pageData: () => {
96
+ const t = n.value * (l.value - 1), e = t + n.value;
97
+ return (a.value ?? []).slice(t, e);
98
+ },
99
+ replaceData: (t, e) => {
100
+ const d = t * l.value;
101
+ a.value && (a.value[d] = e);
102
+ }
103
+ }), (t, e) => {
104
+ const d = v("FmTable"), B = v("FmButton");
105
+ return w(), I($, null, [
106
+ m(d, {
107
+ modelValue: x.value,
108
+ "onUpdate:modelValue": e[0] || (e[0] = (s) => x.value = s),
109
+ loading: P(y),
110
+ "page-size": n.value,
111
+ "row-data": N.value,
112
+ "column-defs": p.columnDefs,
113
+ "hide-footer": !0,
114
+ onRowClick: e[1] || (e[1] = (s) => {
115
+ var _;
116
+ return g("row-click", (_ = a.value) == null ? void 0 : _.at(s.index));
117
+ })
118
+ }, null, 8, ["modelValue", "loading", "page-size", "row-data", "column-defs"]),
119
+ u("div", H, [
120
+ u("div", J, [
121
+ u("div", K, [
122
+ e[6] || (e[6] = u("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
123
+ m(S, {
124
+ items: P(f),
125
+ value: n.value,
126
+ "onUpdate:modelValue": e[2] || (e[2] = (s) => n.value = s)
127
+ }, null, 8, ["items", "value"])
128
+ ]),
129
+ u("span", Q, D((l.value - 1) * n.value) + " - " + D((l.value - 1) * n.value + n.value), 1)
130
+ ]),
131
+ u("div", W, [
132
+ m(S, {
133
+ items: Array.from(Array(c.value), (s, _) => _ + 1).map(
134
+ (s) => ({
135
+ label: s.toString(),
136
+ value: s
137
+ })
138
+ ),
139
+ value: l.value,
140
+ "onUpdate:modelValue": e[3] || (e[3] = (s) => l.value = s)
141
+ }, null, 8, ["items", "value"]),
142
+ u("span", X, " Page " + D(l.value), 1),
143
+ u("div", Y, [
144
+ m(B, {
145
+ disabled: !q.value,
146
+ icon: "chevron_left",
147
+ "icon-color": "neutral-black",
148
+ variant: "tertiary",
149
+ onClick: e[4] || (e[4] = () => l.value -= 1)
150
+ }, null, 8, ["disabled"]),
151
+ m(B, {
152
+ disabled: !A.value,
153
+ icon: "chevron_right",
154
+ "icon-color": "neutral-black",
155
+ variant: "tertiary",
156
+ onClick: e[5] || (e[5] = () => l.value += 1)
157
+ }, null, 8, ["disabled"])
158
+ ])
159
+ ])
160
+ ])
161
+ ], 64);
162
+ };
163
+ }
164
+ });
165
+ export {
166
+ ae as _
167
+ };
@@ -1,4 +1,4 @@
1
- import { F_PAYMENT_GATEWAY_KEY } from "@feedmepos/core/entity";
1
+ import { F_PAYMENT_GATEWAY_KEY, FdoDinero } from "@feedmepos/core/entity";
2
2
  import { type PaymentTransactionDtoOutput } from "@feedmepos/payment-entity";
3
3
  export interface PortalPaymentTransaction {
4
4
  id: string;
@@ -8,6 +8,7 @@ export interface PortalPaymentTransaction {
8
8
  gateway: F_PAYMENT_GATEWAY_KEY;
9
9
  status: string;
10
10
  amount: string;
11
+ fdoAmount: FdoDinero;
11
12
  fee: string;
12
13
  payout: string;
13
14
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "0.0.0-beta.8",
3
+ "version": "1.0.0-beta.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -16,7 +16,7 @@
16
16
  "scripts": {
17
17
  "postinstall": "yarn --cwd .. && yarn --cwd ../package/common && yarn --cwd ../package/entity",
18
18
  "lint": "eslint --ext .ts,vue --ignore-path .gitignore . --fix",
19
- "dev": "vite --mode dev",
19
+ "dev": "vite --mode dev",
20
20
  "prod": "vite --mode prod",
21
21
  "preview": "vite preview",
22
22
  "test": "jest",
@@ -33,8 +33,8 @@
33
33
  "@casl/ability": "^3.2.0",
34
34
  "@feedmepos/core": "^2.6.0",
35
35
  "@feedmepos/mf-common": "^1.8.21",
36
- "@feedmepos/payment-entity": "^0.0.5-demo4",
37
- "@feedmepos/ui-library": "^1.2.44",
36
+ "@feedmepos/payment-entity": "^0.0.6",
37
+ "@feedmepos/ui-library": "^1.2.58",
38
38
  "axios": "^0.27.2",
39
39
  "buffer": "^6.0.3",
40
40
  "change-case": "^4.1.2",
@@ -69,8 +69,8 @@
69
69
  "devDependencies": {
70
70
  "@babel/preset-env": "^7.22.10",
71
71
  "@pinia/testing": "^0.1.3",
72
- "@tsconfig/node20": "^20.1.4",
73
72
  "@rushstack/eslint-patch": "^1.1.3",
73
+ "@tsconfig/node20": "^20.1.4",
74
74
  "@types/dinero.js": "^1.9.0",
75
75
  "@types/file-saver": "^2.0.5",
76
76
  "@types/jest": "^29.5.4",