@pax2pay/model-banking 0.1.464 → 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/Card/Preset.ts +0 -8
- package/Card/Stack.ts +1 -12
- package/Rail/Address/index.ts +0 -2
- package/Realm.ts +1 -7
- package/Transaction/Statistics.ts +6 -23
- package/dist/Card/Preset.d.ts +2 -2
- package/dist/Card/Preset.js +0 -8
- package/dist/Card/Preset.js.map +1 -1
- package/dist/Card/Stack.d.ts +2 -2
- package/dist/Card/Stack.js +1 -12
- package/dist/Card/Stack.js.map +1 -1
- package/dist/Identity.d.ts +1 -1
- package/dist/Rail/Address/index.js +0 -2
- package/dist/Rail/Address/index.js.map +1 -1
- package/dist/Realm.d.ts +1 -3
- package/dist/Realm.js +1 -5
- package/dist/Realm.js.map +1 -1
- 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
package/Card/Preset.ts
CHANGED
|
@@ -7,26 +7,18 @@ export type Preset = typeof Preset.names[number]
|
|
|
7
7
|
export namespace Preset {
|
|
8
8
|
export const names = [
|
|
9
9
|
"p2p-mc-200",
|
|
10
|
-
"test-mc-200",
|
|
11
|
-
"test-ta-mq-200",
|
|
12
10
|
"test-pg-200",
|
|
13
11
|
"test-pg-150",
|
|
14
12
|
"test-ta-pg-200",
|
|
15
13
|
"test-ta-mc-200",
|
|
16
14
|
"p2p-diners-175",
|
|
17
15
|
"p2p-diners-200",
|
|
18
|
-
"test-diners-200",
|
|
19
|
-
"test-diners-202",
|
|
20
16
|
] as const
|
|
21
17
|
export const type = isly.string<Preset>(names)
|
|
22
18
|
export const presets: Record<Preset, Stack> = {
|
|
23
19
|
"p2p-mc-200": "uk-mc-tpl-marqeta",
|
|
24
20
|
"p2p-diners-175": "uk-diners-dpg",
|
|
25
21
|
"p2p-diners-200": "uk-diners-dpg",
|
|
26
|
-
"test-diners-200": "testUK-diners-dpg",
|
|
27
|
-
"test-diners-202": "testUK-diners-dpg",
|
|
28
|
-
"test-mc-200": "testUK-marqeta",
|
|
29
|
-
"test-ta-mq-200": "testUK-tpl-marqeta",
|
|
30
22
|
"test-pg-200": "test-paxgiro",
|
|
31
23
|
"test-ta-mc-200": "test-tpl-paxgiro",
|
|
32
24
|
"test-ta-pg-200": "test-tpl-paxgiro",
|
package/Card/Stack.ts
CHANGED
|
@@ -5,15 +5,7 @@ export type Stack = typeof Stack.stacks[number]
|
|
|
5
5
|
|
|
6
6
|
// realm-scheme-processor(-processor...)
|
|
7
7
|
export namespace Stack {
|
|
8
|
-
export const stacks = [
|
|
9
|
-
"test-paxgiro",
|
|
10
|
-
"test-tpl-paxgiro",
|
|
11
|
-
"testUK-marqeta",
|
|
12
|
-
"testUK-tpl-marqeta",
|
|
13
|
-
"testUK-diners-dpg",
|
|
14
|
-
"uk-diners-dpg",
|
|
15
|
-
"uk-mc-tpl-marqeta",
|
|
16
|
-
] as const
|
|
8
|
+
export const stacks = ["test-paxgiro", "test-tpl-paxgiro", "uk-diners-dpg", "uk-mc-tpl-marqeta"] as const
|
|
17
9
|
export const type = isly.string(stacks)
|
|
18
10
|
export function toRealm(stack: Stack): Realm {
|
|
19
11
|
return stack.split("-")[0] as Realm
|
|
@@ -61,9 +53,6 @@ export namespace Stack {
|
|
|
61
53
|
const table: Record<Stack, Stack.Character> = {
|
|
62
54
|
"test-paxgiro": "z",
|
|
63
55
|
"test-tpl-paxgiro": "y",
|
|
64
|
-
"testUK-marqeta": "x",
|
|
65
|
-
"testUK-tpl-marqeta": "w",
|
|
66
|
-
"testUK-diners-dpg": "u",
|
|
67
56
|
"uk-mc-tpl-marqeta": "a",
|
|
68
57
|
"uk-diners-dpg": "b",
|
|
69
58
|
}
|
package/Rail/Address/index.ts
CHANGED
|
@@ -19,10 +19,8 @@ export type Address =
|
|
|
19
19
|
export namespace Address {
|
|
20
20
|
export const realm: Record<Realm, string[]> = {
|
|
21
21
|
test: ["paxgiro", "internal", "iban", "scan", "card", "paxgiro-credit"],
|
|
22
|
-
testUK: ["internal", "iban", "scan", "card"],
|
|
23
22
|
uk: ["internal", "iban", "scan", "card"],
|
|
24
23
|
eea: ["internal", "iban", "scan", "card"],
|
|
25
|
-
upcheck: ["paxgiro", "internal", "iban", "scan", "card", "paxgiro-credit"],
|
|
26
24
|
}
|
|
27
25
|
export const values = ["paxgiro", "internal", "iban", "scan", "card", "paxgiro-credit"] as const
|
|
28
26
|
export type Type = typeof values[number]
|
package/Realm.ts
CHANGED
|
@@ -5,31 +5,25 @@ import { Supplier as modelSupplier } from "./Supplier"
|
|
|
5
5
|
export type Realm = typeof Realm.realms[number]
|
|
6
6
|
|
|
7
7
|
export namespace Realm {
|
|
8
|
-
export const realms = ["test", "
|
|
8
|
+
export const realms = ["test", "uk", "eea"] as const
|
|
9
9
|
export const type: isly.Type<Realm> = isly.string(realms)
|
|
10
10
|
export function toString(): string {
|
|
11
11
|
return realms.toString().replaceAll(",", ", ") + "."
|
|
12
12
|
}
|
|
13
13
|
export const currency: Record<Realm, isoly.Currency> = {
|
|
14
14
|
test: "EUR",
|
|
15
|
-
upcheck: "EUR",
|
|
16
|
-
testUK: "GBP",
|
|
17
15
|
uk: "GBP",
|
|
18
16
|
eea: "EUR",
|
|
19
17
|
}
|
|
20
18
|
export const suppliers: Record<Realm, modelSupplier[]> = {
|
|
21
19
|
test: ["paxgiro", "paxgiroCredit"],
|
|
22
|
-
testUK: ["clearbank"],
|
|
23
20
|
uk: ["clearbank"],
|
|
24
21
|
eea: [],
|
|
25
|
-
upcheck: ["paxgiro"],
|
|
26
22
|
}
|
|
27
23
|
export interface Suppliers extends Record<Realm, modelSupplier[]> {
|
|
28
24
|
test: ["paxgiro", "paxgiroCredit"]
|
|
29
|
-
testUK: ["clearbank"]
|
|
30
25
|
uk: ["clearbank"]
|
|
31
26
|
eea: []
|
|
32
|
-
upcheck: ["paxgiro"]
|
|
33
27
|
}
|
|
34
28
|
export type Supplier<P extends keyof Suppliers> = Pick<Suppliers, P>[P][number]
|
|
35
29
|
export namespace Supplier {
|
|
@@ -19,20 +19,11 @@ export namespace Statistics {
|
|
|
19
19
|
export namespace Region {
|
|
20
20
|
export const values = ["domestic", "intraRegion", "extraRegion"] as const
|
|
21
21
|
}
|
|
22
|
-
export type Regional = Record<
|
|
23
|
-
Statistics.Region,
|
|
24
|
-
{
|
|
25
|
-
count: number
|
|
26
|
-
amount: number
|
|
27
|
-
}
|
|
28
|
-
>
|
|
22
|
+
export type Regional = Record<Statistics.Region, { count: number; amount: number }>
|
|
29
23
|
export namespace Regional {
|
|
30
24
|
export const type = isly.record(
|
|
31
25
|
isly.string<Region>(Region.values),
|
|
32
|
-
isly.object({
|
|
33
|
-
count: isly.number(),
|
|
34
|
-
amount: isly.number(),
|
|
35
|
-
})
|
|
26
|
+
isly.object({ count: isly.number(), amount: isly.number() })
|
|
36
27
|
)
|
|
37
28
|
}
|
|
38
29
|
export const type = isly.object<Statistics>({
|
|
@@ -87,18 +78,10 @@ export namespace Statistics {
|
|
|
87
78
|
export function combine(accumulation: Statistics, incoming: Statistics, currency: isoly.Currency): Statistics {
|
|
88
79
|
const [statistics, cards] = (({ cursor, cards, ...rest }) => [rest, cards])(incoming)
|
|
89
80
|
Object.entries(statistics).forEach(([kind, statistic]: [TransactionType, Statistics[TransactionType]]) =>
|
|
90
|
-
Object.entries(statistic).forEach(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
count: number
|
|
95
|
-
amount: number
|
|
96
|
-
}
|
|
97
|
-
]) => {
|
|
98
|
-
accumulation[kind][region].count += count
|
|
99
|
-
accumulation[kind][region].amount = isoly.Currency.add(currency, accumulation[kind][region].amount, amount)
|
|
100
|
-
}
|
|
101
|
-
)
|
|
81
|
+
Object.entries(statistic).forEach(([region, { count, amount }]: [Region, { count: number; amount: number }]) => {
|
|
82
|
+
accumulation[kind][region].count += count
|
|
83
|
+
accumulation[kind][region].amount = isoly.Currency.add(currency, accumulation[kind][region].amount, amount)
|
|
84
|
+
})
|
|
102
85
|
)
|
|
103
86
|
cards.forEach(card => accumulation.cards.includes(card) || accumulation.cards.push(card))
|
|
104
87
|
return accumulation
|
package/dist/Card/Preset.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { isly } from "isly";
|
|
|
2
2
|
import { Stack } from "./Stack";
|
|
3
3
|
export type Preset = typeof Preset.names[number];
|
|
4
4
|
export declare namespace Preset {
|
|
5
|
-
const names: readonly ["p2p-mc-200", "test-
|
|
6
|
-
const type: isly.Type<"p2p-mc-200" | "test-
|
|
5
|
+
const names: readonly ["p2p-mc-200", "test-pg-200", "test-pg-150", "test-ta-pg-200", "test-ta-mc-200", "p2p-diners-175", "p2p-diners-200"];
|
|
6
|
+
const type: isly.Type<"p2p-mc-200" | "test-pg-200" | "test-pg-150" | "test-ta-pg-200" | "test-ta-mc-200" | "p2p-diners-175" | "p2p-diners-200">;
|
|
7
7
|
const presets: Record<Preset, Stack>;
|
|
8
8
|
}
|
package/dist/Card/Preset.js
CHANGED
|
@@ -3,26 +3,18 @@ export var Preset;
|
|
|
3
3
|
(function (Preset) {
|
|
4
4
|
Preset.names = [
|
|
5
5
|
"p2p-mc-200",
|
|
6
|
-
"test-mc-200",
|
|
7
|
-
"test-ta-mq-200",
|
|
8
6
|
"test-pg-200",
|
|
9
7
|
"test-pg-150",
|
|
10
8
|
"test-ta-pg-200",
|
|
11
9
|
"test-ta-mc-200",
|
|
12
10
|
"p2p-diners-175",
|
|
13
11
|
"p2p-diners-200",
|
|
14
|
-
"test-diners-200",
|
|
15
|
-
"test-diners-202",
|
|
16
12
|
];
|
|
17
13
|
Preset.type = isly.string(Preset.names);
|
|
18
14
|
Preset.presets = {
|
|
19
15
|
"p2p-mc-200": "uk-mc-tpl-marqeta",
|
|
20
16
|
"p2p-diners-175": "uk-diners-dpg",
|
|
21
17
|
"p2p-diners-200": "uk-diners-dpg",
|
|
22
|
-
"test-diners-200": "testUK-diners-dpg",
|
|
23
|
-
"test-diners-202": "testUK-diners-dpg",
|
|
24
|
-
"test-mc-200": "testUK-marqeta",
|
|
25
|
-
"test-ta-mq-200": "testUK-tpl-marqeta",
|
|
26
18
|
"test-pg-200": "test-paxgiro",
|
|
27
19
|
"test-ta-mc-200": "test-tpl-paxgiro",
|
|
28
20
|
"test-ta-pg-200": "test-tpl-paxgiro",
|
package/dist/Card/Preset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preset.js","sourceRoot":"../","sources":["Card/Preset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM3B,MAAM,KAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"Preset.js","sourceRoot":"../","sources":["Card/Preset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM3B,MAAM,KAAW,MAAM,CAoBtB;AApBD,WAAiB,MAAM;IACT,YAAK,GAAG;QACpB,YAAY;QACZ,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,gBAAgB;QAChB,gBAAgB;QAChB,gBAAgB;KACP,CAAA;IACG,WAAI,GAAG,IAAI,CAAC,MAAM,CAAS,OAAA,KAAK,CAAC,CAAA;IACjC,cAAO,GAA0B;QAC7C,YAAY,EAAE,mBAAmB;QACjC,gBAAgB,EAAE,eAAe;QACjC,gBAAgB,EAAE,eAAe;QACjC,aAAa,EAAE,cAAc;QAC7B,gBAAgB,EAAE,kBAAkB;QACpC,gBAAgB,EAAE,kBAAkB;QACpC,aAAa,EAAE,cAAc;KAC7B,CAAA;AACF,CAAC,EApBgB,MAAM,KAAN,MAAM,QAoBtB"}
|
package/dist/Card/Stack.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { isly } from "isly";
|
|
|
2
2
|
import { Realm } from "../Realm";
|
|
3
3
|
export type Stack = typeof Stack.stacks[number];
|
|
4
4
|
export declare namespace Stack {
|
|
5
|
-
const stacks: readonly ["test-paxgiro", "test-tpl-paxgiro", "
|
|
6
|
-
const type: isly.Type<"test-paxgiro" | "test-tpl-paxgiro" | "
|
|
5
|
+
const stacks: readonly ["test-paxgiro", "test-tpl-paxgiro", "uk-diners-dpg", "uk-mc-tpl-marqeta"];
|
|
6
|
+
const type: isly.Type<"test-paxgiro" | "test-tpl-paxgiro" | "uk-diners-dpg" | "uk-mc-tpl-marqeta">;
|
|
7
7
|
function toRealm(stack: Stack): Realm;
|
|
8
8
|
function toScheme(stack: Stack): string;
|
|
9
9
|
function toProcessor(stack: Stack): string;
|
package/dist/Card/Stack.js
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
2
|
export var Stack;
|
|
3
3
|
(function (Stack) {
|
|
4
|
-
Stack.stacks = [
|
|
5
|
-
"test-paxgiro",
|
|
6
|
-
"test-tpl-paxgiro",
|
|
7
|
-
"testUK-marqeta",
|
|
8
|
-
"testUK-tpl-marqeta",
|
|
9
|
-
"testUK-diners-dpg",
|
|
10
|
-
"uk-diners-dpg",
|
|
11
|
-
"uk-mc-tpl-marqeta",
|
|
12
|
-
];
|
|
4
|
+
Stack.stacks = ["test-paxgiro", "test-tpl-paxgiro", "uk-diners-dpg", "uk-mc-tpl-marqeta"];
|
|
13
5
|
Stack.type = isly.string(Stack.stacks);
|
|
14
6
|
function toRealm(stack) {
|
|
15
7
|
return stack.split("-")[0];
|
|
@@ -61,9 +53,6 @@ export var Stack;
|
|
|
61
53
|
const table = {
|
|
62
54
|
"test-paxgiro": "z",
|
|
63
55
|
"test-tpl-paxgiro": "y",
|
|
64
|
-
"testUK-marqeta": "x",
|
|
65
|
-
"testUK-tpl-marqeta": "w",
|
|
66
|
-
"testUK-diners-dpg": "u",
|
|
67
56
|
"uk-mc-tpl-marqeta": "a",
|
|
68
57
|
"uk-diners-dpg": "b",
|
|
69
58
|
};
|
package/dist/Card/Stack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.js","sourceRoot":"../","sources":["Card/Stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM3B,MAAM,KAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"Stack.js","sourceRoot":"../","sources":["Card/Stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM3B,MAAM,KAAW,KAAK,CA8DrB;AA9DD,WAAiB,KAAK;IACR,YAAM,GAAG,CAAC,cAAc,EAAE,kBAAkB,EAAE,eAAe,EAAE,mBAAmB,CAAU,CAAA;IAC5F,UAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAA,MAAM,CAAC,CAAA;IACvC,SAAgB,OAAO,CAAC,KAAY;QACnC,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAU,CAAA;IACpC,CAAC;IAFe,aAAO,UAEtB,CAAA;IACD,SAAgB,QAAQ,CAAC,KAAY;QACpC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QAClC,OAAO,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAA;IACjF,CAAC;IAHe,cAAQ,WAGvB,CAAA;IACD,SAAgB,WAAW,CAAC,KAAY;QACvC,OAAO,KAAK;aACV,KAAK,CAAC,GAAG,CAAC;aACV,KAAK,CAAC,CAAC,CAAC;aACR,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACvC,IAAI,CAAC,GAAG,CAAC,CAAA;IACZ,CAAC;IANe,iBAAW,cAM1B,CAAA;IACD,IAAiB,SAAS,CA2CzB;IA3CD,WAAiB,SAAS;QACZ,gBAAM,GAAG;YACrB,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;YACH,GAAG;SACM,CAAA;QACV,MAAM,KAAK,GAAmC;YAC7C,cAAc,EAAE,GAAG;YACnB,kBAAkB,EAAE,GAAG;YACvB,mBAAmB,EAAE,GAAG;YACxB,eAAe,EAAE,GAAG;SACpB,CAAA;QACD,SAAgB,IAAI,CAAC,KAAY;YAChC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAA;QACpB,CAAC;QAFe,cAAI,OAEnB,CAAA;QACD,SAAgB,OAAO,CAAC,SAA0B;YACjD,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAChC,CAAC,KAAK,EAA+B,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,SAAS,CAC7D,EAAE,CAAC,CAAC,CAAC,CAAA;QACP,CAAC;QAJe,iBAAO,UAItB,CAAA;IACF,CAAC,EA3CgB,SAAS,GAAT,eAAS,KAAT,eAAS,QA2CzB;AAEF,CAAC,EA9DgB,KAAK,KAAL,KAAK,QA8DrB"}
|
package/dist/Identity.d.ts
CHANGED
|
@@ -16,5 +16,5 @@ export declare class Identity {
|
|
|
16
16
|
organization?: string;
|
|
17
17
|
}, constraint: Key.Permissions | Key.Permissions[], requires?: T, verifier?: userwidgets.User.Key.Verifier<Key>): Promise<(keyof T extends keyof Identity ? Required<Pick<Identity, keyof T>> & Identity : Identity) | undefined>;
|
|
18
18
|
static verify(authorization: string | undefined, verifier?: userwidgets.User.Key.Verifier<Key>): Promise<Key | undefined>;
|
|
19
|
-
static getRealms(permissions: Key.Permissions): ("uk" | "test" | "
|
|
19
|
+
static getRealms(permissions: Key.Permissions): ("uk" | "test" | "eea")[];
|
|
20
20
|
}
|
|
@@ -10,10 +10,8 @@ export var Address;
|
|
|
10
10
|
(function (Address_1) {
|
|
11
11
|
Address_1.realm = {
|
|
12
12
|
test: ["paxgiro", "internal", "iban", "scan", "card", "paxgiro-credit"],
|
|
13
|
-
testUK: ["internal", "iban", "scan", "card"],
|
|
14
13
|
uk: ["internal", "iban", "scan", "card"],
|
|
15
14
|
eea: ["internal", "iban", "scan", "card"],
|
|
16
|
-
upcheck: ["paxgiro", "internal", "iban", "scan", "card", "paxgiro-credit"],
|
|
17
15
|
};
|
|
18
16
|
Address_1.values = ["paxgiro", "internal", "iban", "scan", "card", "paxgiro-credit"];
|
|
19
17
|
function compare(addresses) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Rail/Address/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACvE,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAA;AAU5C,MAAM,KAAW,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRo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c,CAAA;IACxB,cAAI,GAAG,WAAW,CAAA;IAClB,cAAI,GAAG,WAAW,CAAA;IAClB,kBAAQ,GAAG,eAAe,CAAA;IAC1B,cAAI,GAAG,WAAW,CAAA;IAClB,wBAAc,GAAG,oBAAoB,CAAA;IACrC,eAAK,GAAG,YAAY,CAAA;AACnC,CAAC,EAxFgB,OAAO,KAAP,OAAO,QAwFvB"}
|
package/dist/Realm.d.ts
CHANGED
|
@@ -3,17 +3,15 @@ import { isly } from "isly";
|
|
|
3
3
|
import { Supplier as modelSupplier } from "./Supplier";
|
|
4
4
|
export type Realm = typeof Realm.realms[number];
|
|
5
5
|
export declare namespace Realm {
|
|
6
|
-
const realms: readonly ["test", "
|
|
6
|
+
const realms: readonly ["test", "uk", "eea"];
|
|
7
7
|
const type: isly.Type<Realm>;
|
|
8
8
|
function toString(): string;
|
|
9
9
|
const currency: Record<Realm, isoly.Currency>;
|
|
10
10
|
const suppliers: Record<Realm, modelSupplier[]>;
|
|
11
11
|
interface Suppliers extends Record<Realm, modelSupplier[]> {
|
|
12
12
|
test: ["paxgiro", "paxgiroCredit"];
|
|
13
|
-
testUK: ["clearbank"];
|
|
14
13
|
uk: ["clearbank"];
|
|
15
14
|
eea: [];
|
|
16
|
-
upcheck: ["paxgiro"];
|
|
17
15
|
}
|
|
18
16
|
type Supplier<P extends keyof Suppliers> = Pick<Suppliers, P>[P][number];
|
|
19
17
|
namespace Supplier {
|
package/dist/Realm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
2
|
export var Realm;
|
|
3
3
|
(function (Realm) {
|
|
4
|
-
Realm.realms = ["test", "
|
|
4
|
+
Realm.realms = ["test", "uk", "eea"];
|
|
5
5
|
Realm.type = isly.string(Realm.realms);
|
|
6
6
|
function toString() {
|
|
7
7
|
return Realm.realms.toString().replaceAll(",", ", ") + ".";
|
|
@@ -9,17 +9,13 @@ export var Realm;
|
|
|
9
9
|
Realm.toString = toString;
|
|
10
10
|
Realm.currency = {
|
|
11
11
|
test: "EUR",
|
|
12
|
-
upcheck: "EUR",
|
|
13
|
-
testUK: "GBP",
|
|
14
12
|
uk: "GBP",
|
|
15
13
|
eea: "EUR",
|
|
16
14
|
};
|
|
17
15
|
Realm.suppliers = {
|
|
18
16
|
test: ["paxgiro", "paxgiroCredit"],
|
|
19
|
-
testUK: ["clearbank"],
|
|
20
17
|
uk: ["clearbank"],
|
|
21
18
|
eea: [],
|
|
22
|
-
upcheck: ["paxgiro"],
|
|
23
19
|
};
|
|
24
20
|
let Supplier;
|
|
25
21
|
(function (Supplier) {
|
package/dist/Realm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Realm.js","sourceRoot":"../","sources":["Realm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAK3B,MAAM,KAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"Realm.js","sourceRoot":"../","sources":["Realm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAK3B,MAAM,KAAW,KAAK,CA2BrB;AA3BD,WAAiB,KAAK;IACR,YAAM,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAU,CAAA;IACvC,UAAI,GAAqB,IAAI,CAAC,MAAM,CAAC,MAAA,MAAM,CAAC,CAAA;IACzD,SAAgB,QAAQ;QACvB,OAAO,MAAA,MAAM,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,GAAG,CAAA;IACrD,CAAC;IAFe,cAAQ,WAEvB,CAAA;IACY,cAAQ,GAAkC;QACtD,IAAI,EAAE,KAAK;QACX,EAAE,EAAE,KAAK;QACT,GAAG,EAAE,KAAK;KACV,CAAA;IACY,eAAS,GAAmC;QACxD,IAAI,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC;QAClC,EAAE,EAAE,CAAC,WAAW,CAAC;QACjB,GAAG,EAAE,EAAE;KACP,CAAA;IAOD,IAAiB,QAAQ,CAIxB;IAJD,WAAiB,QAAQ;QACxB,SAAgB,EAAE,CAAC,KAAY,EAAE,QAA6B;YAC7D,OAAO,MAAA,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAC3C,CAAC;QAFe,WAAE,KAEjB,CAAA;IACF,CAAC,EAJgB,QAAQ,GAAR,cAAQ,KAAR,cAAQ,QAIxB;AACF,CAAC,EA3BgB,KAAK,KAAL,KAAK,QA2BrB"}
|
|
@@ -13,10 +13,7 @@ export var Statistics;
|
|
|
13
13
|
})(Region = Statistics.Region || (Statistics.Region = {}));
|
|
14
14
|
let Regional;
|
|
15
15
|
(function (Regional) {
|
|
16
|
-
Regional.type = isly.record(isly.string(Region.values), isly.object({
|
|
17
|
-
count: isly.number(),
|
|
18
|
-
amount: isly.number(),
|
|
19
|
-
}));
|
|
16
|
+
Regional.type = isly.record(isly.string(Region.values), isly.object({ count: isly.number(), amount: isly.number() }));
|
|
20
17
|
})(Regional = Statistics.Regional || (Statistics.Regional = {}));
|
|
21
18
|
Statistics.type = isly.object({
|
|
22
19
|
capture: Regional.type,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Statistics.js","sourceRoot":"../","sources":["Transaction/Statistics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAS/B,MAAM,KAAW,UAAU,
|
|
1
|
+
{"version":3,"file":"Statistics.js","sourceRoot":"../","sources":["Transaction/Statistics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAE,M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C,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QACzF,OAAO,YAAY,CAAA;IACpB,CAAC;IAVe,kBAAO,UAUtB,CAAA;AACF,CAAC,EA5EgB,UAAU,KAAV,UAAU,QA4E1B"}
|
package/dist/pax2pay.d.ts
CHANGED
package/dist/pax2pay.js
CHANGED
|
@@ -30,5 +30,6 @@ export { Supplier } from "./Supplier";
|
|
|
30
30
|
export { Transaction } from "./Transaction";
|
|
31
31
|
export { Treasury } from "./Treasury";
|
|
32
32
|
export { Warning } from "./Warning";
|
|
33
|
+
export { reports } from "./reports";
|
|
33
34
|
export { Quarter } from "./Quarter";
|
|
34
35
|
//# sourceMappingURL=pax2pay.js.map
|
package/dist/pax2pay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pax2pay.js","sourceRoot":"../","sources":["pax2pay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAA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,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["reports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAA;AAE5C,MAAM,KAAW,OAAO,CAEvB;AAFD,WAAiB,OAAO;IACT,YAAI,GAAG,WAAW,CAAA;AACjC,CAAC,EAFgB,OAAO,KAAP,OAAO,QAEvB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isoly } from "isoly";
|
|
2
|
+
import { Transaction } from "../../../Transaction";
|
|
3
|
+
import { Monthly } from "./Monthly";
|
|
4
|
+
import { Region } from "./Region";
|
|
5
|
+
type PerCountry = {
|
|
6
|
+
present?: Monthly;
|
|
7
|
+
notPresent?: Monthly;
|
|
8
|
+
};
|
|
9
|
+
export type Country = Partial<Record<isoly.CountryCode.Alpha2, PerCountry>>;
|
|
10
|
+
export declare namespace Country {
|
|
11
|
+
function toCsv(country: Country): string;
|
|
12
|
+
function csvLine(country: string, region: Region, data: PerCountry, presence: "present" | "notPresent", type: "count" | "volume"): string;
|
|
13
|
+
function update(country: Country, transaction: Transaction.CardTransaction): Country;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Iin } from "./Iin";
|
|
2
|
+
import { Monthly } from "./Monthly";
|
|
3
|
+
import { Region } from "./Region";
|
|
4
|
+
export var Country;
|
|
5
|
+
(function (Country) {
|
|
6
|
+
function toCsv(country) {
|
|
7
|
+
let result = "";
|
|
8
|
+
for (const [countryCode, perCountry] of Object.entries(country)) {
|
|
9
|
+
const region = Region.find(countryCode);
|
|
10
|
+
result += csvLine(countryCode, region, perCountry, "present", "count");
|
|
11
|
+
result += csvLine(countryCode, region, perCountry, "present", "volume");
|
|
12
|
+
result += csvLine(countryCode, region, perCountry, "notPresent", "count");
|
|
13
|
+
result += csvLine(countryCode, region, perCountry, "notPresent", "volume");
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
Country.toCsv = toCsv;
|
|
18
|
+
function csvLine(country, region, data, presence, type) {
|
|
19
|
+
let result = "";
|
|
20
|
+
if (data[presence])
|
|
21
|
+
for (const month of Monthly.Month.values) {
|
|
22
|
+
result += `Country ${country} - ${region} Card ${presence == "present" ? "Present" : "Not Present"} ${type == "count" ? "Count" : "Volume"} - Month ${month}`;
|
|
23
|
+
for (const iin of Iin.values)
|
|
24
|
+
result += `|${data[presence][month][type][iin] ?? 0}`;
|
|
25
|
+
result += "\n";
|
|
26
|
+
}
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
Country.csvLine = csvLine;
|
|
30
|
+
function update(country, transaction) {
|
|
31
|
+
const result = country;
|
|
32
|
+
result[transaction.counterpart.merchant.country] = updatePerCountry(result[transaction.counterpart.merchant.country] ?? {}, transaction);
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
Country.update = update;
|
|
36
|
+
function updatePerCountry(input, transaction) {
|
|
37
|
+
const result = input;
|
|
38
|
+
const key = transaction.counterpart.present === true ? "present" : "notPresent";
|
|
39
|
+
result[key] = Monthly.update(result[key], transaction);
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
})(Country || (Country = {}));
|
|
43
|
+
//# sourceMappingURL=Country.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Country.js","sourceRoot":"../","sources":["reports/visa/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ace Iin {
|
|
4
|
+
type Idx = typeof Idx.values[number];
|
|
5
|
+
namespace Idx {
|
|
6
|
+
const values: readonly ["45672555", "4567255", "45672557"];
|
|
7
|
+
const type: isly.Type<"45672555" | "4567255" | "45672557">;
|
|
8
|
+
}
|
|
9
|
+
const values: readonly ["45672555", "4567255", "45672557", "totalIdx", "44260108", "49359119", "45672554"];
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
export var Iin;
|
|
3
|
+
(function (Iin) {
|
|
4
|
+
let Idx;
|
|
5
|
+
(function (Idx) {
|
|
6
|
+
Idx.values = ["45672555", "4567255", "45672557"];
|
|
7
|
+
Idx.type = isly.string(Idx.values);
|
|
8
|
+
})(Idx = Iin.Idx || (Iin.Idx = {}));
|
|
9
|
+
Iin.values = [...Idx.values, "totalIdx", "44260108", "49359119", "45672554"];
|
|
10
|
+
})(Iin || (Iin = {}));
|
|
11
|
+
//# sourceMappingURL=Iin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Iin.js","sourceRoot":"../","sources":["reports/visa/Data/Iin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,MAAM,KAAW,GAAG,CAOnB;AAPD,WAAiB,GAAG;IAEnB,IAAiB,GAAG,CAGnB;IAHD,WAAiB,GAAG;QACN,UAAM,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAU,CAAA;QACrD,QAAI,GAAG,IAAI,CAAC,MAAM,CAAM,IAAA,MAAM,CAAC,CAAA;IAC7C,CAAC,EAHgB,GAAG,GAAH,OAAG,KAAH,OAAG,QAGnB;IACY,UAAM,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAU,CAAA;AAC/F,CAAC,EAPgB,GAAG,KAAH,GAAG,QAOnB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Transaction } from "../../../Transaction";
|
|
2
|
+
import { Iin } from "./Iin";
|
|
3
|
+
export type Monthly = Record<Monthly.Month, {
|
|
4
|
+
count: Partial<Record<Iin, number>>;
|
|
5
|
+
volume: Partial<Record<Iin, number>>;
|
|
6
|
+
}>;
|
|
7
|
+
export declare namespace Monthly {
|
|
8
|
+
type Month = typeof Month.values[number];
|
|
9
|
+
namespace Month {
|
|
10
|
+
const values: readonly [1, 2, 3];
|
|
11
|
+
}
|
|
12
|
+
function getMonth(transaction: Transaction.CardTransaction): Monthly.Month;
|
|
13
|
+
function update(previous: Monthly | undefined, transaction: Transaction.CardTransaction): Monthly;
|
|
14
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { isoly } from "isoly";
|
|
2
|
+
import { Iin } from "./Iin";
|
|
3
|
+
export var Monthly;
|
|
4
|
+
(function (Monthly) {
|
|
5
|
+
let Month;
|
|
6
|
+
(function (Month) {
|
|
7
|
+
Month.values = [1, 2, 3];
|
|
8
|
+
})(Month = Monthly.Month || (Monthly.Month = {}));
|
|
9
|
+
function getMonth(transaction) {
|
|
10
|
+
const month = isoly.DateTime.getMonth(transaction.transacted ?? transaction.posted);
|
|
11
|
+
return (((month - 1) % 3) + 1);
|
|
12
|
+
}
|
|
13
|
+
Monthly.getMonth = getMonth;
|
|
14
|
+
function update(previous, transaction) {
|
|
15
|
+
const result = previous ?? {
|
|
16
|
+
"1": { count: {}, volume: {} },
|
|
17
|
+
"2": { count: {}, volume: {} },
|
|
18
|
+
"3": { count: {}, volume: {} },
|
|
19
|
+
};
|
|
20
|
+
if (transaction.direction == "outbound" && transaction.status == "finalized") {
|
|
21
|
+
const month = getMonth(transaction);
|
|
22
|
+
result[month].count[transaction.account.iin] =
|
|
23
|
+
(result[month].count[transaction.account.iin] ?? 0) + 1;
|
|
24
|
+
result[month].volume[transaction.account.iin] = isoly.Currency.add("GBP", result[month].volume[transaction.account.iin] ?? 0, Math.abs(transaction.amount.original));
|
|
25
|
+
if (Iin.Idx.type.is(transaction.account.iin)) {
|
|
26
|
+
result[month].count["totalIdx"] = (result[month].count["totalIdx"] ?? 0) + 1;
|
|
27
|
+
result[month].volume["totalIdx"] = isoly.Currency.add("GBP", result[month].volume["totalIdx"] ?? 0, Math.abs(transaction.amount.original));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
Monthly.update = update;
|
|
33
|
+
})(Monthly || (Monthly = {}));
|
|
34
|
+
//# sourceMappingURL=Monthly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Monthly.js","sourceRoot":"../","sources":["reports/visa/Data/Monthly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAM3B,MAAM,KAAW,OAAO,CAoCvB;AApCD,WAAiB,OAAO;IAEvB,IAAiB,KAAK,CAErB;IAFD,WAAiB,KAAK;QACR,YAAM,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAA;IACzC,CAAC,EAFgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAErB;IAED,SAAgB,QAAQ,CAAC,WAAwC;QAChE,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,IAAI,WAAW,CAAC,MAAM,CAAC,CAAA;QACnF,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAkB,CAAA;IAChD,CAAC;IAHe,gBAAQ,WAGvB,CAAA;IACD,SAAgB,MAAM,CAAC,QAA6B,EAAE,WAAwC;QAC7F,MAAM,MAAM,GAAY,QAAQ,IAAI;YACnC,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC9B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,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,EACrC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CACrC,CAAA;YACF,CAAC;QACF,CAAC;QACD,OAAO,MAAM,CAAA;IACd,CAAC;IAzBe,cAAM,SAyBrB,CAAA;AACF,CAAC,EApCgB,OAAO,KAAP,OAAO,QAoCvB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Transaction } from "../../../Transaction";
|
|
2
|
+
import { rows } from "../rows";
|
|
3
|
+
import { Iin } from "./Iin";
|
|
4
|
+
export type NonMonthly = Record<"Total Number of Cards" | "Total Number of Active Cards" | "Total Number of Accounts" | "Number of Accounts - International Enabled" | "Payments Transactions Declined for Insufficient Funds - Number", Partial<Record<Iin, number>>>;
|
|
5
|
+
export declare namespace NonMonthly {
|
|
6
|
+
const empty: NonMonthly;
|
|
7
|
+
function update(previous: NonMonthly, transaction: Transaction.CardTransaction): NonMonthly;
|
|
8
|
+
function toCsvRow(data: NonMonthly, row: rows.NonZero): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Iin } from "./Iin";
|
|
2
|
+
export var NonMonthly;
|
|
3
|
+
(function (NonMonthly) {
|
|
4
|
+
NonMonthly.empty = {
|
|
5
|
+
"Number of Accounts - International Enabled": {},
|
|
6
|
+
"Payments Transactions Declined for Insufficient Funds - Number": {},
|
|
7
|
+
"Total Number of Accounts": {},
|
|
8
|
+
"Total Number of Active Cards": {},
|
|
9
|
+
"Total Number of Cards": {},
|
|
10
|
+
};
|
|
11
|
+
function update(previous, transaction) {
|
|
12
|
+
const result = previous;
|
|
13
|
+
if (Array.isArray(transaction.status) && transaction.status[1] == "insufficient funds")
|
|
14
|
+
result["Payments Transactions Declined for Insufficient Funds - Number"][transaction.account.iin] =
|
|
15
|
+
(result["Payments Transactions Declined for Insufficient Funds - Number"]?.[transaction.account.iin] ??
|
|
16
|
+
0) + 1;
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
NonMonthly.update = update;
|
|
20
|
+
function toCsvRow(data, row) {
|
|
21
|
+
let result = row;
|
|
22
|
+
for (const iin of Iin.values)
|
|
23
|
+
result += `|${data[row][iin] ?? 0}`;
|
|
24
|
+
result += "\n";
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
NonMonthly.toCsvRow = toCsvRow;
|
|
28
|
+
})(NonMonthly || (NonMonthly = {}));
|
|
29
|
+
//# sourceMappingURL=NonMonthly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NonMonthly.js","sourceRoot":"../","sources":["reports/visa/Data/NonMonthly.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAU3B,MAAM,KAAW,UAAU,CAuB1B;AAvBD,WAAiB,UAAU;IACb,gBAAK,GAAe;QAChC,4CAA4C,EAAE,EAAE;QAChD,gEAAgE,EAAE,EAAE;QACpE,0BAA0B,EAAE,EAAE;QAC9B,8BAA8B,EAAE,EAAE;QAClC,uBAAuB,EAAE,EAAE;KAC3B,CAAA;IACD,SAAgB,MAAM,CAAC,QAAoB,EAAE,WAAwC;QACpF,MAAM,MAAM,GAAG,QAAQ,CAAA;QACvB,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,oBAAoB;YACrF,MAAM,CAAC,gEAAgE,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,GAAU,CAAC;gBACvG,CAAC,MAAM,CAAC,gEAAgE,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,GAAU,CAAC;oBAC1G,CAAC,CAAC,GAAG,CAAC,CAAA;QACT,OAAO,MAAM,CAAA;IACd,CAAC;IAPe,iBAAM,SAOrB,CAAA;IACD,SAAgB,QAAQ,CAAC,IAAgB,EAAE,GAAiB;QAC3D,IA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