@tap-payments/os-micro-frontend-shared 0.1.378-test.5 → 0.1.378-test.6
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,23 +1,3 @@
|
|
|
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
|
-
};
|
|
21
1
|
/**
|
|
22
2
|
* Maps report **source codes** (app or service)
|
|
23
3
|
* to the corresponding **backend report filter types**.
|
|
@@ -6,14 +6,13 @@ 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
|
-
|
|
9
|
+
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',
|
|
17
16
|
// Wallet
|
|
18
17
|
STATEMENT: 'STATEMENT',
|
|
19
18
|
STATEMENT_SUMMARY: 'STATEMENT_SUMMARY',
|
|
@@ -40,14 +39,13 @@ export const reportFilterTypesMap = {
|
|
|
40
39
|
[APP_CODES.acceptance.services.authorization.code]: [REPORT_FILTER_TYPES.AUTHORIZE],
|
|
41
40
|
[APP_CODES.acceptance.services.refunds.code]: [REPORT_FILTER_TYPES.REFUND],
|
|
42
41
|
[APP_CODES.acceptance.services.chargeback.code]: [REPORT_FILTER_TYPES.CHARGEBACKS],
|
|
43
|
-
[APP_CODES.acceptance.services.destinations.code]: [REPORT_FILTER_TYPES.DESTINATIONS
|
|
42
|
+
[APP_CODES.acceptance.services.destinations.code]: [REPORT_FILTER_TYPES.DESTINATIONS],
|
|
44
43
|
[APP_CODES.acceptance.code]: [
|
|
45
44
|
REPORT_FILTER_TYPES.CHARGE,
|
|
46
45
|
REPORT_FILTER_TYPES.AUTHORIZE,
|
|
47
46
|
REPORT_FILTER_TYPES.REFUND,
|
|
48
47
|
REPORT_FILTER_TYPES.CHARGEBACKS,
|
|
49
48
|
REPORT_FILTER_TYPES.DESTINATIONS,
|
|
50
|
-
REPORT_FILTER_TYPES.REVERSED_DESTINATIONS,
|
|
51
49
|
],
|
|
52
50
|
// Wallet
|
|
53
51
|
[APP_CODES.wallet.services.merchants.functions.statement.code]: [REPORT_FILTER_TYPES.STATEMENT],
|
|
@@ -74,18 +72,18 @@ export const REPORTS_APPS = [
|
|
|
74
72
|
code: APP_CODES.billing.code,
|
|
75
73
|
name: 'Billing',
|
|
76
74
|
icon: billingAppIcon,
|
|
77
|
-
services: [{ name: 'Invoices', code:
|
|
75
|
+
services: [{ name: 'Invoices', code: REPORT_FILTER_TYPES.INVOICE }],
|
|
78
76
|
},
|
|
79
77
|
{
|
|
80
78
|
code: APP_CODES.acceptance.code,
|
|
81
79
|
name: 'Acceptance',
|
|
82
80
|
icon: acceptanceAppIcon,
|
|
83
81
|
services: [
|
|
84
|
-
{ name: 'Authorisations', code:
|
|
85
|
-
{ name: 'Charges', code:
|
|
86
|
-
{ name: 'Refunds', code:
|
|
87
|
-
{ name: 'Chargebacks', code:
|
|
88
|
-
{ name: 'Destinations', code:
|
|
82
|
+
{ name: 'Authorisations', code: REPORT_FILTER_TYPES.AUTHORIZE },
|
|
83
|
+
{ name: 'Charges', code: REPORT_FILTER_TYPES.CHARGE },
|
|
84
|
+
{ name: 'Refunds', code: REPORT_FILTER_TYPES.REFUND },
|
|
85
|
+
{ name: 'Chargebacks', code: REPORT_FILTER_TYPES.CHARGEBACKS },
|
|
86
|
+
{ name: 'Destinations', code: REPORT_FILTER_TYPES.DESTINATIONS },
|
|
89
87
|
],
|
|
90
88
|
},
|
|
91
89
|
{
|
|
@@ -93,8 +91,8 @@ export const REPORTS_APPS = [
|
|
|
93
91
|
name: 'Wallet',
|
|
94
92
|
icon: walletAppIcon,
|
|
95
93
|
services: [
|
|
96
|
-
{ name: 'Aggregated Statement', code:
|
|
97
|
-
{ name: 'Detailed Statement', code:
|
|
94
|
+
{ name: 'Aggregated Statement', code: REPORT_FILTER_TYPES.STATEMENT_SUMMARY },
|
|
95
|
+
{ name: 'Detailed Statement', code: REPORT_FILTER_TYPES.STATEMENT },
|
|
98
96
|
],
|
|
99
97
|
},
|
|
100
98
|
{
|
|
@@ -102,9 +100,9 @@ export const REPORTS_APPS = [
|
|
|
102
100
|
name: 'Payouts',
|
|
103
101
|
icon: payoutsAppIcon,
|
|
104
102
|
services: [
|
|
105
|
-
{ name: 'Payouts', code:
|
|
106
|
-
{ name: 'Merchant Payouts', code:
|
|
107
|
-
{ name: 'Retailer Payouts', code:
|
|
103
|
+
{ name: 'Payouts', code: REPORT_FILTER_TYPES.PAYOUT },
|
|
104
|
+
{ name: 'Merchant Payouts', code: REPORT_FILTER_TYPES.MERCHANT_PAYOUT },
|
|
105
|
+
{ name: 'Retailer Payouts', code: REPORT_FILTER_TYPES.RETAILER_PAYOUT },
|
|
108
106
|
],
|
|
109
107
|
},
|
|
110
108
|
];
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/os-micro-frontend-shared",
|
|
3
3
|
"description": "Shared components and utilities for Tap Payments micro frontends",
|
|
4
|
-
"version": "0.1.378-test.
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.378-test.6",
|
|
5
|
+
"testVersion": 6,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|