@pax2pay/model-banking 0.1.381 → 0.1.383
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/Settlement/index.ts +7 -0
- package/Treasury/Snapshot/Fiat.ts +1 -1
- package/Treasury/Snapshot/Fragment.ts +1 -1
- package/Treasury/Snapshot/index.ts +1 -1
- package/Warning/Base.ts +3 -0
- package/Warning/Settlement/MissingFile.ts +28 -0
- package/Warning/Settlement/NegativeAmount.ts +37 -0
- package/Warning/Settlement/UnknownEntry.ts +29 -0
- package/Warning/Settlement/index.ts +17 -0
- package/{Treasury/Snapshot/Warning → Warning/Snapshot}/Counterbalance.ts +3 -4
- package/{Treasury/Snapshot/Warning/Buffer.ts → Warning/Snapshot/MissingBuffer.ts} +12 -12
- package/Warning/Snapshot/MissingEmoney.ts +14 -0
- package/Warning/Snapshot/MissingFiat.ts +14 -0
- package/{Treasury/Snapshot/Warning → Warning/Snapshot}/Overdraft.ts +4 -5
- package/{Treasury/Snapshot/Warning/Unguarded.ts → Warning/Snapshot/StaleFiat.ts} +13 -14
- package/Warning/Snapshot/index.ts +33 -0
- package/Warning/index.ts +7 -3
- package/dist/Settlement/index.d.ts +3 -0
- package/dist/Settlement/index.js +7 -0
- package/dist/Settlement/index.js.map +1 -1
- package/dist/Treasury/Snapshot/Fiat.d.ts +1 -1
- package/dist/Treasury/Snapshot/Fragment.d.ts +1 -1
- package/dist/Treasury/Snapshot/Fragment.js +1 -1
- package/dist/Treasury/Snapshot/Fragment.js.map +1 -1
- package/dist/Treasury/Snapshot/index.d.ts +1 -1
- package/dist/Treasury/Snapshot/index.js +1 -1
- package/dist/Treasury/Snapshot/index.js.map +1 -1
- package/dist/Warning/Base.d.ts +11 -0
- package/dist/Warning/Base.js +11 -0
- package/dist/Warning/Base.js.map +1 -0
- package/dist/Warning/Settlement/MissingFile.d.ts +15 -0
- package/dist/Warning/Settlement/MissingFile.js +22 -0
- package/dist/Warning/Settlement/MissingFile.js.map +1 -0
- package/dist/Warning/Settlement/NegativeAmount.d.ts +15 -0
- package/dist/Warning/Settlement/NegativeAmount.js +27 -0
- package/dist/Warning/Settlement/NegativeAmount.js.map +1 -0
- package/dist/Warning/Settlement/UnknownEntry.d.ts +14 -0
- package/dist/Warning/Settlement/UnknownEntry.js +23 -0
- package/dist/Warning/Settlement/UnknownEntry.js.map +1 -0
- package/dist/Warning/Settlement/index.d.ts +11 -0
- package/dist/Warning/Settlement/index.js +12 -0
- package/dist/Warning/Settlement/index.js.map +1 -0
- package/dist/{Treasury/Snapshot/Warning → Warning/Snapshot}/Counterbalance.d.ts +2 -2
- package/dist/{Treasury/Snapshot/Warning → Warning/Snapshot}/Counterbalance.js +2 -2
- package/dist/Warning/Snapshot/Counterbalance.js.map +1 -0
- package/dist/Warning/Snapshot/MissingBuffer.d.ts +14 -0
- package/dist/{Treasury/Snapshot/Warning/Buffer.js → Warning/Snapshot/MissingBuffer.js} +12 -10
- package/dist/Warning/Snapshot/MissingBuffer.js.map +1 -0
- package/dist/Warning/Snapshot/MissingEmoney.d.ts +10 -0
- package/dist/Warning/Snapshot/MissingEmoney.js +10 -0
- package/dist/Warning/Snapshot/MissingEmoney.js.map +1 -0
- package/dist/Warning/Snapshot/MissingFiat.d.ts +10 -0
- package/dist/Warning/Snapshot/MissingFiat.js +10 -0
- package/dist/Warning/Snapshot/MissingFiat.js.map +1 -0
- package/dist/{Treasury/Snapshot/Warning → Warning/Snapshot}/Overdraft.d.ts +3 -3
- package/dist/{Treasury/Snapshot/Warning → Warning/Snapshot}/Overdraft.js +3 -3
- package/dist/Warning/Snapshot/Overdraft.js.map +1 -0
- package/dist/Warning/Snapshot/StaleFiat.d.ts +16 -0
- package/dist/{Treasury/Snapshot/Warning/Unguarded.js → Warning/Snapshot/StaleFiat.js} +11 -10
- package/dist/Warning/Snapshot/StaleFiat.js.map +1 -0
- package/dist/Warning/Snapshot/index.d.ts +17 -0
- package/dist/Warning/Snapshot/index.js +18 -0
- package/dist/Warning/Snapshot/index.js.map +1 -0
- package/dist/Warning/index.d.ts +11 -0
- package/dist/Warning/index.js +12 -0
- package/dist/Warning/index.js.map +1 -0
- package/dist/pax2pay.d.ts +1 -0
- package/dist/pax2pay.js +1 -0
- package/dist/pax2pay.js.map +1 -1
- package/package.json +1 -1
- package/pax2pay.ts +1 -0
- package/Treasury/Snapshot/Warning/index.ts +0 -20
- package/dist/Treasury/Snapshot/Warning/Buffer.d.ts +0 -14
- package/dist/Treasury/Snapshot/Warning/Buffer.js.map +0 -1
- package/dist/Treasury/Snapshot/Warning/Counterbalance.js.map +0 -1
- package/dist/Treasury/Snapshot/Warning/Overdraft.js.map +0 -1
- package/dist/Treasury/Snapshot/Warning/Unguarded.d.ts +0 -17
- package/dist/Treasury/Snapshot/Warning/Unguarded.js.map +0 -1
- package/dist/Treasury/Snapshot/Warning/index.d.ts +0 -13
- package/dist/Treasury/Snapshot/Warning/index.js +0 -14
- package/dist/Treasury/Snapshot/Warning/index.js.map +0 -1
package/Settlement/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { isly } from "isly"
|
|
3
3
|
import { Amounts } from "../Amounts"
|
|
4
|
+
import { Settlement as SettlementWarning } from "../Warning/Settlement"
|
|
4
5
|
import { Amount as SettlementAmount } from "./Amount"
|
|
5
6
|
import { Batch as SettlementBatch } from "./Batch"
|
|
6
7
|
import { Creatable as SettlementCreatable } from "./Creatable"
|
|
@@ -17,6 +18,7 @@ export interface Settlement extends Settlement.Creatable {
|
|
|
17
18
|
created: isoly.DateTime
|
|
18
19
|
status: Status
|
|
19
20
|
entries: Settlement.Entry.Summary
|
|
21
|
+
warnings?: Settlement.Warning[]
|
|
20
22
|
}
|
|
21
23
|
export namespace Settlement {
|
|
22
24
|
export import Identifier = SettlementIdentifier
|
|
@@ -27,6 +29,7 @@ export namespace Settlement {
|
|
|
27
29
|
export import Creatable = SettlementCreatable
|
|
28
30
|
export import Entry = SettlementEntry
|
|
29
31
|
export import Batch = SettlementBatch
|
|
32
|
+
export import Warning = SettlementWarning
|
|
30
33
|
export function from(id: Settlement.Identifier, creatable: Settlement.Creatable, by: string): Settlement {
|
|
31
34
|
return {
|
|
32
35
|
id,
|
|
@@ -49,6 +52,9 @@ export namespace Settlement {
|
|
|
49
52
|
result.entries.failed ? result.entries.failed.count++ : (result.entries.failed = { count: 1 })
|
|
50
53
|
break
|
|
51
54
|
}
|
|
55
|
+
if (entry.type == "unknown") {
|
|
56
|
+
;(result.warnings ??= []).push(Warning.UnknownEntry.create(entry, settlement.id))
|
|
57
|
+
}
|
|
52
58
|
}
|
|
53
59
|
return result
|
|
54
60
|
}
|
|
@@ -99,6 +105,7 @@ export namespace Settlement {
|
|
|
99
105
|
created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
|
|
100
106
|
status: Status.type,
|
|
101
107
|
entries: Settlement.Entry.Summary.type,
|
|
108
|
+
warnings: Settlement.Warning.type.array().optional(),
|
|
102
109
|
})
|
|
103
110
|
export const is = type.is
|
|
104
111
|
export const flaw = type.flaw
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { isly } from "isly"
|
|
3
3
|
import { Balance } from "../../Balance"
|
|
4
|
+
import { Warning } from "../../Warning"
|
|
4
5
|
import { Account } from "../Account"
|
|
5
|
-
import { Warning } from "./Warning"
|
|
6
6
|
|
|
7
7
|
export interface Fragment {
|
|
8
8
|
warnings: Warning[]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { isly } from "isly"
|
|
3
|
+
import { Warning as SnapshotWarning } from "../../Warning"
|
|
3
4
|
import { Emoney as SnapshotEmoney } from "./Emoney"
|
|
4
5
|
import { Fiat as SnapshotFiat } from "./Fiat"
|
|
5
6
|
import { Fragment as SnapshotFragment } from "./Fragment"
|
|
6
7
|
import { funding as snapshotFunding } from "./funding"
|
|
7
|
-
import { Warning as SnapshotWarning } from "./Warning"
|
|
8
8
|
|
|
9
9
|
export type Snapshot = Partial<Record<isoly.Currency, Snapshot.Fragment>>
|
|
10
10
|
|
package/Warning/Base.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { isoly } from "isoly"
|
|
1
2
|
import { isly } from "isly"
|
|
2
3
|
|
|
3
4
|
export interface Base {
|
|
4
5
|
type: string
|
|
5
6
|
resource: string
|
|
6
7
|
value?: number
|
|
8
|
+
date: isoly.Date
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
export namespace Base {
|
|
@@ -11,5 +13,6 @@ export namespace Base {
|
|
|
11
13
|
type: isly.string(),
|
|
12
14
|
resource: isly.string(),
|
|
13
15
|
value: isly.number().optional(),
|
|
16
|
+
date: isly.string(),
|
|
14
17
|
})
|
|
15
18
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { isoly } from "isoly"
|
|
2
|
+
import { isly } from "isly"
|
|
3
|
+
import { Stack } from "../../Card/Stack"
|
|
4
|
+
import { Batch } from "../../Settlement/Batch"
|
|
5
|
+
import { Identifier } from "../../Settlement/Identifier"
|
|
6
|
+
import { Totals } from "../../Settlement/Totals"
|
|
7
|
+
import { Base } from "../Base"
|
|
8
|
+
|
|
9
|
+
export interface MissingFile extends Base {
|
|
10
|
+
type: "missing-file"
|
|
11
|
+
resource: Identifier
|
|
12
|
+
totals?: Totals
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export namespace MissingFile {
|
|
16
|
+
export const type = Base.type.extend<MissingFile>({
|
|
17
|
+
type: isly.string("missing-file"),
|
|
18
|
+
resource: Identifier.type,
|
|
19
|
+
totals: Totals.type.optional(),
|
|
20
|
+
})
|
|
21
|
+
export function create(date: isoly.Date, order: number, stack: Stack): MissingFile {
|
|
22
|
+
return {
|
|
23
|
+
type: "missing-file",
|
|
24
|
+
resource: Identifier.create(date, stack, order),
|
|
25
|
+
date: isoly.Date.now(),
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { isoly } from "isoly"
|
|
2
|
+
import { isly } from "isly"
|
|
3
|
+
import { Identifier } from "../../Settlement/Identifier"
|
|
4
|
+
import { Total } from "../../Settlement/Total"
|
|
5
|
+
import { Totals } from "../../Settlement/Totals"
|
|
6
|
+
import { Base } from "../Base"
|
|
7
|
+
|
|
8
|
+
export interface NegativeAmount extends Base {
|
|
9
|
+
type: "negative-amount"
|
|
10
|
+
resource: Identifier
|
|
11
|
+
value: number
|
|
12
|
+
currency: isoly.Currency
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export namespace NegativeAmount {
|
|
16
|
+
export const type = Base.type.extend<NegativeAmount>({
|
|
17
|
+
type: isly.string("negative-amount"),
|
|
18
|
+
resource: Identifier.type,
|
|
19
|
+
value: isly.number(),
|
|
20
|
+
currency: isly.fromIs("currency", isoly.Currency.is),
|
|
21
|
+
})
|
|
22
|
+
export function create(resource: Identifier, totals: Totals): NegativeAmount[] {
|
|
23
|
+
const warnings: NegativeAmount[] = []
|
|
24
|
+
Object.entries(totals).forEach(
|
|
25
|
+
([currency, total]: [isoly.Currency, Total]) =>
|
|
26
|
+
(total.outcome?.net ?? 0) < 0 &&
|
|
27
|
+
warnings.push({
|
|
28
|
+
type: "negative-amount",
|
|
29
|
+
resource,
|
|
30
|
+
value: total.outcome!.net,
|
|
31
|
+
currency,
|
|
32
|
+
date: isoly.Date.now(),
|
|
33
|
+
})
|
|
34
|
+
)
|
|
35
|
+
return warnings
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cryptly } from "cryptly"
|
|
2
|
+
import { isoly } from "isoly"
|
|
3
|
+
import { isly } from "isly"
|
|
4
|
+
import { Authorization } from "../../Authorization"
|
|
5
|
+
import { Unknown } from "../../Settlement/Entry/Unknown"
|
|
6
|
+
import { Identifier } from "../../Settlement/Identifier"
|
|
7
|
+
import { Base } from "../Base"
|
|
8
|
+
|
|
9
|
+
export interface UnknownEntry extends Base {
|
|
10
|
+
type: "unknown-entry"
|
|
11
|
+
resource: Identifier
|
|
12
|
+
authorization?: Authorization["id"]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export namespace UnknownEntry {
|
|
16
|
+
export const type = Base.type.extend<UnknownEntry>({
|
|
17
|
+
type: isly.string("unknown-entry"),
|
|
18
|
+
resource: Identifier.type,
|
|
19
|
+
authorization: isly.fromIs("Authorization.id", cryptly.Identifier.is).optional(),
|
|
20
|
+
})
|
|
21
|
+
export function create(entry: Unknown, resource: Identifier): UnknownEntry {
|
|
22
|
+
return {
|
|
23
|
+
type: "unknown-entry",
|
|
24
|
+
resource,
|
|
25
|
+
authorization: entry.authorization?.id,
|
|
26
|
+
date: isoly.Date.now(),
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
import { MissingFile as MissingFileWarning } from "./MissingFile"
|
|
3
|
+
import { NegativeAmount as NegativeAmountWarning } from "./NegativeAmount"
|
|
4
|
+
import { UnknownEntry as UnknownEntryWarning } from "./UnknownEntry"
|
|
5
|
+
|
|
6
|
+
export type Settlement = NegativeAmountWarning | MissingFileWarning | UnknownEntryWarning
|
|
7
|
+
|
|
8
|
+
export namespace Settlement {
|
|
9
|
+
export import NegativeAmount = NegativeAmountWarning
|
|
10
|
+
export import MissingFile = MissingFileWarning
|
|
11
|
+
export import UnknownEntry = UnknownEntryWarning
|
|
12
|
+
export const type = isly.union<Settlement, NegativeAmount, MissingFile, UnknownEntry>(
|
|
13
|
+
NegativeAmount.type,
|
|
14
|
+
MissingFile.type,
|
|
15
|
+
UnknownEntry.type
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { isly } from "isly"
|
|
3
|
+
import { Base } from "../Base"
|
|
3
4
|
|
|
4
|
-
export interface Counterbalance {
|
|
5
|
+
export interface Counterbalance extends Base {
|
|
5
6
|
type: "counterbalance"
|
|
6
|
-
account: string
|
|
7
7
|
currency: isoly.Currency
|
|
8
8
|
counterbalance: string[]
|
|
9
9
|
}
|
|
10
10
|
export namespace Counterbalance {
|
|
11
|
-
export const type =
|
|
11
|
+
export const type = Base.type.extend<Counterbalance>({
|
|
12
12
|
type: isly.string("counterbalance"),
|
|
13
|
-
account: isly.string(),
|
|
14
13
|
currency: isly.string(),
|
|
15
14
|
counterbalance: isly.string().array(),
|
|
16
15
|
})
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { isly } from "isly"
|
|
3
|
-
import {
|
|
3
|
+
import { Treasury } from "../../Treasury"
|
|
4
|
+
import { Base } from "../Base"
|
|
4
5
|
|
|
5
|
-
export interface
|
|
6
|
-
type: "buffer"
|
|
7
|
-
account: string
|
|
6
|
+
export interface MissingBuffer extends Base {
|
|
7
|
+
type: "missing-buffer"
|
|
8
8
|
currency: isoly.Currency
|
|
9
9
|
minimum: number
|
|
10
10
|
balance: number
|
|
11
11
|
}
|
|
12
|
-
export namespace
|
|
13
|
-
export const type =
|
|
14
|
-
type: isly.string("buffer"),
|
|
15
|
-
account: isly.string(),
|
|
12
|
+
export namespace MissingBuffer {
|
|
13
|
+
export const type = Base.type.extend<MissingBuffer>({
|
|
14
|
+
type: isly.string("missing-buffer"),
|
|
16
15
|
currency: isly.string(),
|
|
17
16
|
minimum: isly.number(),
|
|
18
17
|
balance: isly.number(),
|
|
19
18
|
})
|
|
20
|
-
export function create(account: Account):
|
|
21
|
-
const result:
|
|
19
|
+
export function create(account: Treasury.Account): MissingBuffer[] {
|
|
20
|
+
const result: MissingBuffer[] = []
|
|
22
21
|
for (const [currency, amount] of Object.entries(account.balance)) {
|
|
23
22
|
const minimum = account.conditions?.minimum?.[currency as isoly.Currency]
|
|
24
23
|
if (typeof minimum != "undefined" && minimum > amount)
|
|
25
24
|
result.push({
|
|
26
|
-
type: "buffer",
|
|
27
|
-
|
|
25
|
+
type: "missing-buffer",
|
|
26
|
+
resource: account.id,
|
|
28
27
|
currency: currency as isoly.Currency,
|
|
29
28
|
minimum,
|
|
30
29
|
balance: amount,
|
|
30
|
+
date: isoly.Date.now(),
|
|
31
31
|
})
|
|
32
32
|
}
|
|
33
33
|
return result
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isoly } from "isoly"
|
|
2
|
+
import { isly } from "isly"
|
|
3
|
+
import { Base } from "../Base"
|
|
4
|
+
|
|
5
|
+
export interface MissingEmoney extends Base {
|
|
6
|
+
type: "missing-emoney"
|
|
7
|
+
currency: isoly.Currency
|
|
8
|
+
}
|
|
9
|
+
export namespace MissingEmoney {
|
|
10
|
+
export const type = Base.type.extend<MissingEmoney>({
|
|
11
|
+
type: isly.string("missing-emoney"),
|
|
12
|
+
currency: isly.string(),
|
|
13
|
+
})
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isoly } from "isoly"
|
|
2
|
+
import { isly } from "isly"
|
|
3
|
+
import { Base } from "../Base"
|
|
4
|
+
|
|
5
|
+
export interface MissingFiat extends Base {
|
|
6
|
+
type: "missing-fiat"
|
|
7
|
+
currency: isoly.Currency
|
|
8
|
+
}
|
|
9
|
+
export namespace MissingFiat {
|
|
10
|
+
export const type = Base.type.extend<MissingFiat>({
|
|
11
|
+
type: isly.string("missing-fiat"),
|
|
12
|
+
currency: isly.string(),
|
|
13
|
+
})
|
|
14
|
+
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
-
import { Balance } from "
|
|
2
|
+
import { Balance } from "../../Balance"
|
|
3
|
+
import { Base } from "../Base"
|
|
3
4
|
|
|
4
|
-
export interface Overdraft {
|
|
5
|
+
export interface Overdraft extends Base {
|
|
5
6
|
type: "overdraft"
|
|
6
|
-
account: string
|
|
7
7
|
balance: Balance.Extended
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export namespace Overdraft {
|
|
11
|
-
export const type =
|
|
11
|
+
export const type = Base.type.extend<Overdraft>({
|
|
12
12
|
type: isly.string("overdraft"),
|
|
13
|
-
account: isly.string(),
|
|
14
13
|
balance: Balance.Extended,
|
|
15
14
|
})
|
|
16
15
|
}
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { isly } from "isly"
|
|
3
|
-
import { Holidays } from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { Holidays } from "../../Holidays"
|
|
4
|
+
import { Treasury } from "../../Treasury"
|
|
5
|
+
import { Base } from "../Base"
|
|
6
6
|
|
|
7
|
-
export interface
|
|
8
|
-
type: "
|
|
9
|
-
date: isoly.Date
|
|
7
|
+
export interface StaleFiat extends Base {
|
|
8
|
+
type: "stale-fiat"
|
|
10
9
|
currency: isoly.Currency
|
|
11
10
|
transaction: { id: string; created: isoly.DateTime }
|
|
12
11
|
}
|
|
13
|
-
export namespace
|
|
14
|
-
export const type =
|
|
15
|
-
type: isly.string("
|
|
16
|
-
date: isly.string(),
|
|
12
|
+
export namespace StaleFiat {
|
|
13
|
+
export const type = Base.type.extend<StaleFiat>({
|
|
14
|
+
type: isly.string("stale-fiat"),
|
|
17
15
|
currency: isly.string(),
|
|
18
|
-
transaction: isly.object<
|
|
16
|
+
transaction: isly.object<StaleFiat["transaction"]>({ id: isly.string(), created: isly.string() }),
|
|
19
17
|
})
|
|
20
|
-
export function create(account: Account, transactions: Transaction[]):
|
|
21
|
-
const result:
|
|
18
|
+
export function create(account: Treasury.Account, transactions: Treasury.Transaction[]): StaleFiat[] {
|
|
19
|
+
const result: StaleFiat[] = []
|
|
22
20
|
for (const [currency, amount] of Object.entries(account.balance)) {
|
|
23
21
|
let oldest: { id: string; date: isoly.Date; created: isoly.DateTime } | undefined = undefined
|
|
24
22
|
let remainder = amount
|
|
@@ -35,10 +33,11 @@ export namespace Unguarded {
|
|
|
35
33
|
}
|
|
36
34
|
if (oldest && isoly.Date.now() > isoly.Date.nextBusinessDay(oldest.date, 3, Holidays.dates["England"]))
|
|
37
35
|
result.push({
|
|
38
|
-
type: "
|
|
36
|
+
type: "stale-fiat",
|
|
39
37
|
currency: currency as isoly.Currency,
|
|
40
38
|
date: oldest.date,
|
|
41
39
|
transaction: { id: oldest.id, created: oldest.created },
|
|
40
|
+
resource: oldest.id,
|
|
42
41
|
})
|
|
43
42
|
}
|
|
44
43
|
return result
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
import { Counterbalance as WarningCounterbalance } from "./Counterbalance"
|
|
3
|
+
import { MissingBuffer as WarningMissingBuffer } from "./MissingBuffer"
|
|
4
|
+
import { MissingEmoney as WarningMissingEmoney } from "./MissingEmoney"
|
|
5
|
+
import { MissingFiat as WarningMissingFiat } from "./MissingFiat"
|
|
6
|
+
import { Overdraft as WarningOverdraft } from "./Overdraft"
|
|
7
|
+
import { StaleFiat as WarningStaleFiat } from "./StaleFiat"
|
|
8
|
+
|
|
9
|
+
export type Snapshot =
|
|
10
|
+
| Snapshot.Overdraft
|
|
11
|
+
| Snapshot.StaleFiat
|
|
12
|
+
| Snapshot.MissingBuffer
|
|
13
|
+
| Snapshot.Counterbalance
|
|
14
|
+
| Snapshot.MissingEmoney
|
|
15
|
+
| Snapshot.MissingFiat
|
|
16
|
+
|
|
17
|
+
export namespace Snapshot {
|
|
18
|
+
export import Overdraft = WarningOverdraft
|
|
19
|
+
export import StaleFiat = WarningStaleFiat
|
|
20
|
+
export import MissingBuffer = WarningMissingBuffer
|
|
21
|
+
export import Counterbalance = WarningCounterbalance
|
|
22
|
+
export import MissingEmoney = WarningMissingEmoney
|
|
23
|
+
export import MissingFiat = WarningMissingFiat
|
|
24
|
+
export const type = isly.union<
|
|
25
|
+
Snapshot,
|
|
26
|
+
Overdraft,
|
|
27
|
+
StaleFiat,
|
|
28
|
+
MissingBuffer,
|
|
29
|
+
Counterbalance,
|
|
30
|
+
MissingEmoney,
|
|
31
|
+
MissingFiat
|
|
32
|
+
>(Overdraft.type, StaleFiat.type, MissingBuffer.type, Counterbalance.type, MissingEmoney.type, MissingFiat.type)
|
|
33
|
+
}
|
package/Warning/index.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
1
2
|
import { Base as WarningBase } from "./Base"
|
|
2
|
-
|
|
3
|
+
import { Settlement as WarningSettlement } from "./Settlement"
|
|
4
|
+
import { Snapshot as WarningSnapshot } from "./Snapshot"
|
|
3
5
|
|
|
4
|
-
|
|
6
|
+
export type Warning = Warning.Snapshot | Warning.Settlement
|
|
5
7
|
|
|
6
8
|
export namespace Warning {
|
|
7
|
-
|
|
9
|
+
export import Snapshot = WarningSnapshot
|
|
10
|
+
export import Settlement = WarningSettlement
|
|
8
11
|
export import Base = WarningBase
|
|
12
|
+
export const type = isly.union<Warning, Snapshot, Settlement>(Snapshot.type, Settlement.type)
|
|
9
13
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { isly } from "isly";
|
|
3
3
|
import { Amounts } from "../Amounts";
|
|
4
|
+
import { Settlement as SettlementWarning } from "../Warning/Settlement";
|
|
4
5
|
import { Amount as SettlementAmount } from "./Amount";
|
|
5
6
|
import { Batch as SettlementBatch } from "./Batch";
|
|
6
7
|
import { Creatable as SettlementCreatable } from "./Creatable";
|
|
@@ -16,6 +17,7 @@ export interface Settlement extends Settlement.Creatable {
|
|
|
16
17
|
created: isoly.DateTime;
|
|
17
18
|
status: Status;
|
|
18
19
|
entries: Settlement.Entry.Summary;
|
|
20
|
+
warnings?: Settlement.Warning[];
|
|
19
21
|
}
|
|
20
22
|
export declare namespace Settlement {
|
|
21
23
|
export import Identifier = SettlementIdentifier;
|
|
@@ -26,6 +28,7 @@ export declare namespace Settlement {
|
|
|
26
28
|
export import Creatable = SettlementCreatable;
|
|
27
29
|
export import Entry = SettlementEntry;
|
|
28
30
|
export import Batch = SettlementBatch;
|
|
31
|
+
export import Warning = SettlementWarning;
|
|
29
32
|
export function from(id: Settlement.Identifier, creatable: Settlement.Creatable, by: string): Settlement;
|
|
30
33
|
export function compile(settlement: Settlement, entries: Settlement.Entry[]): Settlement;
|
|
31
34
|
type OldTotal = {
|
package/dist/Settlement/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { isly } from "isly";
|
|
3
|
+
import { Settlement as SettlementWarning } from "../Warning/Settlement";
|
|
3
4
|
import { Amount as SettlementAmount } from "./Amount";
|
|
4
5
|
import { Batch as SettlementBatch } from "./Batch";
|
|
5
6
|
import { Creatable as SettlementCreatable } from "./Creatable";
|
|
@@ -19,6 +20,7 @@ export var Settlement;
|
|
|
19
20
|
Settlement.Creatable = SettlementCreatable;
|
|
20
21
|
Settlement.Entry = SettlementEntry;
|
|
21
22
|
Settlement.Batch = SettlementBatch;
|
|
23
|
+
Settlement.Warning = SettlementWarning;
|
|
22
24
|
function from(id, creatable, by) {
|
|
23
25
|
return {
|
|
24
26
|
id,
|
|
@@ -42,6 +44,10 @@ export var Settlement;
|
|
|
42
44
|
result.entries.failed ? result.entries.failed.count++ : (result.entries.failed = { count: 1 });
|
|
43
45
|
break;
|
|
44
46
|
}
|
|
47
|
+
if (entry.type == "unknown") {
|
|
48
|
+
;
|
|
49
|
+
(result.warnings ??= []).push(Settlement.Warning.UnknownEntry.create(entry, settlement.id));
|
|
50
|
+
}
|
|
45
51
|
}
|
|
46
52
|
return result;
|
|
47
53
|
}
|
|
@@ -85,6 +91,7 @@ export var Settlement;
|
|
|
85
91
|
created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
|
|
86
92
|
status: Status.type,
|
|
87
93
|
entries: Settlement.Entry.Summary.type,
|
|
94
|
+
warnings: Settlement.Warning.type.array().optional(),
|
|
88
95
|
});
|
|
89
96
|
Settlement.is = Settlement.type.is;
|
|
90
97
|
Settlement.flaw = Settlement.type.flaw;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Settlement/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAA;AACrD,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,SAAS,IAAI,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Settlement/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAA;AACrD,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,SAAS,IAAI,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAE,KAAK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iBAAiB,EAAE,MAAM,EAAE,CAAA;QAC1C,CAAC;aAAM,CAAC;YACP,MAAM,GAAG,UAAU,CAAA;QACpB,CAAC;QACD,OAAO,MAAM,CAAA;IACd,CAAC;IAhCe,qBAAU,aAgCzB,CAAA;IACY,eAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAa;QAC/D,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;QACxD,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzD,MAAM,EAAE,MAAM,CAAC,IAAI;QACnB,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI;QACtC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACpD,CAAC,CAAA;IACW,aAAE,GAAG,WAAA,IAAI,CAAC,EAAE,CAAA;IACZ,eAAI,GAAG,WAAA,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC,EAzFgB,UAAU,KAAV,UAAU,QAyF1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { Supplier } from "../../Supplier";
|
|
3
|
+
import { Warning } from "../../Warning";
|
|
3
4
|
import { Balance } from "../Balance";
|
|
4
|
-
import { Warning } from "./Warning";
|
|
5
5
|
export interface Fiat {
|
|
6
6
|
supplier: Supplier | "total";
|
|
7
7
|
account: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { isly } from "isly";
|
|
3
3
|
import { Balance } from "../../Balance";
|
|
4
|
+
import { Warning } from "../../Warning";
|
|
4
5
|
import { Account } from "../Account";
|
|
5
|
-
import { Warning } from "./Warning";
|
|
6
6
|
export interface Fragment {
|
|
7
7
|
warnings: Warning[];
|
|
8
8
|
emoney: Balance.Extended;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { isly } from "isly";
|
|
3
3
|
import { Balance } from "../../Balance";
|
|
4
|
+
import { Warning } from "../../Warning";
|
|
4
5
|
import { Account } from "../Account";
|
|
5
|
-
import { Warning } from "./Warning";
|
|
6
6
|
export var Fragment;
|
|
7
7
|
(function (Fragment) {
|
|
8
8
|
let Counterbalance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fragment.js","sourceRoot":"../","sources":["Treasury/Snapshot/Fragment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Fragment.js","sourceRoot":"../","sources":["Treasury/Snapshot/Fragment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAepC,MAAM,KAAW,QAAQ,CAkGxB;AAlGD,WAAiB,QAAQ;IAExB,IAAiB,cAAc,CAuB9B;IAvBD,WAAiB,cAAc;QACjB,mBAAI,GAAG,IAAI,CAAC,MAAM,CAC9B,IAAI,CAAC,MAAM,EAAE,EACb,IAAI,CAAC,MAAM,CAAyB;YACnC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;YAC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ACF,CAAC,EAtCgB,MAAM,GAAN,eAAM,KAAN,eAAM,QAsCtB;IACD,SAAgB,UAAU,CAAC,QAAwB,EAAE,QAA2B;QAC/E,IAAI,MAAgB,CAAA;QACpB,IAAI,gBAAgB,IAAI,QAAQ,EAAE,CAAC;YAClC,MAAM,GAAG,QAAQ,CAAA;QAClB,CAAC;aAAM,CAAC;YACP,MAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;YAC1F,MAAM,MAAM,GAAa,EAAE,GAAG,QAAQ,EAAE,cAAc,EAAE,CAAA;YACxD,QAAQ,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,MAAM,CAAA;YAC1C,QAAQ,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,MAAM,CAAA;YAC1C,OAAO,MAAM,CAAA;QACd,CAAC;QACD,OAAO,MAAM,CAAA;IACd,CAAC;IAZe,mBAAU,aAYzB,CAAA;AACF,CAAC,EAlGgB,QAAQ,KAAR,QAAQ,QAkGxB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { isly } from "isly";
|
|
3
|
+
import { Warning as SnapshotWarning } from "../../Warning";
|
|
3
4
|
import { Emoney as SnapshotEmoney } from "./Emoney";
|
|
4
5
|
import { Fiat as SnapshotFiat } from "./Fiat";
|
|
5
6
|
import { Fragment as SnapshotFragment } from "./Fragment";
|
|
6
7
|
import { funding as snapshotFunding } from "./funding";
|
|
7
|
-
import { Warning as SnapshotWarning } from "./Warning";
|
|
8
8
|
export type Snapshot = Partial<Record<isoly.Currency, Snapshot.Fragment>>;
|
|
9
9
|
export declare namespace Snapshot {
|
|
10
10
|
export import Fragment = SnapshotFragment;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { isly } from "isly";
|
|
3
|
+
import { Warning as SnapshotWarning } from "../../Warning";
|
|
3
4
|
import { Fragment as SnapshotFragment } from "./Fragment";
|
|
4
5
|
import { funding as snapshotFunding } from "./funding";
|
|
5
|
-
import { Warning as SnapshotWarning } from "./Warning";
|
|
6
6
|
export var Snapshot;
|
|
7
7
|
(function (Snapshot) {
|
|
8
8
|
Snapshot.Fragment = SnapshotFragment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Snapshot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Snapshot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAA;AAG1D,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAItD,MAAM,KAAW,QAAQ,CAOxB;AAPD,WAAiB,QAAQ;IACV,iBAAQ,GAAG,gBAAgB,CAAA;IAC3B,gBAAO,GAAG,eAAe,CAAA;IACzB,gBAAO,GAAG,eAAe,CAAA;IAG1B,aAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAA,QAAQ,CAAC,IAAI,CAAC,CAAA;AAC3F,CAAC,EAPgB,QAAQ,KAAR,QAAQ,QAOxB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
export var Base;
|
|
3
|
+
(function (Base) {
|
|
4
|
+
Base.type = isly.object({
|
|
5
|
+
type: isly.string(),
|
|
6
|
+
resource: isly.string(),
|
|
7
|
+
value: isly.number().optional(),
|
|
8
|
+
date: isly.string(),
|
|
9
|
+
});
|
|
10
|
+
})(Base || (Base = {}));
|
|
11
|
+
//# sourceMappingURL=Base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Base.js","sourceRoot":"../","sources":["Warning/Base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAS3B,MAAM,KAAW,IAAI,CAOpB;AAPD,WAAiB,IAAI;IACP,SAAI,GAAG,IAAI,CAAC,MAAM,CAAO;QACrC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;QACvB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;KACnB,CAAC,CAAA;AACH,CAAC,EAPgB,IAAI,KAAJ,IAAI,QAOpB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isoly } from "isoly";
|
|
2
|
+
import { isly } from "isly";
|
|
3
|
+
import { Stack } from "../../Card/Stack";
|
|
4
|
+
import { Identifier } from "../../Settlement/Identifier";
|
|
5
|
+
import { Totals } from "../../Settlement/Totals";
|
|
6
|
+
import { Base } from "../Base";
|
|
7
|
+
export interface MissingFile extends Base {
|
|
8
|
+
type: "missing-file";
|
|
9
|
+
resource: Identifier;
|
|
10
|
+
totals?: Totals;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace MissingFile {
|
|
13
|
+
const type: isly.object.ExtendableType<MissingFile>;
|
|
14
|
+
function create(date: isoly.Date, order: number, stack: Stack): MissingFile;
|
|
15
|
+
}
|