@tap-payments/os-micro-frontend-shared 0.1.378-test.4 → 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.
@@ -495,4 +495,5 @@ export const MF_APPS_MAPPER = new Set([
495
495
  APP_CODES.wallet.code,
496
496
  APP_CODES.acceptance.code,
497
497
  APP_CODES.authentication.code,
498
+ APP_CODES.protect.code,
498
499
  ]);
@@ -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**.
@@ -44,5 +24,6 @@ export declare const REPORTS_APPS: {
44
24
  icon: string;
45
25
  services: {
46
26
  name: string;
27
+ code: string;
47
28
  }[];
48
29
  }[];
@@ -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
- export const REPORT_FILTER_TYPES = {
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, REPORT_FILTER_TYPES.REVERSED_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,24 +72,37 @@ export const REPORTS_APPS = [
74
72
  code: APP_CODES.billing.code,
75
73
  name: 'Billing',
76
74
  icon: billingAppIcon,
77
- services: [{ name: 'Invoices' }],
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
- services: [{ name: 'Authorisations' }, { name: 'Charges' }, { name: 'Refunds' }, { name: 'Chargebacks' }, { name: 'Destinations' }],
81
+ services: [
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 },
87
+ ],
84
88
  },
85
89
  {
86
90
  code: APP_CODES.wallet.code,
87
91
  name: 'Wallet',
88
92
  icon: walletAppIcon,
89
- services: [{ name: 'Aggregated Statement' }, { name: 'Detailed Statement' }],
93
+ services: [
94
+ { name: 'Aggregated Statement', code: REPORT_FILTER_TYPES.STATEMENT_SUMMARY },
95
+ { name: 'Detailed Statement', code: REPORT_FILTER_TYPES.STATEMENT },
96
+ ],
90
97
  },
91
98
  {
92
99
  code: APP_CODES.payouts.code,
93
100
  name: 'Payouts',
94
101
  icon: payoutsAppIcon,
95
- services: [{ name: 'Payouts' }, { name: 'Merchant Payouts' }, { name: 'Retailer Payouts' }],
102
+ services: [
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 },
106
+ ],
96
107
  },
97
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.4",
5
- "testVersion": 4,
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",