@pax2pay/model-banking 0.1.226 → 0.1.228
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/Account/index.ts +2 -2
- package/Rail/{Card.ts → Address/Card.ts} +4 -4
- package/Rail/Address/index.ts +101 -0
- package/Rail/index.ts +22 -87
- package/Transaction/Creatable.ts +2 -2
- package/Transaction/Incoming.ts +6 -3
- package/Transaction/Status.ts +1 -1
- package/Transaction/index.ts +7 -3
- package/Treasury/Account/Fetchable.ts +2 -2
- package/Treasury/Account/index.ts +2 -2
- package/Treasury/Transaction/Creatable.ts +2 -2
- package/Treasury/Transaction/index.ts +3 -3
- package/dist/Account/index.d.ts +1 -1
- package/dist/Account/index.js +1 -1
- package/dist/Account/index.js.map +1 -1
- package/dist/Rail/{Card.d.ts → Address/Card.d.ts} +4 -4
- package/dist/Rail/{Card.js → Address/Card.js} +3 -3
- package/dist/Rail/Address/Card.js.map +1 -0
- package/dist/Rail/Address/Iban.js.map +1 -0
- package/dist/Rail/Address/PaxGiro.js.map +1 -0
- package/dist/Rail/Address/Scan.js.map +1 -0
- package/dist/Rail/Address/index.d.ts +30 -0
- package/dist/Rail/Address/index.js +87 -0
- package/dist/Rail/Address/index.js.map +1 -0
- package/dist/Rail/Address/internal.js.map +1 -0
- package/dist/Rail/index.d.ts +23 -26
- package/dist/Rail/index.js +14 -81
- package/dist/Rail/index.js.map +1 -1
- package/dist/Transaction/Creatable.d.ts +1 -1
- package/dist/Transaction/Creatable.js +1 -1
- package/dist/Transaction/Creatable.js.map +1 -1
- package/dist/Transaction/Incoming.d.ts +3 -2
- package/dist/Transaction/Incoming.js +3 -1
- package/dist/Transaction/Incoming.js.map +1 -1
- package/dist/Transaction/Status.d.ts +3 -3
- package/dist/Transaction/Status.js +1 -1
- package/dist/Transaction/Status.js.map +1 -1
- package/dist/Transaction/index.d.ts +3 -2
- package/dist/Transaction/index.js +4 -2
- package/dist/Transaction/index.js.map +1 -1
- package/dist/Treasury/Account/Fetchable.d.ts +1 -1
- package/dist/Treasury/Account/Fetchable.js +1 -1
- package/dist/Treasury/Account/Fetchable.js.map +1 -1
- package/dist/Treasury/Account/index.d.ts +1 -1
- package/dist/Treasury/Account/index.js +1 -1
- package/dist/Treasury/Account/index.js.map +1 -1
- package/dist/Treasury/Transaction/Creatable.d.ts +1 -1
- package/dist/Treasury/Transaction/Creatable.js +1 -1
- package/dist/Treasury/Transaction/Creatable.js.map +1 -1
- package/dist/Treasury/Transaction/index.d.ts +2 -2
- package/dist/Treasury/Transaction/index.js +1 -1
- package/dist/Treasury/Transaction/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/Rail/Card.js.map +0 -1
- package/dist/Rail/Iban.js.map +0 -1
- package/dist/Rail/PaxGiro.js.map +0 -1
- package/dist/Rail/Scan.js.map +0 -1
- package/dist/Rail/internal.js.map +0 -1
- /package/Rail/{Iban.ts → Address/Iban.ts} +0 -0
- /package/Rail/{PaxGiro.ts → Address/PaxGiro.ts} +0 -0
- /package/Rail/{Scan.ts → Address/Scan.ts} +0 -0
- /package/Rail/{internal.ts → Address/internal.ts} +0 -0
- /package/dist/Rail/{Iban.d.ts → Address/Iban.d.ts} +0 -0
- /package/dist/Rail/{Iban.js → Address/Iban.js} +0 -0
- /package/dist/Rail/{PaxGiro.d.ts → Address/PaxGiro.d.ts} +0 -0
- /package/dist/Rail/{PaxGiro.js → Address/PaxGiro.js} +0 -0
- /package/dist/Rail/{Scan.d.ts → Address/Scan.d.ts} +0 -0
- /package/dist/Rail/{Scan.js → Address/Scan.js} +0 -0
- /package/dist/Rail/{internal.d.ts → Address/internal.d.ts} +0 -0
- /package/dist/Rail/{internal.js → Address/internal.js} +0 -0
package/Account/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface Account extends Account.Creatable {
|
|
|
9
9
|
readonly id: cryptly.Identifier
|
|
10
10
|
readonly created: isoly.DateTime
|
|
11
11
|
readonly balances: Balances
|
|
12
|
-
readonly rails: Rail[]
|
|
12
|
+
readonly rails: Rail.Address[]
|
|
13
13
|
//readonly rules: Rule[]
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ export namespace Account {
|
|
|
19
19
|
id: isly.string(),
|
|
20
20
|
created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
|
|
21
21
|
balances: isly.fromIs("Balances", Balances.is),
|
|
22
|
-
rails: isly.fromIs("Rail", Rail.is).array(),
|
|
22
|
+
rails: isly.fromIs("Rail.Address", Rail.Address.is).array(),
|
|
23
23
|
})
|
|
24
24
|
export const is = type.is
|
|
25
25
|
export const flaw = type.flaw
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
-
import { Acquirer } from "
|
|
3
|
-
import { Card as ModelCard } from "
|
|
4
|
-
import { Merchant } from "
|
|
5
|
-
import { Rule } from "
|
|
2
|
+
import { Acquirer } from "../../Acquirer"
|
|
3
|
+
import { Card as ModelCard } from "../../Card"
|
|
4
|
+
import { Merchant } from "../../Merchant"
|
|
5
|
+
import { Rule } from "../../Rule"
|
|
6
6
|
|
|
7
7
|
export interface Card {
|
|
8
8
|
type: "card"
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
import { Card as AddressCard } from "./Card"
|
|
3
|
+
import { Iban as AddressIban } from "./Iban"
|
|
4
|
+
import { Internal as AddressInternal } from "./internal"
|
|
5
|
+
import { PaxGiro as AddressPaxGiro } from "./PaxGiro"
|
|
6
|
+
import { Scan as AddressScan } from "./Scan"
|
|
7
|
+
|
|
8
|
+
export type Address =
|
|
9
|
+
| AddressPaxGiro
|
|
10
|
+
| AddressInternal
|
|
11
|
+
| AddressIban
|
|
12
|
+
| AddressScan
|
|
13
|
+
| AddressCard
|
|
14
|
+
| AddressCard.Counterpart
|
|
15
|
+
export namespace Address {
|
|
16
|
+
export const types = ["paxgiro", "internal", "iban", "scan", "card"] as const
|
|
17
|
+
export type Type = typeof types[number]
|
|
18
|
+
export const type = isly.string(types)
|
|
19
|
+
export function compare(addresses: [Address, Address]): boolean {
|
|
20
|
+
return Object.entries(addresses[0]).every(
|
|
21
|
+
([key, value]: [keyof Address, Address[keyof Address]]) => value == addresses[1][key]
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
export function parse(value: string): Address | undefined {
|
|
25
|
+
let result: Address | undefined
|
|
26
|
+
const splitted = value.split("-")
|
|
27
|
+
switch (splitted[0]) {
|
|
28
|
+
case "pxg":
|
|
29
|
+
result = splitted.length == 2 ? { type: "paxgiro", identifier: splitted[1] } : undefined
|
|
30
|
+
break
|
|
31
|
+
}
|
|
32
|
+
return result
|
|
33
|
+
}
|
|
34
|
+
export function stringify(Address: Address): string {
|
|
35
|
+
let result: string
|
|
36
|
+
switch (Address.type) {
|
|
37
|
+
case "iban":
|
|
38
|
+
result = `iban-${Address.iban}`
|
|
39
|
+
break
|
|
40
|
+
case "paxgiro":
|
|
41
|
+
result = `pxg-${Address.identifier}`
|
|
42
|
+
break
|
|
43
|
+
case "internal":
|
|
44
|
+
result = `internal-${Address.identifier}`
|
|
45
|
+
break
|
|
46
|
+
case "scan":
|
|
47
|
+
result = `scan-${Address.sort}-${Address.account}`
|
|
48
|
+
break
|
|
49
|
+
case "card":
|
|
50
|
+
result = "id" in Address ? `${Address.type}-${Address.id}` : `${Address.type}-merchant-${Address.merchant.id}`
|
|
51
|
+
break
|
|
52
|
+
}
|
|
53
|
+
return result
|
|
54
|
+
}
|
|
55
|
+
export function beautify(Address: Address): string {
|
|
56
|
+
let result: string
|
|
57
|
+
switch (Address.type) {
|
|
58
|
+
case "iban":
|
|
59
|
+
result = `${Address.iban}`
|
|
60
|
+
break
|
|
61
|
+
case "paxgiro":
|
|
62
|
+
result = `${Address.identifier}`
|
|
63
|
+
break
|
|
64
|
+
case "internal":
|
|
65
|
+
result = `${Address.identifier}`
|
|
66
|
+
break
|
|
67
|
+
case "scan":
|
|
68
|
+
result = `${Address.sort} ${Address.account}`
|
|
69
|
+
break
|
|
70
|
+
case "card":
|
|
71
|
+
result = "id" in Address ? `${Address.type}-${Address.id}` : `${Address.type}-merchant-${Address.merchant.id}`
|
|
72
|
+
break
|
|
73
|
+
}
|
|
74
|
+
return result
|
|
75
|
+
}
|
|
76
|
+
export function is(value: Address | any): value is Address {
|
|
77
|
+
return (
|
|
78
|
+
value &&
|
|
79
|
+
typeof value == "object" &&
|
|
80
|
+
(PaxGiro.is(value) ||
|
|
81
|
+
Iban.is(value) ||
|
|
82
|
+
Internal.is(value) ||
|
|
83
|
+
Scan.is(value) ||
|
|
84
|
+
Card.is(value) ||
|
|
85
|
+
Card.Counterpart.type.is(value))
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
export type PaxGiro = AddressPaxGiro
|
|
89
|
+
export const PaxGiro = AddressPaxGiro
|
|
90
|
+
export type Iban = AddressIban
|
|
91
|
+
export const Iban = AddressIban
|
|
92
|
+
export type Scan = AddressScan
|
|
93
|
+
export const Scan = AddressScan
|
|
94
|
+
export type Internal = AddressInternal
|
|
95
|
+
export const Internal = AddressInternal
|
|
96
|
+
export type Card = AddressCard
|
|
97
|
+
export const Card = AddressCard
|
|
98
|
+
export namespace Card {
|
|
99
|
+
export type Counterpart = AddressCard.Counterpart
|
|
100
|
+
}
|
|
101
|
+
}
|
package/Rail/index.ts
CHANGED
|
@@ -1,93 +1,28 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
-
import {
|
|
3
|
-
import { Iban as RailIban } from "./Iban"
|
|
4
|
-
import { Internal as RailInternal } from "./internal"
|
|
5
|
-
import { PaxGiro as RailPaxGiro } from "./PaxGiro"
|
|
6
|
-
import { Scan as RailScan } from "./Scan"
|
|
2
|
+
import { Address as RailAddress } from "./Address"
|
|
7
3
|
|
|
8
|
-
export type Rail =
|
|
4
|
+
export type Rail = typeof Rail.rails[number]
|
|
9
5
|
export namespace Rail {
|
|
10
|
-
export const rails = ["paxgiro", "
|
|
11
|
-
export type
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
result = `iban-${rail.iban}`
|
|
31
|
-
break
|
|
32
|
-
case "paxgiro":
|
|
33
|
-
result = `pxg-${rail.identifier}`
|
|
34
|
-
break
|
|
35
|
-
case "internal":
|
|
36
|
-
result = `internal-${rail.identifier}`
|
|
37
|
-
break
|
|
38
|
-
case "scan":
|
|
39
|
-
result = `scan-${rail.sort}-${rail.account}`
|
|
40
|
-
break
|
|
41
|
-
case "card":
|
|
42
|
-
result = "id" in rail ? `${rail.type}-${rail.id}` : `${rail.type}-merchant-${rail.merchant.id}`
|
|
43
|
-
break
|
|
6
|
+
export const rails = ["internal", "paxgiro", "mastercard", "fasterpayments", "chaps", "bacs", "transfer"] as const
|
|
7
|
+
export const type = isly.string<Rail>(rails)
|
|
8
|
+
export type Address = RailAddress
|
|
9
|
+
export namespace Address {
|
|
10
|
+
export const is = RailAddress.is
|
|
11
|
+
export const compare = RailAddress.compare
|
|
12
|
+
export const stringify = RailAddress.stringify
|
|
13
|
+
export const beautify = RailAddress.beautify
|
|
14
|
+
export type PaxGiro = RailAddress.PaxGiro
|
|
15
|
+
export const PaxGiro = RailAddress.PaxGiro
|
|
16
|
+
export type Iban = RailAddress.Iban
|
|
17
|
+
export const Iban = RailAddress.Iban
|
|
18
|
+
export type Scan = RailAddress.Scan
|
|
19
|
+
export const Scan = RailAddress.Scan
|
|
20
|
+
export type Internal = RailAddress.Internal
|
|
21
|
+
export const Internal = RailAddress.Internal
|
|
22
|
+
export type Card = RailAddress.Card
|
|
23
|
+
export const Card = RailAddress.Card
|
|
24
|
+
export namespace Card {
|
|
25
|
+
export type Counterpart = RailAddress.Card.Counterpart
|
|
44
26
|
}
|
|
45
|
-
return result
|
|
46
|
-
}
|
|
47
|
-
export function beautify(rail: Rail): string {
|
|
48
|
-
let result: string
|
|
49
|
-
switch (rail.type) {
|
|
50
|
-
case "iban":
|
|
51
|
-
result = `${rail.iban}`
|
|
52
|
-
break
|
|
53
|
-
case "paxgiro":
|
|
54
|
-
result = `${rail.identifier}`
|
|
55
|
-
break
|
|
56
|
-
case "internal":
|
|
57
|
-
result = `${rail.identifier}`
|
|
58
|
-
break
|
|
59
|
-
case "scan":
|
|
60
|
-
result = `${rail.sort} ${rail.account}`
|
|
61
|
-
break
|
|
62
|
-
case "card":
|
|
63
|
-
result = "id" in rail ? `${rail.type}-${rail.id}` : `${rail.type}-merchant-${rail.merchant.id}`
|
|
64
|
-
break
|
|
65
|
-
}
|
|
66
|
-
return result
|
|
67
|
-
}
|
|
68
|
-
export function is(value: Rail | any): value is Rail {
|
|
69
|
-
return (
|
|
70
|
-
value &&
|
|
71
|
-
typeof value == "object" &&
|
|
72
|
-
(PaxGiro.is(value) ||
|
|
73
|
-
Iban.is(value) ||
|
|
74
|
-
Internal.is(value) ||
|
|
75
|
-
Scan.is(value) ||
|
|
76
|
-
Card.is(value) ||
|
|
77
|
-
Card.Counterpart.type.is(value))
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
export type PaxGiro = RailPaxGiro
|
|
81
|
-
export const PaxGiro = RailPaxGiro
|
|
82
|
-
export type Iban = RailIban
|
|
83
|
-
export const Iban = RailIban
|
|
84
|
-
export type Scan = RailScan
|
|
85
|
-
export const Scan = RailScan
|
|
86
|
-
export type Internal = RailInternal
|
|
87
|
-
export const Internal = RailInternal
|
|
88
|
-
export type Card = RailCard
|
|
89
|
-
export const Card = RailCard
|
|
90
|
-
export namespace Card {
|
|
91
|
-
export type Counterpart = RailCard.Counterpart
|
|
92
27
|
}
|
|
93
28
|
}
|
package/Transaction/Creatable.ts
CHANGED
|
@@ -3,14 +3,14 @@ import { isly } from "isly"
|
|
|
3
3
|
import { Rail } from "../Rail"
|
|
4
4
|
|
|
5
5
|
export interface Creatable {
|
|
6
|
-
counterpart: Rail
|
|
6
|
+
counterpart: Rail.Address
|
|
7
7
|
currency: isoly.Currency
|
|
8
8
|
amount: number
|
|
9
9
|
description: string
|
|
10
10
|
}
|
|
11
11
|
export namespace Creatable {
|
|
12
12
|
export const type = isly.object<Creatable>({
|
|
13
|
-
counterpart: isly.fromIs("Rail", Rail.is),
|
|
13
|
+
counterpart: isly.fromIs("Rail.Address", Rail.Address.is),
|
|
14
14
|
currency: isly.fromIs("isoly.Currency", isoly.Currency.is),
|
|
15
15
|
amount: isly.number(),
|
|
16
16
|
description: isly.string(),
|
package/Transaction/Incoming.ts
CHANGED
|
@@ -6,19 +6,21 @@ import { Creatable as TransactionCreatable } from "./Creatable"
|
|
|
6
6
|
import { Reference as TransactionReference } from "./Reference"
|
|
7
7
|
|
|
8
8
|
export interface Incoming extends TransactionCreatable {
|
|
9
|
-
account: Rail
|
|
9
|
+
account: Rail.Address
|
|
10
10
|
posted: string
|
|
11
|
+
rail?: Rail
|
|
11
12
|
reference?: TransactionReference
|
|
12
13
|
}
|
|
13
14
|
export namespace Incoming {
|
|
14
15
|
export const type = TransactionCreatable.type.extend<Incoming>({
|
|
15
|
-
account: isly.fromIs("Rail", Rail.is),
|
|
16
|
+
account: isly.fromIs("Rail.Address", Rail.Address.is),
|
|
16
17
|
posted: isly.string(),
|
|
18
|
+
rail: Rail.type.optional(),
|
|
17
19
|
reference: TransactionReference.type.optional(),
|
|
18
20
|
})
|
|
19
21
|
export const is = type.is
|
|
20
22
|
export const flaw = type.flaw
|
|
21
|
-
export function fromRefund(entry: Settlement.Entry.Refund.Creatable, card: Rail.Card): Incoming {
|
|
23
|
+
export function fromRefund(entry: Settlement.Entry.Refund.Creatable, card: Rail.Address.Card): Incoming {
|
|
22
24
|
const [currency, amount] = entry.amount
|
|
23
25
|
return {
|
|
24
26
|
account: card,
|
|
@@ -27,6 +29,7 @@ export namespace Incoming {
|
|
|
27
29
|
posted: isoly.DateTime.now(),
|
|
28
30
|
counterpart: { type: "card", merchant: entry.merchant, acquirer: entry.acquirer },
|
|
29
31
|
description: "Refund transaction.",
|
|
32
|
+
rail: card.scheme,
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
}
|
package/Transaction/Status.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { isly } from "isly"
|
|
|
2
2
|
|
|
3
3
|
export type Status = typeof Status.values[number]
|
|
4
4
|
export namespace Status {
|
|
5
|
-
export const values = ["created", "approved", "rejected", "processing", "finalized"] as const
|
|
5
|
+
export const values = ["created", "approved", "rejected", "processing", "finalized", "cancelled"] as const
|
|
6
6
|
export const type = isly.string(values)
|
|
7
7
|
export const is = type.is
|
|
8
8
|
export const flaw = type.flaw
|
package/Transaction/index.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { Status as TransactionStatus } from "./Status"
|
|
|
14
14
|
export interface Transaction extends Transaction.Creatable {
|
|
15
15
|
organization: string
|
|
16
16
|
accountId: string
|
|
17
|
-
account: Rail
|
|
17
|
+
account: Rail.Address
|
|
18
18
|
readonly id: cryptly.Identifier
|
|
19
19
|
readonly reference?: Transaction.Reference
|
|
20
20
|
readonly posted: isoly.DateTime
|
|
@@ -22,6 +22,7 @@ export interface Transaction extends Transaction.Creatable {
|
|
|
22
22
|
balance: number
|
|
23
23
|
operations: Operation[]
|
|
24
24
|
status: Transaction.Status
|
|
25
|
+
rail?: Rail
|
|
25
26
|
flags: ("review" | string)[]
|
|
26
27
|
oldFlags: string[]
|
|
27
28
|
notes: Transaction.Note[]
|
|
@@ -48,7 +49,7 @@ export namespace Transaction {
|
|
|
48
49
|
export const type = Creatable.type.extend<Transaction>({
|
|
49
50
|
organization: isly.string(),
|
|
50
51
|
accountId: isly.string(),
|
|
51
|
-
account: isly.fromIs("Rail", Rail.is),
|
|
52
|
+
account: isly.fromIs("Rail", Rail.Address.is),
|
|
52
53
|
id: isly.fromIs("cryptly.Identifier", cryptly.Identifier.is).readonly(),
|
|
53
54
|
reference: Reference.type.readonly().optional(),
|
|
54
55
|
posted: isly.string(),
|
|
@@ -56,6 +57,7 @@ export namespace Transaction {
|
|
|
56
57
|
balance: isly.number(),
|
|
57
58
|
operations: Operation.type.array(),
|
|
58
59
|
status: Status.type,
|
|
60
|
+
rail: Rail.type.optional(),
|
|
59
61
|
flags: isly.array(isly.string() || "review"),
|
|
60
62
|
oldFlags: isly.string().array(),
|
|
61
63
|
notes: Note.type.array(),
|
|
@@ -66,7 +68,8 @@ export namespace Transaction {
|
|
|
66
68
|
export function fromCreatable(
|
|
67
69
|
organization: string,
|
|
68
70
|
accountId: string,
|
|
69
|
-
account: Rail,
|
|
71
|
+
account: Rail.Address,
|
|
72
|
+
rail: Rail,
|
|
70
73
|
transaction: Creatable,
|
|
71
74
|
operations: Operation.Creatable[],
|
|
72
75
|
balance: number
|
|
@@ -82,6 +85,7 @@ export namespace Transaction {
|
|
|
82
85
|
balance,
|
|
83
86
|
operations: operations.map(o => Operation.fromCreatable(id, o)),
|
|
84
87
|
status: "created",
|
|
88
|
+
rail,
|
|
85
89
|
flags: [],
|
|
86
90
|
oldFlags: [],
|
|
87
91
|
notes: [],
|
|
@@ -11,7 +11,7 @@ export interface Fetchable {
|
|
|
11
11
|
reference: string
|
|
12
12
|
currencies: isoly.Currency[]
|
|
13
13
|
type: Category
|
|
14
|
-
rail: Rail[]
|
|
14
|
+
rail: Rail.Address[]
|
|
15
15
|
balance: Balance
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -22,7 +22,7 @@ export namespace Fetchable {
|
|
|
22
22
|
reference: isly.string(),
|
|
23
23
|
currencies: isly.fromIs("Account.Fetchable.currencies", isoly.Currency.is).array(),
|
|
24
24
|
type: Category.type,
|
|
25
|
-
rail: isly.fromIs("Account.Fetchable.rail", Rail.is).array(),
|
|
25
|
+
rail: isly.fromIs("Account.Fetchable.rail", Rail.Address.is).array(),
|
|
26
26
|
balance: isly.fromIs("Account.Fetchable.rail", Balance.is),
|
|
27
27
|
})
|
|
28
28
|
export const is = type.is
|
|
@@ -21,7 +21,7 @@ export interface Account {
|
|
|
21
21
|
currencies: isoly.Currency[]
|
|
22
22
|
type: AccountCategory
|
|
23
23
|
conditions?: { minimum?: Balance }
|
|
24
|
-
rail: Rail[]
|
|
24
|
+
rail: Rail.Address[]
|
|
25
25
|
balance: Balance
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -36,7 +36,7 @@ export namespace Account {
|
|
|
36
36
|
currencies: isly.fromIs("Treasury.Account.currencies", isoly.Currency.is).array(),
|
|
37
37
|
type: AccountCategory.type,
|
|
38
38
|
conditions: AccountConditions.type,
|
|
39
|
-
rail: isly.fromIs("Treasury.Account.rail", Rail.is).array(),
|
|
39
|
+
rail: isly.fromIs("Treasury.Account.rail", Rail.Address.is).array(),
|
|
40
40
|
balance: isly.fromIs("Treasury.Account.balance", Balance.is),
|
|
41
41
|
})
|
|
42
42
|
export const is = type.is
|
|
@@ -2,7 +2,7 @@ import * as isoly from "isoly"
|
|
|
2
2
|
import { Rail } from "../../Rail"
|
|
3
3
|
|
|
4
4
|
export interface Creatable {
|
|
5
|
-
creditor: Rail
|
|
5
|
+
creditor: Rail.Address
|
|
6
6
|
currency: isoly.Currency
|
|
7
7
|
amount: number
|
|
8
8
|
description: string
|
|
@@ -14,7 +14,7 @@ export namespace Creatable {
|
|
|
14
14
|
value &&
|
|
15
15
|
typeof value == "object" &&
|
|
16
16
|
value.creditor &&
|
|
17
|
-
Rail.is(value.creditor) &&
|
|
17
|
+
Rail.Address.is(value.creditor) &&
|
|
18
18
|
isoly.Currency.is(value.currency) &&
|
|
19
19
|
typeof value.amount == "number" &&
|
|
20
20
|
typeof value.description == "string"
|
|
@@ -4,7 +4,7 @@ import { Rail } from "../../Rail"
|
|
|
4
4
|
import { Creatable as TransactionCreatable } from "./Creatable"
|
|
5
5
|
|
|
6
6
|
export interface Transaction extends TransactionCreatable {
|
|
7
|
-
debtor: Rail
|
|
7
|
+
debtor: Rail.Address
|
|
8
8
|
readonly id: cryptly.Identifier
|
|
9
9
|
readonly created: isoly.DateTime
|
|
10
10
|
}
|
|
@@ -13,13 +13,13 @@ export namespace Transaction {
|
|
|
13
13
|
return (
|
|
14
14
|
value &&
|
|
15
15
|
typeof value == "object" &&
|
|
16
|
-
Rail.is(value.debtor) &&
|
|
16
|
+
Rail.Address.is(value.debtor) &&
|
|
17
17
|
cryptly.Identifier.is(value.id) &&
|
|
18
18
|
isoly.DateTime.is(value.created) &&
|
|
19
19
|
Creatable.is({ ...value })
|
|
20
20
|
)
|
|
21
21
|
}
|
|
22
|
-
export function fromCreatable(transaction: TransactionCreatable, debtor: Rail): Transaction {
|
|
22
|
+
export function fromCreatable(transaction: TransactionCreatable, debtor: Rail.Address): Transaction {
|
|
23
23
|
return {
|
|
24
24
|
debtor,
|
|
25
25
|
id: cryptly.Identifier.generate(8),
|
package/dist/Account/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface Account extends Account.Creatable {
|
|
|
8
8
|
readonly id: cryptly.Identifier;
|
|
9
9
|
readonly created: isoly.DateTime;
|
|
10
10
|
readonly balances: Balances;
|
|
11
|
-
readonly rails: Rail[];
|
|
11
|
+
readonly rails: Rail.Address[];
|
|
12
12
|
}
|
|
13
13
|
export declare namespace Account {
|
|
14
14
|
const type: isly.object.ExtendableType<Account>;
|
package/dist/Account/index.js
CHANGED
|
@@ -11,7 +11,7 @@ export var Account;
|
|
|
11
11
|
id: isly.string(),
|
|
12
12
|
created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
|
|
13
13
|
balances: isly.fromIs("Balances", Balances.is),
|
|
14
|
-
rails: isly.fromIs("Rail", Rail.is).array(),
|
|
14
|
+
rails: isly.fromIs("Rail.Address", Rail.Address.is).array(),
|
|
15
15
|
});
|
|
16
16
|
Account.is = Account.type.is;
|
|
17
17
|
Account.flaw = Account.type.flaw;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources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AC,MAAM,EAAE;QACnB,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;QACjB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzD,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC9C,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE;KAC3D,CAAC,CAAA;IACW,UAAE,GAAG,QAAA,IAAI,CAAC,EAAE,CAAA;IACZ,YAAI,GAAG,QAAA,IAAI,CAAC,IAAI,CAAA;IAC7B,SAAgB,YAAY,CAAC,KAA+B;QAC3D,OAAO,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IACvC,CAAC;IAFe,oBAAY,eAE3B,CAAA;IAGY,iBAAS,GAAG,gBAAgB,CAAA;AAC1C,CAAC,EAhBgB,OAAO,KAAP,OAAO,QAgBvB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
-
import { Acquirer } from "
|
|
3
|
-
import { Card as ModelCard } from "
|
|
4
|
-
import { Merchant } from "
|
|
5
|
-
import { Rule } from "
|
|
2
|
+
import { Acquirer } from "../../Acquirer";
|
|
3
|
+
import { Card as ModelCard } from "../../Card";
|
|
4
|
+
import { Merchant } from "../../Merchant";
|
|
5
|
+
import { Rule } from "../../Rule";
|
|
6
6
|
export interface Card {
|
|
7
7
|
type: "card";
|
|
8
8
|
scheme: ModelCard.Scheme;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
-
import { Acquirer } from "
|
|
3
|
-
import { Card as ModelCard } from "
|
|
4
|
-
import { Merchant } from "
|
|
2
|
+
import { Acquirer } from "../../Acquirer";
|
|
3
|
+
import { Card as ModelCard } from "../../Card";
|
|
4
|
+
import { Merchant } from "../../Merchant";
|
|
5
5
|
var CardCounterpart;
|
|
6
6
|
(function (CardCounterpart) {
|
|
7
7
|
CardCounterpart.type = isly.object({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"../","sources":["Rail/Address/Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAiBzC,IAAU,eAAe,CAMxB;AAND,WAAU,eAAe;IACX,oBAAI,GAAG,IAAI,CAAC,MAAM,CAAkB;QAChD,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QACzB,QAAQ,EAAE,QAAQ,CAAC,IAAI;QACvB,QAAQ,EAAE,QAAQ,CAAC,IAAI;KACvB,CAAC,CAAA;AACH,CAAC,EANS,eAAe,KAAf,eAAe,QAMxB;AACD,MAAM,KAAW,IAAI,CA0BpB;AA1BD,WAAiB,IAAI;IACP,eAAU,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAU,CAAA;IAClD,SAAI,GAAG,IAAI,CAAC,MAAM,CAAO;QACrC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QACzB,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI;QAC7B,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;QACjB,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;QACpB,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI;QAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;KACrB,CAAC,CAAA;IACW,OAAE,GAAG,KAAA,IAAI,CAAC,EAAE,CAAA;IACZ,SAAI,GAAG,KAAA,IAAI,CAAC,IAAI,CAAA;IAC7B,SAAgB,IAAI,CAAC,IAAiC;QACrD,OAAO;YACN,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG;YACrB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;YACzB,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;YAC3B,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;SAC3B,CAAA;IACF,CAAC;IAVe,SAAI,OAUnB,CAAA;IACY,gBAAW,GAAG,eAAe,CAAA;AAE3C,CAAC,EA1BgB,IAAI,KAAJ,IAAI,QA0BpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Iban.js","sourceRoot":"../","sources":["Rail/Address/Iban.ts"],"names":[],"mappings":"AAKA,MAAM,KAAW,IAAI,CAYpB;AAZD,WAAiB,IAAI;IACP,eAAU,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAU,CAAA;IAE/D,SAAgB,EAAE,CAAC,KAAiB;QACnC,OAAO,CACN,KAAK;YACL,OAAO,KAAK,IAAI,QAAQ;YACxB,KAAK,CAAC,IAAI,IAAI,MAAM;YACpB,OAAO,KAAK,CAAC,IAAI,IAAI,QAAQ;YAC7B,OAAO,KAAK,CAAC,MAAM,IAAI,QAAQ,CAC/B,CAAA;IACF,CAAC;IARe,OAAE,KAQjB,CAAA;AACF,CAAC,EAZgB,IAAI,KAAJ,IAAI,QAYpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaxGiro.js","sourceRoot":"../","sources":["Rail/Address/PaxGiro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO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E,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAA;IACjH,CAAC;IAFe,aAAQ,WAEvB,CAAA;AACF,CAAC,EAjBgB,IAAI,KAAJ,IAAI,QAiBpB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
import { Card as AddressCard } from "./Card";
|
|
3
|
+
import { Iban as AddressIban } from "./Iban";
|
|
4
|
+
import { Internal as AddressInternal } from "./internal";
|
|
5
|
+
import { PaxGiro as AddressPaxGiro } from "./PaxGiro";
|
|
6
|
+
import { Scan as AddressScan } from "./Scan";
|
|
7
|
+
export type Address = AddressPaxGiro | AddressInternal | AddressIban | AddressScan | AddressCard | AddressCard.Counterpart;
|
|
8
|
+
export declare namespace Address {
|
|
9
|
+
const types: readonly ["paxgiro", "internal", "iban", "scan", "card"];
|
|
10
|
+
type Type = typeof types[number];
|
|
11
|
+
const type: isly.Type<"paxgiro" | "internal" | "iban" | "scan" | "card">;
|
|
12
|
+
function compare(addresses: [Address, Address]): boolean;
|
|
13
|
+
function parse(value: string): Address | undefined;
|
|
14
|
+
function stringify(Address: Address): string;
|
|
15
|
+
function beautify(Address: Address): string;
|
|
16
|
+
function is(value: Address | any): value is Address;
|
|
17
|
+
type PaxGiro = AddressPaxGiro;
|
|
18
|
+
const PaxGiro: typeof AddressPaxGiro;
|
|
19
|
+
type Iban = AddressIban;
|
|
20
|
+
const Iban: typeof AddressIban;
|
|
21
|
+
type Scan = AddressScan;
|
|
22
|
+
const Scan: typeof AddressScan;
|
|
23
|
+
type Internal = AddressInternal;
|
|
24
|
+
const Internal: typeof AddressInternal;
|
|
25
|
+
type Card = AddressCard;
|
|
26
|
+
const Card: typeof AddressCard;
|
|
27
|
+
namespace Card {
|
|
28
|
+
type Counterpart = AddressCard.Counterpart;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
import { Card as AddressCard } from "./Card";
|
|
3
|
+
import { Iban as AddressIban } from "./Iban";
|
|
4
|
+
import { Internal as AddressInternal } from "./internal";
|
|
5
|
+
import { PaxGiro as AddressPaxGiro } from "./PaxGiro";
|
|
6
|
+
import { Scan as AddressScan } from "./Scan";
|
|
7
|
+
export var Address;
|
|
8
|
+
(function (Address_1) {
|
|
9
|
+
Address_1.types = ["paxgiro", "internal", "iban", "scan", "card"];
|
|
10
|
+
Address_1.type = isly.string(Address_1.types);
|
|
11
|
+
function compare(addresses) {
|
|
12
|
+
return Object.entries(addresses[0]).every(([key, value]) => value == addresses[1][key]);
|
|
13
|
+
}
|
|
14
|
+
Address_1.compare = compare;
|
|
15
|
+
function parse(value) {
|
|
16
|
+
let result;
|
|
17
|
+
const splitted = value.split("-");
|
|
18
|
+
switch (splitted[0]) {
|
|
19
|
+
case "pxg":
|
|
20
|
+
result = splitted.length == 2 ? { type: "paxgiro", identifier: splitted[1] } : undefined;
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
Address_1.parse = parse;
|
|
26
|
+
function stringify(Address) {
|
|
27
|
+
let result;
|
|
28
|
+
switch (Address.type) {
|
|
29
|
+
case "iban":
|
|
30
|
+
result = `iban-${Address.iban}`;
|
|
31
|
+
break;
|
|
32
|
+
case "paxgiro":
|
|
33
|
+
result = `pxg-${Address.identifier}`;
|
|
34
|
+
break;
|
|
35
|
+
case "internal":
|
|
36
|
+
result = `internal-${Address.identifier}`;
|
|
37
|
+
break;
|
|
38
|
+
case "scan":
|
|
39
|
+
result = `scan-${Address.sort}-${Address.account}`;
|
|
40
|
+
break;
|
|
41
|
+
case "card":
|
|
42
|
+
result = "id" in Address ? `${Address.type}-${Address.id}` : `${Address.type}-merchant-${Address.merchant.id}`;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
Address_1.stringify = stringify;
|
|
48
|
+
function beautify(Address) {
|
|
49
|
+
let result;
|
|
50
|
+
switch (Address.type) {
|
|
51
|
+
case "iban":
|
|
52
|
+
result = `${Address.iban}`;
|
|
53
|
+
break;
|
|
54
|
+
case "paxgiro":
|
|
55
|
+
result = `${Address.identifier}`;
|
|
56
|
+
break;
|
|
57
|
+
case "internal":
|
|
58
|
+
result = `${Address.identifier}`;
|
|
59
|
+
break;
|
|
60
|
+
case "scan":
|
|
61
|
+
result = `${Address.sort} ${Address.account}`;
|
|
62
|
+
break;
|
|
63
|
+
case "card":
|
|
64
|
+
result = "id" in Address ? `${Address.type}-${Address.id}` : `${Address.type}-merchant-${Address.merchant.id}`;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
Address_1.beautify = beautify;
|
|
70
|
+
function is(value) {
|
|
71
|
+
return (value &&
|
|
72
|
+
typeof value == "object" &&
|
|
73
|
+
(Address_1.PaxGiro.is(value) ||
|
|
74
|
+
Address_1.Iban.is(value) ||
|
|
75
|
+
Address_1.Internal.is(value) ||
|
|
76
|
+
Address_1.Scan.is(value) ||
|
|
77
|
+
Address_1.Card.is(value) ||
|
|
78
|
+
Address_1.Card.Counterpart.type.is(value)));
|
|
79
|
+
}
|
|
80
|
+
Address_1.is = is;
|
|
81
|
+
Address_1.PaxGiro = AddressPaxGiro;
|
|
82
|
+
Address_1.Iban = AddressIban;
|
|
83
|
+
Address_1.Scan = AddressScan;
|
|
84
|
+
Address_1.Internal = AddressInternal;
|
|
85
|
+
Address_1.Card = AddressCard;
|
|
86
|
+
})(Address || (Address = {}));
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Rail/Address/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,EAAE,IA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