@feedmepos/mf-payment 1.0.0-beta.2 → 1.0.0-beta.4

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/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { h as p, f as s } from "./app-DQNKrzQz.js";
1
+ import { h as p, f as s } from "./app-z59f3ZZg.js";
2
2
  export {
3
3
  p as FmApp,
4
4
  s as routers
@@ -1 +1 @@
1
- export default function idToDate(id: any): string | null;
1
+ export default function idToDate(id: any): Date | null;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,4 +1,4 @@
1
- import { _ as Qe, C as et, r as Oe, S as tt, g as re, a as nt, b as rt, c as _e, d as st, F as it, e as ot } from "./app-DQNKrzQz.js";
1
+ import { _ as Qe, C as et, r as Oe, S as tt, g as re, a as nt, b as rt, c as _e, d as st, F as it, e as ot } from "./app-z59f3ZZg.js";
2
2
  import { d as at, f as ut, _ as Y, m as ct } from "./index-CWaKb7bG.js";
3
3
  /**
4
4
  * @license
@@ -1,6 +1,6 @@
1
- import { g as a, b as n, r, l as o, i } from "./index-CWaKb7bG.js";
2
- import { d as s } from "./dinero-CIVmXLL-.js";
3
- import { h as c } from "./moment-h96o7c8I.js";
1
+ import { g as a, b as n, r as o, l as i, i as c } from "./index-CWaKb7bG.js";
2
+ import { h as s } from "./moment-h96o7c8I.js";
3
+ import { d as r } from "./dinero-CIVmXLL-.js";
4
4
  const p = {
5
5
  async readBySettlementId(t) {
6
6
  return a(
@@ -10,7 +10,14 @@ const p = {
10
10
  );
11
11
  },
12
12
  async readTransactions(t) {
13
- return a(await n().get("/transactions", { params: t }));
13
+ return a(
14
+ await n().get("/transactions", {
15
+ params: {
16
+ start: s(t.start).startOf("day").toISOString(),
17
+ end: s(t.end).endOf("day").toISOString()
18
+ }
19
+ })
20
+ );
14
21
  },
15
22
  async removeTransactionFromSettlement(t) {
16
23
  return a(
@@ -34,20 +41,20 @@ const p = {
34
41
  },
35
42
  async readRestaurantTransactions(t) {
36
43
  return a(
37
- await r().get("/transactions", {
44
+ await o().get("/transactions", {
38
45
  params: t
39
46
  })
40
47
  );
41
48
  },
42
49
  async readRestaurantTransactionsBySettlementId(t) {
43
50
  return a(
44
- await r().get(
51
+ await o().get(
45
52
  `/transactions/settlements/${t}`
46
53
  )
47
54
  );
48
55
  },
49
56
  async downloadRestaurantTransactionReport(t) {
50
- return o(t, {
57
+ return i(t, {
51
58
  filename: "transaction-report.xlsx",
52
59
  transformers: {
53
60
  method: (e) => (e == null ? void 0 : e.issuer) ?? ""
@@ -55,7 +62,7 @@ const p = {
55
62
  });
56
63
  },
57
64
  async downloadTransactionReport(t) {
58
- return i(
65
+ return c(
59
66
  await n().get("/transactions/report", {
60
67
  params: t
61
68
  }),
@@ -70,11 +77,11 @@ function m(t) {
70
77
  method: t.method,
71
78
  gateway: t.gateway,
72
79
  status: t.status,
73
- transactionAt: c(t.createdAt).format("YYYY-MM-DD hh:mm:ss"),
80
+ transactionAt: s(t.createdAt).format("YYYY-MM-DD hh:mm:ss"),
74
81
  fdoAmount: t.amount,
75
- amount: s(t.amount).toFormat("$0.00"),
76
- fee: s(t.fee).toFormat("$0.00"),
77
- payout: s(t.payout).toFormat("$0.00")
82
+ amount: r(t.amount).toFormat("$0.00"),
83
+ fee: r(t.fee).toFormat("$0.00"),
84
+ payout: r(t.payout).toFormat("$0.00")
78
85
  };
79
86
  }
80
87
  function f(t) {