@feedmepos/mf-payment 1.4.21 → 1.4.23

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 (35) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-CXzcR3lA.js → Actions.vue_vue_type_script_setup_true_lang-ClTndbYh.js} +1 -1
  2. package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-DP8STuAT.js +47 -0
  3. package/dist/Chargeback-B0gRIpiJ.js +413 -0
  4. package/dist/{OnboardForm-DRTeMI32.js → OnboardForm-Bhqt-Q6k.js} +2 -2
  5. package/dist/{OnboardForm-BHT2IaUt.js → OnboardForm-BvrKiqP1.js} +2 -2
  6. package/dist/{OnboardSubmission-D_T1RJQH.js → OnboardSubmission-B-0uJv51.js} +1 -1
  7. package/dist/{OnboardSubmission-LNBKTrDd.js → OnboardSubmission-DFreyD4V.js} +1 -1
  8. package/dist/{PayoutAccount-DqLL0Lc0.js → PayoutAccount-BsxNx86g.js} +3 -3
  9. package/dist/{PayoutAccount-t-t5ndKZ.js → PayoutAccount-DrwnZPIB.js} +1 -1
  10. package/dist/{Restaurant-ZTbhEMio.js → Restaurant-CCaYPuWH.js} +1 -1
  11. package/dist/{Settlement-CqZSTDvu.js → Settlement-BQNJSUCM.js} +1 -1
  12. package/dist/{Settlement-CR8qyWus.js → Settlement-BU-jCEbB.js} +1 -1
  13. package/dist/{SettlementTransactions-C9jYK2Ne.js → SettlementTransactions-CqELsVFS.js} +6 -5
  14. package/dist/{SettlementTransactions-BX1D315E.js → SettlementTransactions-T6k6cAin.js} +4 -3
  15. package/dist/{Transaction-NaM-tip2.js → Transaction-B85QLk-_.js} +5 -4
  16. package/dist/{Transaction-8hEjSIV1.js → Transaction-CgFaGqHr.js} +9 -8
  17. package/dist/{TransactionOld-Qhbe5ao8.js → TransactionOld-BlSmbndR.js} +23 -22
  18. package/dist/api/transaction/index.d.ts +17 -0
  19. package/dist/{app-CDr59oLf.js → app-DlAaBxih.js} +73 -65
  20. package/dist/app.js +1 -1
  21. package/dist/{assets-BGs9zWOF.js → assets-B8TAgjHY.js} +90 -201
  22. package/dist/components/AutoCopyCell.vue.d.ts +4 -0
  23. package/dist/index-CYHO6usZ.js +145 -0
  24. package/dist/{index-DhUIX6ww.js → index-JNhw7LUy.js} +1 -1
  25. package/dist/model/chargeback.d.ts +24 -0
  26. package/dist/package.json +1 -1
  27. package/dist/{payout-account-D91l85XC.js → payout-account-B8gx9H3E.js} +2 -2
  28. package/dist/{plugins-Cyj2wAwo.js → plugins-Cp96IRMs.js} +1 -1
  29. package/dist/tsconfig.app.tsbuildinfo +1 -1
  30. package/dist/views/admin/chargeback/Chargeback.vue.d.ts +2 -0
  31. package/dist/views/admin/chargeback/CreateChargebackDialog.vue.d.ts +2 -0
  32. package/dist/views/admin/chargeback/UpdateChargebackDialog.vue.d.ts +6 -0
  33. package/dist/views/admin/chargeback/cell/Actions.vue.d.ts +8 -0
  34. package/package.json +1 -1
  35. package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-XC4V0tsX.js +0 -40
@@ -1,6 +1,10 @@
1
1
  type __VLS_Props = {
2
2
  data: string;
3
3
  extra?: string;
4
+ truncate?: {
5
+ startChars?: number;
6
+ endChars?: number;
7
+ };
4
8
  };
5
9
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
6
10
  export default _default;
