@feedmepos/mf-payment 1.0.0-beta.3 → 1.0.0-beta.5

Sign up to get free protection for your applications and to get access to all the features.
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { h as p, f as s } from "./app-aEVoN1BQ.js";
1
+ import { h as p, f as s } from "./app-9P8d2JCE.js";
2
2
  export {
3
3
  p as FmApp,
4
4
  s as routers
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "1.0.0-beta.3",
3
+ "version": "1.0.0-beta.5",
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-aEVoN1BQ.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-9P8d2JCE.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,7 +1,7 @@
1
- import { g as a, b as n, r, l as o, i } from "./index-CWaKb7bG.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 r } from "./moment-h96o7c8I.js";
2
3
  import { d as s } from "./dinero-CIVmXLL-.js";
3
- import { h as c } from "./moment-h96o7c8I.js";
4
- const p = {
4
+ const f = {
5
5
  async readBySettlementId(t) {
6
6
  return a(
7
7
  await n().get(
@@ -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: r(t.start).startOf("day").toISOString(),
17
+ end: r(t.end).endOf("day").toISOString()
18
+ }
19
+ })
20
+ );
14
21
  },
15
22
  async removeTransactionFromSettlement(t) {
16
23
  return a(
@@ -34,20 +41,23 @@ const p = {
34
41
  },
35
42
  async readRestaurantTransactions(t) {
36
43
  return a(
37
- await r().get("/transactions", {
38
- params: t
44
+ await o().get("/transactions", {
45
+ params: {
46
+ start: r(t.start).startOf("day").toISOString(),
47
+ end: r(t.end).endOf("day").toISOString()
48
+ }
39
49
  })
40
50
  );
41
51
  },
42
52
  async readRestaurantTransactionsBySettlementId(t) {
43
53
  return a(
44
- await r().get(
54
+ await o().get(
45
55
  `/transactions/settlements/${t}`
46
56
  )
47
57
  );
48
58
  },
49
59
  async downloadRestaurantTransactionReport(t) {
50
- return o(t, {
60
+ return i(t, {
51
61
  filename: "transaction-report.xlsx",
52
62
  transformers: {
53
63
  method: (e) => (e == null ? void 0 : e.issuer) ?? ""
@@ -55,7 +65,7 @@ const p = {
55
65
  });
56
66
  },
57
67
  async downloadTransactionReport(t) {
58
- return i(
68
+ return c(
59
69
  await n().get("/transactions/report", {
60
70
  params: t
61
71
  }),
@@ -63,25 +73,25 @@ const p = {
63
73
  );
64
74
  }
65
75
  };
66
- function m(t) {
76
+ function d(t) {
67
77
  return {
68
78
  id: t._id,
69
79
  payId: t.payId,
70
80
  method: t.method,
71
81
  gateway: t.gateway,
72
82
  status: t.status,
73
- transactionAt: c(t.createdAt).format("YYYY-MM-DD hh:mm:ss"),
83
+ transactionAt: r(t.createdAt).format("YYYY-MM-DD hh:mm:ss"),
74
84
  fdoAmount: t.amount,
75
85
  amount: s(t.amount).toFormat("$0.00"),
76
86
  fee: s(t.fee).toFormat("$0.00"),
77
87
  payout: s(t.payout).toFormat("$0.00")
78
88
  };
79
89
  }
80
- function f(t) {
81
- return t.map(m);
90
+ function p(t) {
91
+ return t.map(d);
82
92
  }
83
93
  export {
84
- f as a,
85
- m as b,
86
- p as t
94
+ p as a,
95
+ d as b,
96
+ f as t
87
97
  };