@tap-payments/os-micro-frontend-shared 0.1.378 → 0.1.380
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/build/constants/apps.js
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backend report filter types (used by reports APIs)
|
|
3
|
+
*
|
|
4
|
+
* Maps frontend report identifiers to the backend API filter types.
|
|
5
|
+
* Acts as the source of truth for all report types across apps/services
|
|
6
|
+
*/
|
|
7
|
+
export declare const REPORT_FILTER_TYPES: {
|
|
8
|
+
CHARGE: string;
|
|
9
|
+
AUTHORIZE: string;
|
|
10
|
+
REFUND: string;
|
|
11
|
+
CHARGEBACKS: string;
|
|
12
|
+
DESTINATIONS: string;
|
|
13
|
+
REVERSED_DESTINATIONS: string;
|
|
14
|
+
STATEMENT: string;
|
|
15
|
+
STATEMENT_SUMMARY: string;
|
|
16
|
+
INVOICE: string;
|
|
17
|
+
PAYOUT: string;
|
|
18
|
+
MERCHANT_PAYOUT: string;
|
|
19
|
+
RETAILER_PAYOUT: string;
|
|
20
|
+
};
|
|
1
21
|
/**
|
|
2
22
|
* Maps report **source codes** (app or service)
|
|
3
23
|
* to the corresponding **backend report filter types**.
|
|
@@ -14,8 +34,7 @@ export declare const reportFilterTypesMap: {
|
|
|
14
34
|
/**
|
|
15
35
|
* Reports apps
|
|
16
36
|
*
|
|
17
|
-
* Defines apps shown in the reports app
|
|
18
|
-
* to its backend filter type (REPORT_FILTER_TYPES).
|
|
37
|
+
* Defines apps shown in the reports app
|
|
19
38
|
*
|
|
20
39
|
*/
|
|
21
40
|
export declare const REPORTS_APPS: {
|
|
@@ -6,13 +6,14 @@ import { acceptanceAppIcon, billingAppIcon, payoutsAppIcon, walletAppIcon } from
|
|
|
6
6
|
* Maps frontend report identifiers to the backend API filter types.
|
|
7
7
|
* Acts as the source of truth for all report types across apps/services
|
|
8
8
|
*/
|
|
9
|
-
const REPORT_FILTER_TYPES = {
|
|
9
|
+
export const REPORT_FILTER_TYPES = {
|
|
10
10
|
// Acceptance
|
|
11
11
|
CHARGE: 'CHARGE',
|
|
12
12
|
AUTHORIZE: 'AUTHORIZE',
|
|
13
13
|
REFUND: 'REFUND',
|
|
14
14
|
CHARGEBACKS: 'CHARGEBACKS',
|
|
15
15
|
DESTINATIONS: 'DESTINATIONS',
|
|
16
|
+
REVERSED_DESTINATIONS: 'REVERSED_DESTINATIONS',
|
|
16
17
|
// Wallet
|
|
17
18
|
STATEMENT: 'STATEMENT',
|
|
18
19
|
STATEMENT_SUMMARY: 'STATEMENT_SUMMARY',
|
|
@@ -39,13 +40,14 @@ export const reportFilterTypesMap = {
|
|
|
39
40
|
[APP_CODES.acceptance.services.authorization.code]: [REPORT_FILTER_TYPES.AUTHORIZE],
|
|
40
41
|
[APP_CODES.acceptance.services.refunds.code]: [REPORT_FILTER_TYPES.REFUND],
|
|
41
42
|
[APP_CODES.acceptance.services.chargeback.code]: [REPORT_FILTER_TYPES.CHARGEBACKS],
|
|
42
|
-
[APP_CODES.acceptance.services.destinations.code]: [REPORT_FILTER_TYPES.DESTINATIONS],
|
|
43
|
+
[APP_CODES.acceptance.services.destinations.code]: [REPORT_FILTER_TYPES.DESTINATIONS, REPORT_FILTER_TYPES.REVERSED_DESTINATIONS],
|
|
43
44
|
[APP_CODES.acceptance.code]: [
|
|
44
45
|
REPORT_FILTER_TYPES.CHARGE,
|
|
45
46
|
REPORT_FILTER_TYPES.AUTHORIZE,
|
|
46
47
|
REPORT_FILTER_TYPES.REFUND,
|
|
47
48
|
REPORT_FILTER_TYPES.CHARGEBACKS,
|
|
48
49
|
REPORT_FILTER_TYPES.DESTINATIONS,
|
|
50
|
+
REPORT_FILTER_TYPES.REVERSED_DESTINATIONS,
|
|
49
51
|
],
|
|
50
52
|
// Wallet
|
|
51
53
|
[APP_CODES.wallet.services.merchants.functions.statement.code]: [REPORT_FILTER_TYPES.STATEMENT],
|
|
@@ -63,8 +65,7 @@ export const reportFilterTypesMap = {
|
|
|
63
65
|
/**
|
|
64
66
|
* Reports apps
|
|
65
67
|
*
|
|
66
|
-
* Defines apps shown in the reports app
|
|
67
|
-
* to its backend filter type (REPORT_FILTER_TYPES).
|
|
68
|
+
* Defines apps shown in the reports app
|
|
68
69
|
*
|
|
69
70
|
*/
|
|
70
71
|
export const REPORTS_APPS = [
|
|
@@ -72,18 +73,18 @@ export const REPORTS_APPS = [
|
|
|
72
73
|
code: APP_CODES.billing.code,
|
|
73
74
|
name: 'Billing',
|
|
74
75
|
icon: billingAppIcon,
|
|
75
|
-
services: [{ name: 'Invoices', code:
|
|
76
|
+
services: [{ name: 'Invoices', code: APP_CODES.billing.services.invoices.code }],
|
|
76
77
|
},
|
|
77
78
|
{
|
|
78
79
|
code: APP_CODES.acceptance.code,
|
|
79
80
|
name: 'Acceptance',
|
|
80
81
|
icon: acceptanceAppIcon,
|
|
81
82
|
services: [
|
|
82
|
-
{ name: 'Authorisations', code:
|
|
83
|
-
{ name: 'Charges', code:
|
|
84
|
-
{ name: 'Refunds', code:
|
|
85
|
-
{ name: 'Chargebacks', code:
|
|
86
|
-
{ name: 'Destinations', code:
|
|
83
|
+
{ name: 'Authorisations', code: APP_CODES.acceptance.services.authorization.code },
|
|
84
|
+
{ name: 'Charges', code: APP_CODES.acceptance.services.charges.code },
|
|
85
|
+
{ name: 'Refunds', code: APP_CODES.acceptance.services.refunds.code },
|
|
86
|
+
{ name: 'Chargebacks', code: APP_CODES.acceptance.services.chargeback.code },
|
|
87
|
+
{ name: 'Destinations', code: APP_CODES.acceptance.services.destinations.code },
|
|
87
88
|
],
|
|
88
89
|
},
|
|
89
90
|
{
|
|
@@ -91,8 +92,8 @@ export const REPORTS_APPS = [
|
|
|
91
92
|
name: 'Wallet',
|
|
92
93
|
icon: walletAppIcon,
|
|
93
94
|
services: [
|
|
94
|
-
{ name: 'Aggregated Statement', code:
|
|
95
|
-
{ name: 'Detailed Statement', code:
|
|
95
|
+
{ name: 'Aggregated Statement', code: APP_CODES.wallet.services.merchants.functions.summary.code },
|
|
96
|
+
{ name: 'Detailed Statement', code: APP_CODES.wallet.services.merchants.functions.statement.code },
|
|
96
97
|
],
|
|
97
98
|
},
|
|
98
99
|
{
|
|
@@ -100,9 +101,9 @@ export const REPORTS_APPS = [
|
|
|
100
101
|
name: 'Payouts',
|
|
101
102
|
icon: payoutsAppIcon,
|
|
102
103
|
services: [
|
|
103
|
-
{ name: 'Payouts', code:
|
|
104
|
-
{ name: 'Merchant Payouts', code:
|
|
105
|
-
{ name: 'Retailer Payouts', code:
|
|
104
|
+
{ name: 'Payouts', code: APP_CODES.payouts.services.payouts.code },
|
|
105
|
+
{ name: 'Merchant Payouts', code: APP_CODES.payouts.services.merchantPayout.code },
|
|
106
|
+
{ name: 'Retailer Payouts', code: APP_CODES.payouts.services.retailerPayout.code },
|
|
106
107
|
],
|
|
107
108
|
},
|
|
108
109
|
];
|
package/package.json
CHANGED