@@ -0,0 +1,145 @@
1
+ import { g as n, b as e, r as o, d as c, f as y, l as f, h as l } from "./index-DSG40xEJ.js";
2
+ import { h as a } from "./moment-h96o7c8I.js";
3
+ const h = {
4
+ async readBySettlementId(t) {
5
+ return n(
6
+ await e().get(
7
+ `/transactions/settlements/${t}`
8
+ )
9
+ );
10
+ },
11
+ async readTransactions(t) {
12
+ return n(
13
+ await e().get("/transactions", {
14
+ params: {
15
+ search: t.search,
16
+ skip: t.skip,
17
+ limit: t.limit,
18
+ start: a(t.start).startOf("day").toISOString(),
19
+ end: a(t.end).endOf("day").toISOString()
20
+ }
21
+ })
22
+ );
23
+ },
24
+ async removeTransactionFromSettlement(t) {
25
+ return n(
26
+ await e().delete(`/settlements/${t}`)
27
+ );
28
+ },
29
+ async refetchTransaction({
30
+ transactionId: t
31
+ }) {
32
+ return n(
33
+ await e().get(`/transactions/query/${t}`)
34
+ );
35
+ },
36
+ async refundTransaction(t) {
37
+ return n(
38
+ await e().post("/transactions/refund", t)
39
+ );
40
+ },
41
+ async renotifyTransaction(t) {
42
+ return n(
43
+ await e().post("/payments/re-notify", { transactionId: t })
44
+ );
45
+ },
46
+ async readRestaurantTransactions(t) {
47
+ return n(
48
+ await o().get("/transactions", {
49
+ params: {
50
+ v2: !0,
51
+ start: a(t.start).startOf("day").toISOString(),
52
+ end: a(t.end).endOf("day").toISOString()
53
+ }
54
+ })
55
+ );
56
+ },
57
+ async readTransactionsV2(t) {
58
+ return c(
59
+ await y().get("/transactions", {
60
+ params: {
61
+ status: t.status,
62
+ id: t.id,
63
+ by: t.by,
64
+ limit: t.limit,
65
+ cursor: t.cursor,
66
+ search: t.search,
67
+ start: a(t.start).startOf("day").toISOString(),
68
+ end: a(t.end).endOf("day").toISOString()
69
+ }
70
+ })
71
+ );
72
+ },
73
+ async readRestaurantTransactionsBySettlementId(t) {
74
+ return n(
75
+ await o().get(
76
+ `/transactions/settlements/${t}`
77
+ )
78
+ );
79
+ },
80
+ async downloadPortalTransactionReport(t, i, d = !1) {
81
+ const u = a(t.startDate), m = a(t.endDate).endOf("day"), s = ["method", "fdoAmount", "amount", "fee", "payout", "flags"];
82
+ return d && s.push(
83
+ "gatewayTransactionId",
84
+ "gatewayRefundId",
85
+ "restaurantId",
86
+ "settlementId",
87
+ "settlementAt"
88
+ ), f(i, {
89
+ filename: `transaction-report-${u.format("YYYY_MM_DD_HH:mm")}-${m.format("YYYY_MM_DD_HH:mm")}.xlsx`,
90
+ exclude: s,
91
+ include: ["method.issuer", "fdoAmount.amount", "fdoAmount.currency"],
92
+ rename: {
93
+ "method.issuer": "method",
94
+ "fdoAmount.currency": "currency",
95
+ "fdoAmount.amount": "amount"
96
+ },
97
+ transformers: {
98
+ gateway: (r) => r === "RAZER_MERCHANT_SERVICE" ? "FIUU" : r,
99
+ "fdoAmount.amount": (r) => parseFloat((r / 100).toFixed(2)),
100
+ transactionAt: (r) => a(r).format("YYYY-MM-DD HH:mm:ss"),
101
+ refundedAt: (r) => r ? a(r).format("YYYY-MM-DD HH:mm:ss") : "-"
102
+ }
103
+ });
104
+ },
105
+ async downloadTransactionReport(t) {
106
+ return l(
107
+ await e().get("/transactions/report", {
108
+ params: {
109
+ start: a(t.start).startOf("day").toISOString(),
110
+ end: a(t.end).endOf("day").toISOString()
111
+ }
112
+ }),
113
+ `transaction-report-${t.start}-${t.end}.xlsx`
114
+ );
115
+ },
116
+ async readChargebackTransactions(t) {
117
+ return c(
118
+ await e().get("/transactions/chargeback", {
119
+ params: {
120
+ search: t.search,
121
+ cursor: t.cursor,
122
+ limit: t.limit,
123
+ start: a(t.start).startOf("day").toISOString(),
124
+ end: a(t.end).endOf("day").toISOString()
125
+ }
126
+ })
127
+ );
128
+ },
129
+ async createChargebackTransaction(t) {
130
+ return n(
131
+ await e().post("/transactions/chargeback", t)
132
+ );
133
+ },
134
+ async updateChargebackTransaction(t) {
135
+ return n(
136
+ await e().patch(
137
+ `/transactions/chargeback/${t.chargebackId}`,
138
+ { canSettleAt: t.canSettleAt }
139
+ )
140
+ );
141
+ }
142
+ };
143
+ export {
144
+ h as t
145
+ };
@@ -1,5 +1,5 @@
1
1
  import { d as r, b as a, g as n, o as i } from "./index-DSG40xEJ.js";
