@pax2pay/model-banking 0.1.465 → 0.1.466
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/Transaction/Statistics.ts +6 -23
- package/dist/Transaction/Statistics.js +1 -4
- package/dist/Transaction/Statistics.js.map +1 -1
- package/dist/pax2pay.d.ts +1 -0
- package/dist/pax2pay.js +1 -0
- package/dist/pax2pay.js.map +1 -1
- package/dist/reports/index.d.ts +4 -0
- package/dist/reports/index.js +6 -0
- package/dist/reports/index.js.map +1 -0
- package/dist/reports/visa/Data/Country.d.ts +15 -0
- package/dist/reports/visa/Data/Country.js +43 -0
- package/dist/reports/visa/Data/Country.js.map +1 -0
- package/dist/reports/visa/Data/Iin.d.ts +10 -0
- package/dist/reports/visa/Data/Iin.js +11 -0
- package/dist/reports/visa/Data/Iin.js.map +1 -0
- package/dist/reports/visa/Data/Monthly.d.ts +14 -0
- package/dist/reports/visa/Data/Monthly.js +34 -0
- package/dist/reports/visa/Data/Monthly.js.map +1 -0
- package/dist/reports/visa/Data/NonMonthly.d.ts +9 -0
- package/dist/reports/visa/Data/NonMonthly.js +29 -0
- package/dist/reports/visa/Data/NonMonthly.js.map +1 -0
- package/dist/reports/visa/Data/Region.d.ts +10 -0
- package/dist/reports/visa/Data/Region.js +72 -0
- package/dist/reports/visa/Data/Region.js.map +1 -0
- package/dist/reports/visa/Data/Regional.d.ts +8 -0
- package/dist/reports/visa/Data/Regional.js +27 -0
- package/dist/reports/visa/Data/Regional.js.map +1 -0
- package/dist/reports/visa/Data/index.d.ts +17 -0
- package/dist/reports/visa/Data/index.js +29 -0
- package/dist/reports/visa/Data/index.js.map +1 -0
- package/dist/reports/visa/index.d.ts +7 -0
- package/dist/reports/visa/index.js +33 -0
- package/dist/reports/visa/index.js.map +1 -0
- package/dist/reports/visa/rows.d.ts +17 -0
- package/dist/reports/visa/rows.js +155 -0
- package/dist/reports/visa/rows.js.map +1 -0
- package/package.json +1 -1
- package/pax2pay.ts +1 -0
- package/reports/index.ts +5 -0
- package/reports/visa/Data/Country.ts +59 -0
- package/reports/visa/Data/Iin.ts +11 -0
- package/reports/visa/Data/Monthly.ts +45 -0
- package/reports/visa/Data/NonMonthly.ts +36 -0
- package/reports/visa/Data/Region.ts +71 -0
- package/reports/visa/Data/Regional.ts +26 -0
- package/reports/visa/Data/index.ts +33 -0
- package/reports/visa/index.ts +37 -0
- package/reports/visa/rows.ts +151 -0
- package/reports/visa/visa.csv +227 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
export var rows;
|
|
3
|
+
(function (rows) {
|
|
4
|
+
rows.all = [
|
|
5
|
+
"On-Us Payments Count - Month x",
|
|
6
|
+
"On-Us Payments Volume - Month x",
|
|
7
|
+
"On-Us Account Funding Transaction Count - Month x",
|
|
8
|
+
"On-Us Account Funding Transaction Volume - Month x",
|
|
9
|
+
"On-Us Original Credits Count - Month x",
|
|
10
|
+
"On-Us Original Credits Volume - Month x",
|
|
11
|
+
"On-Us ATM Cash Advances Count - Month x",
|
|
12
|
+
"On-Us ATM Cash Advances Volume - Month x",
|
|
13
|
+
"On-Us Manual Cash Count - Month x",
|
|
14
|
+
"On-Us Manual Cash Volume - Month x",
|
|
15
|
+
"On-Us Cashback Count - Month x",
|
|
16
|
+
"On-Us Cashback Volume - Month x",
|
|
17
|
+
"National Payments Count - Month x",
|
|
18
|
+
"National Payments Volume - Month x",
|
|
19
|
+
"National Account Funding Transaction Count - Month x",
|
|
20
|
+
"National Account Funding Transaction Volume - Month x",
|
|
21
|
+
"National Original Credits Count - Month x",
|
|
22
|
+
"National Original Credits Volume - Month x",
|
|
23
|
+
"National ATM Cash Advances Count - Month x",
|
|
24
|
+
"National ATM Cash Advances Volume - Month x",
|
|
25
|
+
"National Manual Cash Count - Month x",
|
|
26
|
+
"National Manual Cash Volume - Month x",
|
|
27
|
+
"National Cashback Count - Month x",
|
|
28
|
+
"National Cashback Volume - Month x",
|
|
29
|
+
"International - Intra-Regional Payments Count - Month x",
|
|
30
|
+
"International - Intra-Regional Payments Volume - Month x",
|
|
31
|
+
"International - Intra-Regional Account Funding Transaction Count - Month x",
|
|
32
|
+
"International - Intra-Regional Account Funding Transaction Volume - Month x",
|
|
33
|
+
"International - Intra-Regional Original Credits Count - Month x",
|
|
34
|
+
"International - Intra-Regional Original Credits Volume - Month x",
|
|
35
|
+
"International - Intra-Regional ATM Cash Advances Count - Month x",
|
|
36
|
+
"International - Intra-Regional ATM Cash Advances Volume - Month x",
|
|
37
|
+
"International - Intra-Regional Manual Cash Count - Month x",
|
|
38
|
+
"International - Intra-Regional Manual Cash Volume - Month x",
|
|
39
|
+
"International - Intra-Regional Cashback Count - Month x",
|
|
40
|
+
"International - Intra-Regional Cashback Volume - Month x",
|
|
41
|
+
"International - Non-EEA Payments Count - Month x",
|
|
42
|
+
"International - Non-EEA Payments Volume - Month x",
|
|
43
|
+
"International - Non-EEA Account Funding Transaction Count - Month x",
|
|
44
|
+
"International - Non-EEA Account Funding Transaction Volume - Month x",
|
|
45
|
+
"International - Non-EEA Original Credits Count - Month x",
|
|
46
|
+
"International - Non-EEA Original Credits Volume - Month x",
|
|
47
|
+
"International - Non-EEA ATM Cash Advances Count - Month x",
|
|
48
|
+
"International - Non-EEA ATM Cash Advances Volume - Month x",
|
|
49
|
+
"International - Non-EEA Manual Cash Count - Month x",
|
|
50
|
+
"International - Non-EEA Manual Cash Volume - Month x",
|
|
51
|
+
"International - Non-EEA Cashback Count - Month x",
|
|
52
|
+
"International - Non-EEA Cashback Volume - Month x",
|
|
53
|
+
"International - Inter-Regional Payments Count - Month x",
|
|
54
|
+
"International - Inter-Regional Payments Volume - Month x",
|
|
55
|
+
"International - Inter-Regional Account Funding Transaction Count - Month x",
|
|
56
|
+
"International - Inter-Regional Account Funding Transaction Volume - Month x",
|
|
57
|
+
"International - Inter-Regional Original Credits Count - Month x",
|
|
58
|
+
"International - Inter-Regional Original Credits Volume - Month x",
|
|
59
|
+
"International - Inter-Regional ATM Cash Advances Count - Month x",
|
|
60
|
+
"International - Inter-Regional ATM Cash Advances Volume - Month x",
|
|
61
|
+
"International - Inter-Regional Manual Cash Count - Month x",
|
|
62
|
+
"International - Inter-Regional Manual Cash Volume - Month x",
|
|
63
|
+
"International - Inter-Regional Cashback Count - Month x",
|
|
64
|
+
"International - Inter-Regional Cashback Volume - Month x",
|
|
65
|
+
"Total Number of Cards",
|
|
66
|
+
"Number of Cards - Magnetic Stripe",
|
|
67
|
+
"Number of Cards - Magnetic Stripe, Chip",
|
|
68
|
+
"Number of Cards - Magnetic Stripe, Contactless",
|
|
69
|
+
"Number of Cards - Magnetic Stripe, Chip, Contactless",
|
|
70
|
+
"Total Number of Active Cards",
|
|
71
|
+
"Number of Active Cards - used at Contactless device",
|
|
72
|
+
"Number of Devices with Visa Contactless - Micro Tags",
|
|
73
|
+
"Number of Devices with Visa Contactless - Mobile Phones",
|
|
74
|
+
"Number of Devices with Visa Contactless - Other Devices",
|
|
75
|
+
"Total Number of Accounts",
|
|
76
|
+
"Number of Accounts - Domestic Use Only",
|
|
77
|
+
"Number of Accounts - International Enabled",
|
|
78
|
+
"Total Number of Active Accounts",
|
|
79
|
+
"Total Number of Personal Deposit Accounts",
|
|
80
|
+
"Number of Savings Accounts",
|
|
81
|
+
"Number of Regular Checking Accounts",
|
|
82
|
+
"Fraud Recoveries - Domestic - Cash Disbursements - Amount",
|
|
83
|
+
"Fraud Recoveries - Domestic - Payments - Amount",
|
|
84
|
+
"Fraud Recoveries - International - Cash Disbursements - Amount",
|
|
85
|
+
"Fraud Recoveries - International - Payments - Amount",
|
|
86
|
+
"Gross Fraud Losses - Number of Accounts",
|
|
87
|
+
"Gross Fraud Losses - Number of Recovered Accounts",
|
|
88
|
+
"Gross Fraud Losses - Domestic - Cash Disbursements - Count",
|
|
89
|
+
"Gross Fraud Losses - Domestic - Cash Disbursements - Volume",
|
|
90
|
+
"Gross Fraud Losses - Domestic - Payments - Count",
|
|
91
|
+
"Gross Fraud Losses - Domestic - Payments - Volume",
|
|
92
|
+
"Gross Fraud Losses - International - Cash Disbursements - Count",
|
|
93
|
+
"Gross Fraud Losses - International - Cash Disbursements - Volume",
|
|
94
|
+
"Gross Fraud Losses - International - Payments - Count",
|
|
95
|
+
"Gross Fraud Losses - International - Payments - Volume",
|
|
96
|
+
"Total Product Balance - Volume",
|
|
97
|
+
"Payments Transactions Declined for Insufficient Funds - Number",
|
|
98
|
+
"Cash Transactions Declined for Insufficient Funds - Number",
|
|
99
|
+
];
|
|
100
|
+
let NonZero;
|
|
101
|
+
(function (NonZero) {
|
|
102
|
+
NonZero.values = [
|
|
103
|
+
"National Payments Count - Month x",
|
|
104
|
+
"National Payments Volume - Month x",
|
|
105
|
+
"International - Intra-Regional Payments Count - Month x",
|
|
106
|
+
"International - Intra-Regional Payments Volume - Month x",
|
|
107
|
+
"International - Non-EEA Payments Count - Month x",
|
|
108
|
+
"International - Non-EEA Payments Volume - Month x",
|
|
109
|
+
"International - Inter-Regional Payments Count - Month x",
|
|
110
|
+
"International - Inter-Regional Payments Volume - Month x",
|
|
111
|
+
"Total Number of Cards",
|
|
112
|
+
"Total Number of Active Cards",
|
|
113
|
+
"Total Number of Accounts",
|
|
114
|
+
"Number of Accounts - International Enabled",
|
|
115
|
+
"Payments Transactions Declined for Insufficient Funds - Number",
|
|
116
|
+
];
|
|
117
|
+
NonZero.type = isly.string(NonZero.values);
|
|
118
|
+
})(NonZero = rows.NonZero || (rows.NonZero = {}));
|
|
119
|
+
let Blank;
|
|
120
|
+
(function (Blank) {
|
|
121
|
+
Blank.values = [
|
|
122
|
+
"Fraud Recoveries - Domestic - Cash Disbursements - Amount",
|
|
123
|
+
"Fraud Recoveries - Domestic - Payments - Amount",
|
|
124
|
+
"Fraud Recoveries - International - Cash Disbursements - Amount",
|
|
125
|
+
"Fraud Recoveries - International - Payments - Amount",
|
|
126
|
+
"Gross Fraud Losses - Number of Accounts",
|
|
127
|
+
"Gross Fraud Losses - Number of Recovered Accounts",
|
|
128
|
+
"Gross Fraud Losses - Domestic - Cash Disbursements - Count",
|
|
129
|
+
"Gross Fraud Losses - Domestic - Cash Disbursements - Volume",
|
|
130
|
+
"Gross Fraud Losses - Domestic - Payments - Count",
|
|
131
|
+
"Gross Fraud Losses - Domestic - Payments - Volume",
|
|
132
|
+
"Gross Fraud Losses - International - Cash Disbursements - Count",
|
|
133
|
+
"Gross Fraud Losses - International - Cash Disbursements - Volume",
|
|
134
|
+
"Gross Fraud Losses - International - Payments - Count",
|
|
135
|
+
"Gross Fraud Losses - International - Payments - Volume",
|
|
136
|
+
];
|
|
137
|
+
Blank.type = isly.string(Blank.values);
|
|
138
|
+
function toCsvRow(row, count) {
|
|
139
|
+
return row + "|".repeat(count) + "\n";
|
|
140
|
+
}
|
|
141
|
+
Blank.toCsvRow = toCsvRow;
|
|
142
|
+
})(Blank = rows.Blank || (rows.Blank = {}));
|
|
143
|
+
function monthlyZeroRows(row, zeroes) {
|
|
144
|
+
let result = "";
|
|
145
|
+
for (let i = 1; 3 >= i; i++)
|
|
146
|
+
result += row.replace("Month x", `Month ${i}`) + "|0".repeat(zeroes) + "\n";
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
rows.monthlyZeroRows = monthlyZeroRows;
|
|
150
|
+
function zeros(row, zeroes) {
|
|
151
|
+
return row + "|0".repeat(zeroes) + "\n";
|
|
152
|
+
}
|
|
153
|
+
rows.zeros = zeros;
|
|
154
|
+
})(rows || (rows = {}));
|
|
155
|
+
//# sourceMappingURL=rows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rows.js","sourceRoot":"../","sources":["reports/visa/rows.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
package/pax2pay.ts
CHANGED
package/reports/index.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { isoly } from "isoly"
|
|
2
|
+
import { Transaction } from "../../../Transaction"
|
|
3
|
+
import { Iin } from "./Iin"
|
|
4
|
+
import { Monthly } from "./Monthly"
|
|
5
|
+
import { Region } from "./Region"
|
|
6
|
+
|
|
7
|
+
// data for rows of format:
|
|
8
|
+
// "Country X - Region X Payments Card Present Count - Month x",
|
|
9
|
+
// "Country X - Region X Payments Card Present Volume - Month x",
|
|
10
|
+
// "Country X - Region X Payments Card Not Present Count - Month x",
|
|
11
|
+
// "Country X - Region X Payments Card Not Present Volume - Month x",
|
|
12
|
+
type PerCountry = { present?: Monthly; notPresent?: Monthly }
|
|
13
|
+
export type Country = Partial<Record<isoly.CountryCode.Alpha2, PerCountry>>
|
|
14
|
+
export namespace Country {
|
|
15
|
+
export function toCsv(country: Country): string {
|
|
16
|
+
let result = ""
|
|
17
|
+
for (const [countryCode, perCountry] of Object.entries(country)) {
|
|
18
|
+
const region = Region.find(countryCode as isoly.CountryCode.Alpha2)
|
|
19
|
+
result += csvLine(countryCode, region, perCountry, "present", "count")
|
|
20
|
+
result += csvLine(countryCode, region, perCountry, "present", "volume")
|
|
21
|
+
result += csvLine(countryCode, region, perCountry, "notPresent", "count")
|
|
22
|
+
result += csvLine(countryCode, region, perCountry, "notPresent", "volume")
|
|
23
|
+
}
|
|
24
|
+
return result
|
|
25
|
+
}
|
|
26
|
+
export function csvLine(
|
|
27
|
+
country: string,
|
|
28
|
+
region: Region,
|
|
29
|
+
data: PerCountry,
|
|
30
|
+
presence: "present" | "notPresent",
|
|
31
|
+
type: "count" | "volume"
|
|
32
|
+
): string {
|
|
33
|
+
let result = ""
|
|
34
|
+
if (data[presence])
|
|
35
|
+
for (const month of Monthly.Month.values) {
|
|
36
|
+
result += `Country ${country} - ${region} Card ${presence == "present" ? "Present" : "Not Present"} ${
|
|
37
|
+
type == "count" ? "Count" : "Volume"
|
|
38
|
+
} - Month ${month}`
|
|
39
|
+
for (const iin of Iin.values)
|
|
40
|
+
result += `|${data[presence][month][type][iin] ?? 0}`
|
|
41
|
+
result += "\n"
|
|
42
|
+
}
|
|
43
|
+
return result
|
|
44
|
+
}
|
|
45
|
+
export function update(country: Country, transaction: Transaction.CardTransaction): Country {
|
|
46
|
+
const result: Country = country
|
|
47
|
+
result[transaction.counterpart.merchant.country] = updatePerCountry(
|
|
48
|
+
result[transaction.counterpart.merchant.country] ?? {},
|
|
49
|
+
transaction
|
|
50
|
+
)
|
|
51
|
+
return result
|
|
52
|
+
}
|
|
53
|
+
function updatePerCountry(input: PerCountry, transaction: Transaction.CardTransaction): PerCountry {
|
|
54
|
+
const result = input
|
|
55
|
+
const key = transaction.counterpart.present === true ? "present" : "notPresent"
|
|
56
|
+
result[key] = Monthly.update(result[key], transaction)
|
|
57
|
+
return result
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
|
|
3
|
+
export type Iin = typeof Iin.values[number]
|
|
4
|
+
export namespace Iin {
|
|
5
|
+
export type Idx = typeof Idx.values[number]
|
|
6
|
+
export namespace Idx {
|
|
7
|
+
export const values = ["45672555", "4567255", "45672557"] as const
|
|
8
|
+
export const type = isly.string<Idx>(values)
|
|
9
|
+
}
|
|
10
|
+
export const values = [...Idx.values, "totalIdx", "44260108", "49359119", "45672554"] as const
|
|
11
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { isoly } from "isoly"
|
|
2
|
+
import { Transaction } from "../../../Transaction"
|
|
3
|
+
import { Iin } from "./Iin"
|
|
4
|
+
|
|
5
|
+
export type Monthly = Record<
|
|
6
|
+
Monthly.Month,
|
|
7
|
+
{ count: Partial<Record<Iin, number>>; volume: Partial<Record<Iin, number>> }
|
|
8
|
+
>
|
|
9
|
+
export namespace Monthly {
|
|
10
|
+
export type Month = typeof Month.values[number]
|
|
11
|
+
export namespace Month {
|
|
12
|
+
export const values = [1, 2, 3] as const
|
|
13
|
+
}
|
|
14
|
+
// returns which number of the month in the quarter the transaction is in
|
|
15
|
+
export function getMonth(transaction: Transaction.CardTransaction): Monthly.Month {
|
|
16
|
+
const month = isoly.DateTime.getMonth(transaction.transacted ?? transaction.posted)
|
|
17
|
+
return (((month - 1) % 3) + 1) as Monthly.Month
|
|
18
|
+
}
|
|
19
|
+
export function update(previous: Monthly | undefined, transaction: Transaction.CardTransaction): Monthly {
|
|
20
|
+
const result: Monthly = previous ?? {
|
|
21
|
+
"1": { count: {}, volume: {} },
|
|
22
|
+
"2": { count: {}, volume: {} },
|
|
23
|
+
"3": { count: {}, volume: {} },
|
|
24
|
+
}
|
|
25
|
+
if (transaction.direction == "outbound" && transaction.status == "finalized") {
|
|
26
|
+
const month = getMonth(transaction)
|
|
27
|
+
result[month].count[transaction.account.iin as Iin] =
|
|
28
|
+
(result[month].count[transaction.account.iin as Iin] ?? 0) + 1
|
|
29
|
+
result[month].volume[transaction.account.iin as Iin] = isoly.Currency.add(
|
|
30
|
+
"GBP",
|
|
31
|
+
result[month].volume[transaction.account.iin as Iin] ?? 0,
|
|
32
|
+
Math.abs(transaction.amount.original)
|
|
33
|
+
)
|
|
34
|
+
if (Iin.Idx.type.is(transaction.account.iin)) {
|
|
35
|
+
result[month].count["totalIdx"] = (result[month].count["totalIdx"] ?? 0) + 1
|
|
36
|
+
result[month].volume["totalIdx"] = isoly.Currency.add(
|
|
37
|
+
"GBP",
|
|
38
|
+
result[month].volume["totalIdx"] ?? 0,
|
|
39
|
+
Math.abs(transaction.amount.original)
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return result
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Transaction } from "../../../Transaction"
|
|
2
|
+
import { rows } from "../rows"
|
|
3
|
+
import { Iin } from "./Iin"
|
|
4
|
+
|
|
5
|
+
export type NonMonthly = Record<
|
|
6
|
+
| "Total Number of Cards"
|
|
7
|
+
| "Total Number of Active Cards"
|
|
8
|
+
| "Total Number of Accounts"
|
|
9
|
+
| "Number of Accounts - International Enabled"
|
|
10
|
+
| "Payments Transactions Declined for Insufficient Funds - Number",
|
|
11
|
+
Partial<Record<Iin, number>>
|
|
12
|
+
>
|
|
13
|
+
export namespace NonMonthly {
|
|
14
|
+
export const empty: NonMonthly = {
|
|
15
|
+
"Number of Accounts - International Enabled": {},
|
|
16
|
+
"Payments Transactions Declined for Insufficient Funds - Number": {},
|
|
17
|
+
"Total Number of Accounts": {},
|
|
18
|
+
"Total Number of Active Cards": {},
|
|
19
|
+
"Total Number of Cards": {},
|
|
20
|
+
}
|
|
21
|
+
export function update(previous: NonMonthly, transaction: Transaction.CardTransaction): NonMonthly {
|
|
22
|
+
const result = previous
|
|
23
|
+
if (Array.isArray(transaction.status) && transaction.status[1] == "insufficient funds")
|
|
24
|
+
result["Payments Transactions Declined for Insufficient Funds - Number"][transaction.account.iin as Iin] =
|
|
25
|
+
(result["Payments Transactions Declined for Insufficient Funds - Number"]?.[transaction.account.iin as Iin] ??
|
|
26
|
+
0) + 1
|
|
27
|
+
return result
|
|
28
|
+
}
|
|
29
|
+
export function toCsvRow(data: NonMonthly, row: rows.NonZero): string {
|
|
30
|
+
let result = row
|
|
31
|
+
for (const iin of Iin.values)
|
|
32
|
+
result += `|${data[row as keyof NonMonthly][iin] ?? 0}`
|
|
33
|
+
result += "\n"
|
|
34
|
+
return result
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { isoly } from "isoly"
|
|
2
|
+
import { isly } from "isly"
|
|
3
|
+
|
|
4
|
+
export type Region = typeof Region.values[number]
|
|
5
|
+
export namespace Region {
|
|
6
|
+
export const values = [
|
|
7
|
+
"National Payments",
|
|
8
|
+
"International - Intra-Regional Payments",
|
|
9
|
+
"International - Non-EEA Payments",
|
|
10
|
+
"International - Inter-Regional Payments",
|
|
11
|
+
] as const
|
|
12
|
+
export const type = isly.string<Region>(values)
|
|
13
|
+
export const regions: Record<Region, isoly.CountryCode.Alpha2[]> = {
|
|
14
|
+
"National Payments": ["GB"],
|
|
15
|
+
"International - Intra-Regional Payments": [
|
|
16
|
+
"AT",
|
|
17
|
+
"BE",
|
|
18
|
+
"BG",
|
|
19
|
+
"HR",
|
|
20
|
+
"CY",
|
|
21
|
+
"CZ",
|
|
22
|
+
"DK",
|
|
23
|
+
"EE",
|
|
24
|
+
"FI",
|
|
25
|
+
"FR",
|
|
26
|
+
"DE",
|
|
27
|
+
"GR",
|
|
28
|
+
"HU",
|
|
29
|
+
"IE",
|
|
30
|
+
"IT",
|
|
31
|
+
"LV",
|
|
32
|
+
"LT",
|
|
33
|
+
"LU",
|
|
34
|
+
"MT",
|
|
35
|
+
"NL",
|
|
36
|
+
"PL",
|
|
37
|
+
"PT",
|
|
38
|
+
"RO",
|
|
39
|
+
"SK",
|
|
40
|
+
"SI",
|
|
41
|
+
"ES",
|
|
42
|
+
"SE",
|
|
43
|
+
],
|
|
44
|
+
"International - Non-EEA Payments": [],
|
|
45
|
+
"International - Inter-Regional Payments": ["IS", "NO", "LI"],
|
|
46
|
+
}
|
|
47
|
+
export function find(country: isoly.CountryCode.Alpha2): Region {
|
|
48
|
+
let result: Region
|
|
49
|
+
if (regions["National Payments"].includes(country))
|
|
50
|
+
result = "National Payments"
|
|
51
|
+
else if (regions["International - Intra-Regional Payments"].includes(country))
|
|
52
|
+
result = "International - Intra-Regional Payments"
|
|
53
|
+
else if (regions["International - Inter-Regional Payments"].includes(country))
|
|
54
|
+
result = "International - Inter-Regional Payments"
|
|
55
|
+
else
|
|
56
|
+
result = "International - Non-EEA Payments"
|
|
57
|
+
return result
|
|
58
|
+
}
|
|
59
|
+
export function fromRow(row: string): Region {
|
|
60
|
+
let result: Region
|
|
61
|
+
if (row.startsWith("National"))
|
|
62
|
+
result = "National Payments"
|
|
63
|
+
else if (row.startsWith("International - Inter-Regional"))
|
|
64
|
+
result = "International - Inter-Regional Payments"
|
|
65
|
+
else if (row.startsWith("International - Intra-Regional"))
|
|
66
|
+
result = "International - Intra-Regional Payments"
|
|
67
|
+
else
|
|
68
|
+
result = "International - Non-EEA Payments"
|
|
69
|
+
return result
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Transaction } from "../../../Transaction"
|
|
2
|
+
import { Iin } from "./Iin"
|
|
3
|
+
import { Monthly } from "./Monthly"
|
|
4
|
+
import { Region } from "./Region"
|
|
5
|
+
|
|
6
|
+
export type Regional = Partial<Record<Region, Monthly>>
|
|
7
|
+
export namespace Regional {
|
|
8
|
+
export function update(previous: Regional, transaction: Transaction.CardTransaction): Regional {
|
|
9
|
+
const region = Region.find(transaction.counterpart.merchant.country)
|
|
10
|
+
const result: Regional = previous
|
|
11
|
+
result[region] = Monthly.update(result[region], transaction)
|
|
12
|
+
return result
|
|
13
|
+
}
|
|
14
|
+
export function toCsvRow(regional: Regional, row: string): string {
|
|
15
|
+
let result = ""
|
|
16
|
+
const region = Region.fromRow(row)
|
|
17
|
+
const key: "count" | "volume" = row.includes("Count") ? "count" : "volume"
|
|
18
|
+
for (const month of Monthly.Month.values) {
|
|
19
|
+
result += row.replace("Month x", `Month ${month}`)
|
|
20
|
+
for (const iin of Iin.values)
|
|
21
|
+
result += `|${regional[region]?.[month][key][iin] ?? 0}`
|
|
22
|
+
result += "\n"
|
|
23
|
+
}
|
|
24
|
+
return result
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Transaction } from "../../../Transaction"
|
|
2
|
+
import { rows } from "../rows"
|
|
3
|
+
import { Country as DataCountry } from "./Country"
|
|
4
|
+
import { Iin as DataIin } from "./Iin"
|
|
5
|
+
import { NonMonthly } from "./NonMonthly"
|
|
6
|
+
import { Regional } from "./Regional"
|
|
7
|
+
|
|
8
|
+
export type Data = {
|
|
9
|
+
regional: Regional
|
|
10
|
+
nonMonthly: NonMonthly
|
|
11
|
+
country: Data.Country
|
|
12
|
+
}
|
|
13
|
+
export namespace Data {
|
|
14
|
+
export import Iin = DataIin
|
|
15
|
+
export import Country = DataCountry
|
|
16
|
+
export function create(transactions: Transaction.CardTransaction[]): Data {
|
|
17
|
+
const result: Data = { regional: {}, nonMonthly: NonMonthly.empty, country: {} }
|
|
18
|
+
for (const transaction of transactions) {
|
|
19
|
+
result.nonMonthly = NonMonthly.update(result.nonMonthly, transaction)
|
|
20
|
+
result.regional = Regional.update(result.regional, transaction)
|
|
21
|
+
result.country = Country.update(result.country, transaction)
|
|
22
|
+
}
|
|
23
|
+
return result
|
|
24
|
+
}
|
|
25
|
+
export function toCsv(data: Data, row: rows.NonZero): string {
|
|
26
|
+
let result: string
|
|
27
|
+
if (row.endsWith("Month x"))
|
|
28
|
+
result = Regional.toCsvRow(data.regional, row)
|
|
29
|
+
else
|
|
30
|
+
result = NonMonthly.toCsvRow(data.nonMonthly, row)
|
|
31
|
+
return result
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Data as visaData } from "./Data"
|
|
2
|
+
import { rows as visaRows } from "./rows"
|
|
3
|
+
|
|
4
|
+
export namespace visa {
|
|
5
|
+
export import Data = visaData
|
|
6
|
+
export import rows = visaRows
|
|
7
|
+
const headers = [
|
|
8
|
+
"Product Local Name",
|
|
9
|
+
"Visa IDX - 45672555",
|
|
10
|
+
"Visa IDX - 4567255",
|
|
11
|
+
"Visa IDX 1.4% - 45672557",
|
|
12
|
+
"Total Visa IDX products",
|
|
13
|
+
"Visa Business Prepaid - 44260108",
|
|
14
|
+
"Visa Corporate Deferred Debit - 49359119",
|
|
15
|
+
"Visa Business Immediate Debit - BIN: 45672554",
|
|
16
|
+
] as const
|
|
17
|
+
export function toCsv(data: Data): string {
|
|
18
|
+
// report 1
|
|
19
|
+
let csv = headers.join("|") + "\n"
|
|
20
|
+
for (const row of rows.all)
|
|
21
|
+
if (rows.Blank.type.is(row))
|
|
22
|
+
// Leave empty for operations team to fill
|
|
23
|
+
csv += rows.Blank.toCsvRow(row, headers.length - 1)
|
|
24
|
+
else if (rows.NonZero.type.is(row))
|
|
25
|
+
// "report 1" data
|
|
26
|
+
csv += Data.toCsv(data, row)
|
|
27
|
+
else if (row.endsWith("Month x"))
|
|
28
|
+
// rows with zeroes for each month
|
|
29
|
+
csv += rows.monthlyZeroRows(row, headers.length - 1)
|
|
30
|
+
// rows with zeroes
|
|
31
|
+
else
|
|
32
|
+
csv += rows.zeros(row, headers.length - 1)
|
|
33
|
+
// append "report 2" to the end
|
|
34
|
+
csv += Data.Country.toCsv(data.country)
|
|
35
|
+
return csv
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
|
|
3
|
+
export namespace rows {
|
|
4
|
+
export const all = [
|
|
5
|
+
"On-Us Payments Count - Month x",
|
|
6
|
+
"On-Us Payments Volume - Month x",
|
|
7
|
+
"On-Us Account Funding Transaction Count - Month x",
|
|
8
|
+
"On-Us Account Funding Transaction Volume - Month x",
|
|
9
|
+
"On-Us Original Credits Count - Month x",
|
|
10
|
+
"On-Us Original Credits Volume - Month x",
|
|
11
|
+
"On-Us ATM Cash Advances Count - Month x",
|
|
12
|
+
"On-Us ATM Cash Advances Volume - Month x",
|
|
13
|
+
"On-Us Manual Cash Count - Month x",
|
|
14
|
+
"On-Us Manual Cash Volume - Month x",
|
|
15
|
+
"On-Us Cashback Count - Month x",
|
|
16
|
+
"On-Us Cashback Volume - Month x",
|
|
17
|
+
"National Payments Count - Month x",
|
|
18
|
+
"National Payments Volume - Month x",
|
|
19
|
+
"National Account Funding Transaction Count - Month x",
|
|
20
|
+
"National Account Funding Transaction Volume - Month x",
|
|
21
|
+
"National Original Credits Count - Month x",
|
|
22
|
+
"National Original Credits Volume - Month x",
|
|
23
|
+
"National ATM Cash Advances Count - Month x",
|
|
24
|
+
"National ATM Cash Advances Volume - Month x",
|
|
25
|
+
"National Manual Cash Count - Month x",
|
|
26
|
+
"National Manual Cash Volume - Month x",
|
|
27
|
+
"National Cashback Count - Month x",
|
|
28
|
+
"National Cashback Volume - Month x",
|
|
29
|
+
"International - Intra-Regional Payments Count - Month x",
|
|
30
|
+
"International - Intra-Regional Payments Volume - Month x",
|
|
31
|
+
"International - Intra-Regional Account Funding Transaction Count - Month x",
|
|
32
|
+
"International - Intra-Regional Account Funding Transaction Volume - Month x",
|
|
33
|
+
"International - Intra-Regional Original Credits Count - Month x",
|
|
34
|
+
"International - Intra-Regional Original Credits Volume - Month x",
|
|
35
|
+
"International - Intra-Regional ATM Cash Advances Count - Month x",
|
|
36
|
+
"International - Intra-Regional ATM Cash Advances Volume - Month x",
|
|
37
|
+
"International - Intra-Regional Manual Cash Count - Month x",
|
|
38
|
+
"International - Intra-Regional Manual Cash Volume - Month x",
|
|
39
|
+
"International - Intra-Regional Cashback Count - Month x",
|
|
40
|
+
"International - Intra-Regional Cashback Volume - Month x",
|
|
41
|
+
"International - Non-EEA Payments Count - Month x",
|
|
42
|
+
"International - Non-EEA Payments Volume - Month x",
|
|
43
|
+
"International - Non-EEA Account Funding Transaction Count - Month x",
|
|
44
|
+
"International - Non-EEA Account Funding Transaction Volume - Month x",
|
|
45
|
+
"International - Non-EEA Original Credits Count - Month x",
|
|
46
|
+
"International - Non-EEA Original Credits Volume - Month x",
|
|
47
|
+
"International - Non-EEA ATM Cash Advances Count - Month x",
|
|
48
|
+
"International - Non-EEA ATM Cash Advances Volume - Month x",
|
|
49
|
+
"International - Non-EEA Manual Cash Count - Month x",
|
|
50
|
+
"International - Non-EEA Manual Cash Volume - Month x",
|
|
51
|
+
"International - Non-EEA Cashback Count - Month x",
|
|
52
|
+
"International - Non-EEA Cashback Volume - Month x",
|
|
53
|
+
"International - Inter-Regional Payments Count - Month x",
|
|
54
|
+
"International - Inter-Regional Payments Volume - Month x",
|
|
55
|
+
"International - Inter-Regional Account Funding Transaction Count - Month x",
|
|
56
|
+
"International - Inter-Regional Account Funding Transaction Volume - Month x",
|
|
57
|
+
"International - Inter-Regional Original Credits Count - Month x",
|
|
58
|
+
"International - Inter-Regional Original Credits Volume - Month x",
|
|
59
|
+
"International - Inter-Regional ATM Cash Advances Count - Month x",
|
|
60
|
+
"International - Inter-Regional ATM Cash Advances Volume - Month x",
|
|
61
|
+
"International - Inter-Regional Manual Cash Count - Month x",
|
|
62
|
+
"International - Inter-Regional Manual Cash Volume - Month x",
|
|
63
|
+
"International - Inter-Regional Cashback Count - Month x",
|
|
64
|
+
"International - Inter-Regional Cashback Volume - Month x",
|
|
65
|
+
"Total Number of Cards",
|
|
66
|
+
"Number of Cards - Magnetic Stripe",
|
|
67
|
+
"Number of Cards - Magnetic Stripe, Chip",
|
|
68
|
+
"Number of Cards - Magnetic Stripe, Contactless",
|
|
69
|
+
"Number of Cards - Magnetic Stripe, Chip, Contactless",
|
|
70
|
+
"Total Number of Active Cards",
|
|
71
|
+
"Number of Active Cards - used at Contactless device",
|
|
72
|
+
"Number of Devices with Visa Contactless - Micro Tags",
|
|
73
|
+
"Number of Devices with Visa Contactless - Mobile Phones",
|
|
74
|
+
"Number of Devices with Visa Contactless - Other Devices",
|
|
75
|
+
"Total Number of Accounts",
|
|
76
|
+
"Number of Accounts - Domestic Use Only",
|
|
77
|
+
"Number of Accounts - International Enabled",
|
|
78
|
+
"Total Number of Active Accounts",
|
|
79
|
+
"Total Number of Personal Deposit Accounts",
|
|
80
|
+
"Number of Savings Accounts",
|
|
81
|
+
"Number of Regular Checking Accounts",
|
|
82
|
+
"Fraud Recoveries - Domestic - Cash Disbursements - Amount",
|
|
83
|
+
"Fraud Recoveries - Domestic - Payments - Amount",
|
|
84
|
+
"Fraud Recoveries - International - Cash Disbursements - Amount",
|
|
85
|
+
"Fraud Recoveries - International - Payments - Amount",
|
|
86
|
+
"Gross Fraud Losses - Number of Accounts",
|
|
87
|
+
"Gross Fraud Losses - Number of Recovered Accounts",
|
|
88
|
+
"Gross Fraud Losses - Domestic - Cash Disbursements - Count",
|
|
89
|
+
"Gross Fraud Losses - Domestic - Cash Disbursements - Volume",
|
|
90
|
+
"Gross Fraud Losses - Domestic - Payments - Count",
|
|
91
|
+
"Gross Fraud Losses - Domestic - Payments - Volume",
|
|
92
|
+
"Gross Fraud Losses - International - Cash Disbursements - Count",
|
|
93
|
+
"Gross Fraud Losses - International - Cash Disbursements - Volume",
|
|
94
|
+
"Gross Fraud Losses - International - Payments - Count",
|
|
95
|
+
"Gross Fraud Losses - International - Payments - Volume",
|
|
96
|
+
"Total Product Balance - Volume",
|
|
97
|
+
"Payments Transactions Declined for Insufficient Funds - Number",
|
|
98
|
+
"Cash Transactions Declined for Insufficient Funds - Number",
|
|
99
|
+
] as const
|
|
100
|
+
export type NonZero = typeof NonZero.values[number]
|
|
101
|
+
export namespace NonZero {
|
|
102
|
+
export const values = [
|
|
103
|
+
"National Payments Count - Month x",
|
|
104
|
+
"National Payments Volume - Month x",
|
|
105
|
+
"International - Intra-Regional Payments Count - Month x",
|
|
106
|
+
"International - Intra-Regional Payments Volume - Month x",
|
|
107
|
+
"International - Non-EEA Payments Count - Month x",
|
|
108
|
+
"International - Non-EEA Payments Volume - Month x",
|
|
109
|
+
"International - Inter-Regional Payments Count - Month x",
|
|
110
|
+
"International - Inter-Regional Payments Volume - Month x",
|
|
111
|
+
"Total Number of Cards",
|
|
112
|
+
"Total Number of Active Cards",
|
|
113
|
+
"Total Number of Accounts",
|
|
114
|
+
"Number of Accounts - International Enabled",
|
|
115
|
+
"Payments Transactions Declined for Insufficient Funds - Number",
|
|
116
|
+
] as const
|
|
117
|
+
export const type = isly.string<NonZero>(values)
|
|
118
|
+
}
|
|
119
|
+
export type Blank = typeof Blank.values[number]
|
|
120
|
+
export namespace Blank {
|
|
121
|
+
export const values = [
|
|
122
|
+
"Fraud Recoveries - Domestic - Cash Disbursements - Amount",
|
|
123
|
+
"Fraud Recoveries - Domestic - Payments - Amount",
|
|
124
|
+
"Fraud Recoveries - International - Cash Disbursements - Amount",
|
|
125
|
+
"Fraud Recoveries - International - Payments - Amount",
|
|
126
|
+
"Gross Fraud Losses - Number of Accounts",
|
|
127
|
+
"Gross Fraud Losses - Number of Recovered Accounts",
|
|
128
|
+
"Gross Fraud Losses - Domestic - Cash Disbursements - Count",
|
|
129
|
+
"Gross Fraud Losses - Domestic - Cash Disbursements - Volume",
|
|
130
|
+
"Gross Fraud Losses - Domestic - Payments - Count",
|
|
131
|
+
"Gross Fraud Losses - Domestic - Payments - Volume",
|
|
132
|
+
"Gross Fraud Losses - International - Cash Disbursements - Count",
|
|
133
|
+
"Gross Fraud Losses - International - Cash Disbursements - Volume",
|
|
134
|
+
"Gross Fraud Losses - International - Payments - Count",
|
|
135
|
+
"Gross Fraud Losses - International - Payments - Volume",
|
|
136
|
+
] as const
|
|
137
|
+
export const type = isly.string<Blank>(values)
|
|
138
|
+
export function toCsvRow(row: Blank, count: number): string {
|
|
139
|
+
return row + "|".repeat(count) + "\n"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
export function monthlyZeroRows(row: string, zeroes: number): string {
|
|
143
|
+
let result = ""
|
|
144
|
+
for (let i = 1; 3 >= i; i++)
|
|
145
|
+
result += row.replace("Month x", `Month ${i}`) + "|0".repeat(zeroes) + "\n"
|
|
146
|
+
return result
|
|
147
|
+
}
|
|
148
|
+
export function zeros(row: string, zeroes: number): string {
|
|
149
|
+
return row + "|0".repeat(zeroes) + "\n"
|
|
150
|
+
}
|
|
151
|
+
}
|