2
- import { f as u } from "./plugins-Cyj2wAwo.js";
2
+ import { f as u } from "./plugins-Cp96IRMs.js";
3
3
  import { h as m } from "./moment-h96o7c8I.js";
4
4
  const y = {
5
5
  async read(s) {
@@ -0,0 +1,24 @@
1
+ import { FdoDinero } from "@feedmepos/core/entity";
2
+ import { F_PAYMENT_GATEWAY_KEY, type FdoPaymentTransactionV2Output } from "@feedmepos/payment-entity";
3
+ export interface PortalChargebackTransaction {
4
+ id: string;
5
+ restaurant: string;
6
+ payId: string;
7
+ createdAt: string;
8
+ canSettleAt: string;
9
+ method: FdoPaymentTransactionV2Output["method"];
10
+ gateway: F_PAYMENT_GATEWAY_KEY;
11
+ status: string;
12
+ amount: string;
13
+ fdoAmount: FdoDinero;
14
+ fee: string;
15
+ payout: string;
16
+ seqNumber: string;
17
+ payFor: string;
18
+ group: string;
19
+ chargeBackReason: string;
20
+ settlement: string;
21
+ }
22
+ declare function toChargebackTransaction(trx: FdoPaymentTransactionV2Output): PortalChargebackTransaction;
23
+ declare function toChargebackTransactions(trxs: FdoPaymentTransactionV2Output[]): PortalChargebackTransaction[];
24
+ export { toChargebackTransaction, toChargebackTransactions };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "1.4.21",
3
+ "version": "1.4.23",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,7 +1,7 @@
1
- import { f as j } from "./plugins-Cyj2wAwo.js";
1
+ import { f as j } from "./plugins-Cp96IRMs.js";
2
2
  import { c as st, a as it, B as at, p as E } from "./index-DSG40xEJ.js";
3
3
  import { useCoreStore as ut } from "@feedmepos/mf-common";
4
- import { _ as ot } from "./app-CDr59oLf.js";
4
+ import { _ as ot } from "./app-DlAaBxih.js";
5
5
  var Q = { exports: {} };
6
6
  (function(i, a) {
7
7
  (function(t, m) {
@@ -1,4 +1,4 @@
1
- import { a as be, C as we, r as K, g as C, b as Te, c as ye, d as H, S as ke, e as Ee, F as Ae } from "./app-CDr59oLf.js";
1
+ import { a as be, C as we, r as K, g as C, b as Te, c as ye, d as H, S as ke, e as Ee, F as Ae } from "./app-DlAaBxih.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC