@pax2pay/model-banking 0.1.667 → 0.1.668

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.
Files changed (141) hide show
  1. package/Treasury/Balance/index.ts +1 -0
  2. package/Treasury/Snapshot/Account.ts +21 -0
  3. package/Treasury/Snapshot/Check/BankFeedIntegrity.ts +18 -1
  4. package/Treasury/Snapshot/Check/Base.ts +7 -1
  5. package/Treasury/Snapshot/Check/Checks.ts +2 -0
  6. package/Treasury/Snapshot/Check/ExternalReconciliation.ts +9 -1
  7. package/Treasury/Snapshot/Check/InternalReconciliation.ts +9 -1
  8. package/Treasury/Snapshot/Check/LedgerIntegrity.ts +13 -1
  9. package/Treasury/Snapshot/Check/Overdraft.ts +7 -1
  10. package/Treasury/Snapshot/Check/Result.ts +3 -0
  11. package/Treasury/Snapshot/Check/TransactionMatch.ts +9 -1
  12. package/Treasury/Snapshot/Check/UnidentifiedFunds.ts +8 -1
  13. package/Treasury/Snapshot/Check/index.ts +17 -7
  14. package/Treasury/Snapshot/Emoney.ts +12 -0
  15. package/Treasury/Snapshot/Fiat.ts +14 -0
  16. package/Treasury/Snapshot/Reconciliation.ts +8 -0
  17. package/Treasury/Snapshot/funding.ts +6 -0
  18. package/Treasury/Snapshot/index.ts +32 -3
  19. package/Treasury/Transaction/Creatable.ts +8 -0
  20. package/Treasury/Transaction/index.ts +7 -0
  21. package/dist/cjs/Treasury/Balance/index.d.ts +1 -0
  22. package/dist/cjs/Treasury/Balance/index.js +1 -0
  23. package/dist/cjs/Treasury/Balance/index.js.map +1 -1
  24. package/dist/cjs/Treasury/Snapshot/Account.d.ts +5 -0
  25. package/dist/cjs/Treasury/Snapshot/Account.js +22 -0
  26. package/dist/cjs/Treasury/Snapshot/Account.js.map +1 -1
  27. package/dist/cjs/Treasury/Snapshot/Check/BankFeedIntegrity.d.ts +4 -1
  28. package/dist/cjs/Treasury/Snapshot/Check/BankFeedIntegrity.js +21 -0
  29. package/dist/cjs/Treasury/Snapshot/Check/BankFeedIntegrity.js.map +1 -1
  30. package/dist/cjs/Treasury/Snapshot/Check/Base.d.ts +7 -1
  31. package/dist/cjs/Treasury/Snapshot/Check/Base.js +11 -0
  32. package/dist/cjs/Treasury/Snapshot/Check/Base.js.map +1 -1
  33. package/dist/cjs/Treasury/Snapshot/Check/Checks.d.ts +2 -0
  34. package/dist/cjs/Treasury/Snapshot/Check/Checks.js +2 -0
  35. package/dist/cjs/Treasury/Snapshot/Check/Checks.js.map +1 -1
  36. package/dist/cjs/Treasury/Snapshot/Check/ExternalReconciliation.d.ts +4 -1
  37. package/dist/cjs/Treasury/Snapshot/Check/ExternalReconciliation.js +12 -0
  38. package/dist/cjs/Treasury/Snapshot/Check/ExternalReconciliation.js.map +1 -1
  39. package/dist/cjs/Treasury/Snapshot/Check/InternalReconciliation.d.ts +4 -1
  40. package/dist/cjs/Treasury/Snapshot/Check/InternalReconciliation.js +12 -0
  41. package/dist/cjs/Treasury/Snapshot/Check/InternalReconciliation.js.map +1 -1
  42. package/dist/cjs/Treasury/Snapshot/Check/LedgerIntegrity.d.ts +4 -1
  43. package/dist/cjs/Treasury/Snapshot/Check/LedgerIntegrity.js +16 -0
  44. package/dist/cjs/Treasury/Snapshot/Check/LedgerIntegrity.js.map +1 -1
  45. package/dist/cjs/Treasury/Snapshot/Check/Overdraft.d.ts +4 -1
  46. package/dist/cjs/Treasury/Snapshot/Check/Overdraft.js +10 -0
  47. package/dist/cjs/Treasury/Snapshot/Check/Overdraft.js.map +1 -1
  48. package/dist/cjs/Treasury/Snapshot/Check/Result.d.ts +2 -0
  49. package/dist/cjs/Treasury/Snapshot/Check/Result.js +2 -0
  50. package/dist/cjs/Treasury/Snapshot/Check/Result.js.map +1 -1
  51. package/dist/cjs/Treasury/Snapshot/Check/TransactionMatch.d.ts +4 -1
  52. package/dist/cjs/Treasury/Snapshot/Check/TransactionMatch.js +12 -0
  53. package/dist/cjs/Treasury/Snapshot/Check/TransactionMatch.js.map +1 -1
  54. package/dist/cjs/Treasury/Snapshot/Check/UnidentifiedFunds.d.ts +4 -1
  55. package/dist/cjs/Treasury/Snapshot/Check/UnidentifiedFunds.js +11 -0
  56. package/dist/cjs/Treasury/Snapshot/Check/UnidentifiedFunds.js.map +1 -1
  57. package/dist/cjs/Treasury/Snapshot/Check/index.d.ts +9 -7
  58. package/dist/cjs/Treasury/Snapshot/Check/index.js +24 -0
  59. package/dist/cjs/Treasury/Snapshot/Check/index.js.map +1 -1
  60. package/dist/cjs/Treasury/Snapshot/Emoney.d.ts +4 -0
  61. package/dist/cjs/Treasury/Snapshot/Emoney.js +17 -0
  62. package/dist/cjs/Treasury/Snapshot/Emoney.js.map +1 -1
  63. package/dist/cjs/Treasury/Snapshot/Fiat.d.ts +4 -0
  64. package/dist/cjs/Treasury/Snapshot/Fiat.js +19 -0
  65. package/dist/cjs/Treasury/Snapshot/Fiat.js.map +1 -1
  66. package/dist/cjs/Treasury/Snapshot/Reconciliation.d.ts +4 -0
  67. package/dist/cjs/Treasury/Snapshot/Reconciliation.js +9 -0
  68. package/dist/cjs/Treasury/Snapshot/Reconciliation.js.map +1 -1
  69. package/dist/cjs/Treasury/Snapshot/funding.d.ts +3 -0
  70. package/dist/cjs/Treasury/Snapshot/funding.js +6 -0
  71. package/dist/cjs/Treasury/Snapshot/funding.js.map +1 -1
  72. package/dist/cjs/Treasury/Snapshot/index.d.ts +22 -3
  73. package/dist/cjs/Treasury/Snapshot/index.js +41 -0
  74. package/dist/cjs/Treasury/Snapshot/index.js.map +1 -1
  75. package/dist/cjs/Treasury/Transaction/Creatable.d.ts +498 -0
  76. package/dist/cjs/Treasury/Transaction/Creatable.js +8 -0
  77. package/dist/cjs/Treasury/Transaction/Creatable.js.map +1 -1
  78. package/dist/cjs/Treasury/Transaction/index.d.ts +2 -0
  79. package/dist/cjs/Treasury/Transaction/index.js +7 -0
  80. package/dist/cjs/Treasury/Transaction/index.js.map +1 -1
  81. package/dist/mjs/Treasury/Balance/index.d.ts +1 -0
  82. package/dist/mjs/Treasury/Balance/index.js +1 -0
  83. package/dist/mjs/Treasury/Balance/index.js.map +1 -1
  84. package/dist/mjs/Treasury/Snapshot/Account.d.ts +5 -0
  85. package/dist/mjs/Treasury/Snapshot/Account.js +22 -0
  86. package/dist/mjs/Treasury/Snapshot/Account.js.map +1 -1
  87. package/dist/mjs/Treasury/Snapshot/Check/BankFeedIntegrity.d.ts +4 -1
  88. package/dist/mjs/Treasury/Snapshot/Check/BankFeedIntegrity.js +20 -1
  89. package/dist/mjs/Treasury/Snapshot/Check/BankFeedIntegrity.js.map +1 -1
  90. package/dist/mjs/Treasury/Snapshot/Check/Base.d.ts +7 -1
  91. package/dist/mjs/Treasury/Snapshot/Check/Base.js +10 -1
  92. package/dist/mjs/Treasury/Snapshot/Check/Base.js.map +1 -1
  93. package/dist/mjs/Treasury/Snapshot/Check/Checks.d.ts +2 -0
  94. package/dist/mjs/Treasury/Snapshot/Check/Checks.js +2 -0
  95. package/dist/mjs/Treasury/Snapshot/Check/Checks.js.map +1 -1
  96. package/dist/mjs/Treasury/Snapshot/Check/ExternalReconciliation.d.ts +4 -1
  97. package/dist/mjs/Treasury/Snapshot/Check/ExternalReconciliation.js +11 -1
  98. package/dist/mjs/Treasury/Snapshot/Check/ExternalReconciliation.js.map +1 -1
  99. package/dist/mjs/Treasury/Snapshot/Check/InternalReconciliation.d.ts +4 -1
  100. package/dist/mjs/Treasury/Snapshot/Check/InternalReconciliation.js +11 -1
  101. package/dist/mjs/Treasury/Snapshot/Check/InternalReconciliation.js.map +1 -1
  102. package/dist/mjs/Treasury/Snapshot/Check/LedgerIntegrity.d.ts +4 -1
  103. package/dist/mjs/Treasury/Snapshot/Check/LedgerIntegrity.js +15 -1
  104. package/dist/mjs/Treasury/Snapshot/Check/LedgerIntegrity.js.map +1 -1
  105. package/dist/mjs/Treasury/Snapshot/Check/Overdraft.d.ts +4 -1
  106. package/dist/mjs/Treasury/Snapshot/Check/Overdraft.js +9 -1
  107. package/dist/mjs/Treasury/Snapshot/Check/Overdraft.js.map +1 -1
  108. package/dist/mjs/Treasury/Snapshot/Check/Result.d.ts +2 -0
  109. package/dist/mjs/Treasury/Snapshot/Check/Result.js +2 -0
  110. package/dist/mjs/Treasury/Snapshot/Check/Result.js.map +1 -1
  111. package/dist/mjs/Treasury/Snapshot/Check/TransactionMatch.d.ts +4 -1
  112. package/dist/mjs/Treasury/Snapshot/Check/TransactionMatch.js +11 -1
  113. package/dist/mjs/Treasury/Snapshot/Check/TransactionMatch.js.map +1 -1
  114. package/dist/mjs/Treasury/Snapshot/Check/UnidentifiedFunds.d.ts +4 -1
  115. package/dist/mjs/Treasury/Snapshot/Check/UnidentifiedFunds.js +10 -1
  116. package/dist/mjs/Treasury/Snapshot/Check/UnidentifiedFunds.js.map +1 -1
  117. package/dist/mjs/Treasury/Snapshot/Check/index.d.ts +9 -7
  118. package/dist/mjs/Treasury/Snapshot/Check/index.js +24 -0
  119. package/dist/mjs/Treasury/Snapshot/Check/index.js.map +1 -1
  120. package/dist/mjs/Treasury/Snapshot/Emoney.d.ts +4 -0
  121. package/dist/mjs/Treasury/Snapshot/Emoney.js +16 -1
  122. package/dist/mjs/Treasury/Snapshot/Emoney.js.map +1 -1
  123. package/dist/mjs/Treasury/Snapshot/Fiat.d.ts +4 -0
  124. package/dist/mjs/Treasury/Snapshot/Fiat.js +18 -1
  125. package/dist/mjs/Treasury/Snapshot/Fiat.js.map +1 -1
  126. package/dist/mjs/Treasury/Snapshot/Reconciliation.d.ts +4 -0
  127. package/dist/mjs/Treasury/Snapshot/Reconciliation.js +8 -1
  128. package/dist/mjs/Treasury/Snapshot/Reconciliation.js.map +1 -1
  129. package/dist/mjs/Treasury/Snapshot/funding.d.ts +3 -0
  130. package/dist/mjs/Treasury/Snapshot/funding.js +6 -0
  131. package/dist/mjs/Treasury/Snapshot/funding.js.map +1 -1
  132. package/dist/mjs/Treasury/Snapshot/index.d.ts +22 -3
  133. package/dist/mjs/Treasury/Snapshot/index.js +41 -0
  134. package/dist/mjs/Treasury/Snapshot/index.js.map +1 -1
  135. package/dist/mjs/Treasury/Transaction/Creatable.d.ts +498 -0
  136. package/dist/mjs/Treasury/Transaction/Creatable.js +8 -0
  137. package/dist/mjs/Treasury/Transaction/Creatable.js.map +1 -1
  138. package/dist/mjs/Treasury/Transaction/index.d.ts +2 -0
  139. package/dist/mjs/Treasury/Transaction/index.js +7 -0
  140. package/dist/mjs/Treasury/Transaction/index.js.map +1 -1
  141. package/package.json +1 -1
@@ -6,6 +6,7 @@ export type Result = { account: string; balance: number }
6
6
 
7
7
  export namespace Balance {
8
8
  export const type = Amounts.type
9
+ export const typeZod = Amounts.typeZod
9
10
  }
10
11
  export namespace Result {
11
12
  export function is(value: Result | any): value is Result {
@@ -1,6 +1,7 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
3
  import { Warning } from "../../Warning"
4
+ import { zod } from "../../zod"
4
5
  import { Transaction } from "../Transaction"
5
6
 
6
7
  export interface Account {
@@ -18,14 +19,23 @@ export namespace Account {
18
19
  export type Opening = { at: isoly.DateTime; balance: number }
19
20
  export namespace Opening {
20
21
  export const type = isly.object<Opening>({ at: isly.string(), balance: isly.number() })
22
+ export const typeZod: zod.ZodType<Opening> = zod.object({
23
+ at: zod.string().refine(isoly.DateTime.is),
24
+ balance: zod.number(),
25
+ })
21
26
  }
22
27
  export type Closing = Opening
23
28
  export namespace Closing {
24
29
  export const type = Opening.type
30
+ export const typeZod = Opening.typeZod
25
31
  }
26
32
  export type Delta = { amount: number; transactions: Transaction[] }
27
33
  export namespace Delta {
28
34
  export const type = isly.object<Delta>({ amount: isly.number(), transactions: Transaction.type.array() })
35
+ export const typeZod: zod.ZodType<Delta> = zod.object({
36
+ amount: zod.number(),
37
+ transactions: zod.array(Transaction.typeZod),
38
+ })
29
39
  }
30
40
  export const type = isly.object<Account>({
31
41
  code: isly.string(),
@@ -38,4 +48,15 @@ export namespace Account {
38
48
  delta: Delta.type,
39
49
  warnings: Warning.Snapshot.type.array().optional(),
40
50
  })
51
+ export const typeZod: zod.ZodType<Account> = zod.object({
52
+ code: zod.string(),
53
+ label: zod.string(),
54
+ reference: zod.string(),
55
+ description: zod.string().optional(),
56
+ currency: zod.enum(isoly.Currency.values),
57
+ opening: Opening.typeZod.optional(),
58
+ closing: Closing.typeZod,
59
+ delta: Delta.typeZod,
60
+ warnings: zod.array(Warning.Snapshot.typeZod).optional(),
61
+ })
41
62
  }
@@ -1,4 +1,5 @@
1
1
  import { isoly } from "isoly"
2
+ import { zod } from "../../../zod"
2
3
  import { Base } from "./Base"
3
4
  import { Result } from "./Result"
4
5
 
@@ -16,4 +17,20 @@ export interface BankFeedIntegrity extends Base {
16
17
  }[]
17
18
  }
18
19
 
19
- export namespace BankFeedIntegrity {}
20
+ export namespace BankFeedIntegrity {
21
+ export const typeZod: zod.ZodType<BankFeedIntegrity> = Base.typeZod.extend({
22
+ check: zod.literal("bank feed integrity"),
23
+ accounts: zod.array(
24
+ zod.object({
25
+ code: zod.string(),
26
+ reference: zod.string(),
27
+ supplier: zod.string(),
28
+ opening: zod.object({ at: zod.string().refine(isoly.DateTime.is), balance: zod.number() }).optional(),
29
+ transaction: zod.object({ balance: zod.number() }).optional(),
30
+ closing: zod.object({ at: zod.string().refine(isoly.DateTime.is), balance: zod.number() }),
31
+ timestamp: zod.string(),
32
+ result: Result.typeZod,
33
+ })
34
+ ),
35
+ })
36
+ }
@@ -1,3 +1,4 @@
1
+ import { zod } from "../../../zod"
1
2
  import { Checks } from "./Checks"
2
3
  import { Result } from "./Result"
3
4
 
@@ -5,4 +6,9 @@ export interface Base {
5
6
  check: Checks
6
7
  result: Result
7
8
  }
8
- export namespace Base {}
9
+ export namespace Base {
10
+ export const typeZod = zod.object({
11
+ check: Checks.typeZod,
12
+ result: Result.typeZod,
13
+ }) satisfies zod.ZodType<Base>
14
+ }
@@ -1,4 +1,5 @@
1
1
  import { isly } from "isly"
2
+ import { zod } from "../../../zod"
2
3
 
3
4
  export type Checks = (typeof Checks.value)[number]
4
5
  export namespace Checks {
@@ -12,4 +13,5 @@ export namespace Checks {
12
13
  "unidentified funds", // Flags any received money not yet assigned to a customer
13
14
  ] as const
14
15
  export const type = isly.string(value)
16
+ export const typeZod: zod.ZodType<Checks> = zod.enum(value)
15
17
  }
@@ -1,3 +1,4 @@
1
+ import { zod } from "../../../zod"
1
2
  import { Base } from "./Base"
2
3
 
3
4
  export interface ExternalReconciliation extends Base {
@@ -6,4 +7,11 @@ export interface ExternalReconciliation extends Base {
6
7
  fiat: number
7
8
  discrepancy: number
8
9
  }
9
- export namespace ExternalReconciliation {}
10
+ export namespace ExternalReconciliation {
11
+ export const typeZod: zod.ZodType<ExternalReconciliation> = Base.typeZod.extend({
12
+ check: zod.literal("external reconciliation"),
13
+ counterbalance: zod.number(),
14
+ fiat: zod.number(),
15
+ discrepancy: zod.number(),
16
+ })
17
+ }
@@ -1,3 +1,4 @@
1
+ import { zod } from "../../../zod"
1
2
  import { Base as ResultBase } from "./Base"
2
3
 
3
4
  export interface InternalReconciliation extends ResultBase {
@@ -6,4 +7,11 @@ export interface InternalReconciliation extends ResultBase {
6
7
  emoney: number
7
8
  discrepancy: number
8
9
  }
9
- export namespace InternalReconciliation {}
10
+ export namespace InternalReconciliation {
11
+ export const typeZod: zod.ZodType<InternalReconciliation> = ResultBase.typeZod.extend({
12
+ check: zod.literal("internal reconciliation"),
13
+ counterbalance: zod.number(),
14
+ emoney: zod.number(),
15
+ discrepancy: zod.number(),
16
+ })
17
+ }
@@ -1,3 +1,4 @@
1
+ import { zod } from "../../../zod"
1
2
  import { Base } from "./Base"
2
3
 
3
4
  export interface LedgerIntegrity extends Base {
@@ -10,4 +11,15 @@ export interface LedgerIntegrity extends Base {
10
11
  passed: number
11
12
  total: number
12
13
  }
13
- export namespace LedgerIntegrity {}
14
+ export namespace LedgerIntegrity {
15
+ export const typeZod: zod.ZodType<LedgerIntegrity> = Base.typeZod.extend({
16
+ check: zod.literal("ledger integrity"),
17
+ opening: zod.object({ balance: zod.number() }),
18
+ ledger: zod.object({ change: zod.number() }),
19
+ closing: zod.object({ balance: zod.number() }),
20
+ failed: zod.array(zod.string()),
21
+ incomplete: zod.array(zod.string()),
22
+ passed: zod.number(),
23
+ total: zod.number(),
24
+ })
25
+ }
@@ -1,7 +1,13 @@
1
+ import { zod } from "../../../zod"
1
2
  import { Base } from "./Base"
2
3
 
3
4
  export interface Overdraft extends Base {
4
5
  check: "overdraft"
5
6
  overdrafts: { account: string; balance: number }[]
6
7
  }
7
- export namespace Overdraft {}
8
+ export namespace Overdraft {
9
+ export const typeZod: zod.ZodType<Overdraft> = Base.typeZod.extend({
10
+ check: zod.literal("overdraft"),
11
+ overdrafts: zod.array(zod.object({ account: zod.string(), balance: zod.number() })),
12
+ })
13
+ }
@@ -1,5 +1,8 @@
1
+ import { zod } from "../../../zod"
2
+
1
3
  export type Result = "passed" | "failed" | "incomplete"
2
4
  export namespace Result {
5
+ export const typeZod: zod.ZodType<Result> = zod.enum(["passed", "failed", "incomplete"])
3
6
  export const precedence: Record<Result, number> = {
4
7
  failed: 3,
5
8
  incomplete: 2,
@@ -1,3 +1,4 @@
1
+ import { zod } from "../../../zod"
1
2
  import { Base } from "./Base"
2
3
 
3
4
  export interface TransactionMatch extends Base {
@@ -6,4 +7,11 @@ export interface TransactionMatch extends Base {
6
7
  matched: number
7
8
  unmatched: string[]
8
9
  }
9
- export namespace TransactionMatch {}
10
+ export namespace TransactionMatch {
11
+ export const typeZod: zod.ZodType<TransactionMatch> = Base.typeZod.extend({
12
+ check: zod.literal("transaction match"),
13
+ total: zod.number(),
14
+ matched: zod.number(),
15
+ unmatched: zod.array(zod.string()),
16
+ })
17
+ }
@@ -1,3 +1,4 @@
1
+ import { zod } from "../../../zod"
1
2
  import { Base as ResultBase } from "./Base"
2
3
 
3
4
  export interface UnidentifiedFunds extends ResultBase {
@@ -5,4 +6,10 @@ export interface UnidentifiedFunds extends ResultBase {
5
6
  account: string
6
7
  balance: number
7
8
  }
8
- export namespace UnidentifiedFunds {}
9
+ export namespace UnidentifiedFunds {
10
+ export const typeZod: zod.ZodType<UnidentifiedFunds> = ResultBase.typeZod.extend({
11
+ check: zod.literal("unidentified funds"),
12
+ account: zod.string(),
13
+ balance: zod.number(),
14
+ })
15
+ }
@@ -1,3 +1,4 @@
1
+ import { zod } from "../../../zod"
1
2
  import { BankFeedIntegrity as CheckBankFeedIntegrity } from "./BankFeedIntegrity"
2
3
  import { Checks as CheckChecks } from "./Checks"
3
4
  import { ExternalReconciliation as CheckExternalReconciliation } from "./ExternalReconciliation"
@@ -19,11 +20,20 @@ export type Check =
19
20
  export namespace Check {
20
21
  export import Result = CheckResult
21
22
  export import Checks = CheckChecks
22
- export type BankFeedIntegrity = CheckBankFeedIntegrity
23
- export type ExternalReconciliation = CheckExternalReconciliation
24
- export type InternalReconciliation = CheckInternalReconciliation
25
- export type LedgerIntegrity = CheckLedgerIntegrity
26
- export type Overdraft = CheckOverdraft
27
- export type TransactionMatch = CheckTransactionMatch
28
- export type UnidentifiedFunds = CheckUnidentifiedFunds
23
+ export import BankFeedIntegrity = CheckBankFeedIntegrity
24
+ export import ExternalReconciliation = CheckExternalReconciliation
25
+ export import InternalReconciliation = CheckInternalReconciliation
26
+ export import LedgerIntegrity = CheckLedgerIntegrity
27
+ export import Overdraft = CheckOverdraft
28
+ export import TransactionMatch = CheckTransactionMatch
29
+ export import UnidentifiedFunds = CheckUnidentifiedFunds
30
+ export const typeZod: zod.ZodType<Check> = zod.union([
31
+ CheckBankFeedIntegrity.typeZod,
32
+ CheckExternalReconciliation.typeZod,
33
+ CheckInternalReconciliation.typeZod,
34
+ CheckLedgerIntegrity.typeZod,
35
+ CheckOverdraft.typeZod,
36
+ CheckTransactionMatch.typeZod,
37
+ CheckUnidentifiedFunds.typeZod,
38
+ ])
29
39
  }
@@ -1,6 +1,7 @@
1
1
  import { isoly } from "isoly"
2
2
  import { Balances } from "../../Balances"
3
3
  import { Supplier } from "../../Supplier"
4
+ import { zod } from "../../zod"
4
5
 
5
6
  export interface Emoney {
6
7
  organization: string
@@ -11,3 +12,14 @@ export interface Emoney {
11
12
  timestamp: isoly.DateTime
12
13
  balances: Balances
13
14
  }
15
+ export namespace Emoney {
16
+ export const typeZod: zod.ZodType<Emoney> = zod.object({
17
+ organization: zod.string(),
18
+ account: zod.string(),
19
+ created: zod.string().refine(isoly.DateTime.is).optional(),
20
+ supplier: Supplier.typeZod.optional(),
21
+ currencies: zod.array(zod.enum(isoly.Currency.values)).optional(),
22
+ timestamp: zod.string().refine(isoly.DateTime.is),
23
+ balances: Balances.typeZod,
24
+ })
25
+ }
@@ -1,5 +1,6 @@
1
1
  import { isoly } from "isoly"
2
2
  import { Supplier } from "../../Supplier"
3
+ import { zod } from "../../zod"
3
4
  import { Balance } from "../Balance"
4
5
 
5
6
  export interface Fiat {
@@ -13,3 +14,16 @@ export interface Fiat {
13
14
  reference: string
14
15
  description?: string
15
16
  }
17
+ export namespace Fiat {
18
+ export const typeZod: zod.ZodType<Fiat> = zod.object({
19
+ supplier: Supplier.typeZod,
20
+ account: zod.string(),
21
+ timestamp: zod.string().refine(isoly.DateTime.is),
22
+ type: zod.enum(["safeguarded", "unsafe", "other", "buffer"]),
23
+ balances: Balance.typeZod,
24
+ conditions: zod.object({ minimum: Balance.typeZod.optional() }).optional(),
25
+ label: zod.string().optional(),
26
+ reference: zod.string(),
27
+ description: zod.string().optional(),
28
+ })
29
+ }
@@ -1,4 +1,12 @@
1
+ import { zod } from "../../zod"
2
+
1
3
  export interface Reconciliation {
2
4
  correct: number
3
5
  incorrect: number
4
6
  }
7
+ export namespace Reconciliation {
8
+ export const typeZod: zod.ZodType<Reconciliation> = zod.object({
9
+ correct: zod.number(),
10
+ incorrect: zod.number(),
11
+ })
12
+ }
@@ -1,5 +1,6 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
+ import { zod } from "../../zod"
3
4
  import { Transaction } from "../Transaction"
4
5
 
5
6
  export namespace funding {
@@ -9,6 +10,10 @@ export namespace funding {
9
10
  cursor: isly.string(),
10
11
  amount: isly.number(),
11
12
  })
13
+ export const typeZod: zod.ZodType<Cursor> = zod.object({
14
+ cursor: zod.string(),
15
+ amount: zod.number(),
16
+ })
12
17
  export function fromTransaction(transaction: Transaction): string {
13
18
  return `${transaction.currency}|${isoly.DateTime.invert(transaction.created)}|${transaction.reference}`
14
19
  }
@@ -19,6 +24,7 @@ export namespace funding {
19
24
  export type Cursors = Partial<Record<isoly.Currency, Cursor>>
20
25
  export namespace Cursors {
21
26
  export const type = isly.record<Cursors>(isly.fromIs("isoly.Currency", isoly.Currency.is), Cursor.type)
27
+ export const typeZod: zod.ZodType<Cursors> = zod.partialRecord(zod.enum(isoly.Currency.values), Cursor.typeZod)
22
28
  export function updateAmount(settlement: Transaction, cursors: Cursors): Cursors {
23
29
  const cursor = cursors[settlement.currency]
24
30
  if (!cursor) {
@@ -3,6 +3,7 @@ import { Balance } from "../../Balance"
3
3
  import { Supplier } from "../../Supplier"
4
4
  import { Transaction } from "../../Transaction"
5
5
  import { Warning } from "../../Warning"
6
+ import { zod } from "../../zod"
6
7
  import { Account as SnapshotAccount } from "./Account"
7
8
  import { Check as SnapshotCheck } from "./Check"
8
9
  import { Emoney as SnapshotEmoney } from "./Emoney"
@@ -35,10 +36,38 @@ export namespace Snapshot {
35
36
  ledger?: { change: number }
36
37
  closing: { at: isoly.DateTime; balance: number }
37
38
  }
39
+ export namespace EmoneyAccounts {
40
+ export const typeZod = zod.object({
41
+ id: zod.string(),
42
+ organization: zod.string(),
43
+ opening: zod.object({ at: zod.string().refine(isoly.DateTime.is), balance: zod.number() }).optional(),
44
+ ledger: zod.object({ change: zod.number() }).optional(),
45
+ closing: zod.object({ at: zod.string().refine(isoly.DateTime.is), balance: zod.number() }),
46
+ }) satisfies zod.ZodType<EmoneyAccounts>
47
+ }
38
48
  export import funding = snapshotFunding
39
49
  export import Check = SnapshotCheck
40
- export type Reconciliation = SnapshotReconciliation
41
- export type Emoney = SnapshotEmoney
42
- export type Fiat = SnapshotFiat
50
+ export import Reconciliation = SnapshotReconciliation
51
+ export import Emoney = SnapshotEmoney
52
+ export import Fiat = SnapshotFiat
43
53
  export import Account = SnapshotAccount
54
+ export const typeZod: zod.ZodType<Snapshot> = zod.object({
55
+ version: zod.literal(version),
56
+ emoney: Balance.Extended.typeZod.extend({
57
+ total: zod.number().optional(),
58
+ accounts: zod.array(EmoneyAccounts.typeZod),
59
+ }),
60
+ created: zod.string().refine(isoly.DateTime.is),
61
+ currency: zod.enum(isoly.Currency.values),
62
+ supplier: Supplier.typeZod,
63
+ fiat: zod.object({
64
+ total: zod.number(),
65
+ accounts: zod.array(Account.typeZod),
66
+ }),
67
+ counterbalance: zod.number().optional(),
68
+ notes: zod.array(Transaction.Note.typeZod),
69
+ checks: zod.array(Check.typeZod),
70
+ result: Check.Result.typeZod,
71
+ warnings: zod.array(Warning.Snapshot.typeZod).optional(),
72
+ })
44
73
  }
@@ -1,6 +1,7 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
3
  import { Rail } from "../../Rail"
4
+ import { zod } from "../../zod"
4
5
 
5
6
  export interface Creatable {
6
7
  creditor: Rail.Address
@@ -17,4 +18,11 @@ export namespace Creatable {
17
18
  description: isly.string(),
18
19
  external: isly.string().optional(),
19
20
  })
21
+ export const typeZod = zod.object({
22
+ creditor: Rail.Address.typeZod,
23
+ currency: zod.enum(isoly.Currency.values),
24
+ amount: zod.number(),
25
+ description: zod.string(),
26
+ external: zod.string().optional(),
27
+ }) satisfies zod.ZodType<Creatable>
20
28
  }
@@ -2,6 +2,7 @@ import { cryptly } from "cryptly"
2
2
  import { isoly } from "isoly"
3
3
  import { isly } from "isly"
4
4
  import { Rail } from "../../Rail"
5
+ import { zod } from "../../zod"
5
6
  import { Creatable as TransactionCreatable } from "./Creatable"
6
7
 
7
8
  export interface Transaction extends TransactionCreatable {
@@ -21,4 +22,10 @@ export namespace Transaction {
21
22
  debtor: Rail.Address.type,
22
23
  id: isly.string().optional(),
23
24
  })
25
+ export const typeZod: zod.ZodType<Transaction> = Creatable.typeZod.extend({
26
+ reference: zod.string().refine(cryptly.Identifier.is),
27
+ created: zod.string(),
28
+ debtor: Rail.Address.typeZod,
29
+ id: zod.string().optional(),
30
+ })
24
31
  }
@@ -6,6 +6,7 @@ export type Result = {
6
6
  };
7
7
  export declare namespace Balance {
8
8
  const type: import("isly/dist/cjs/Type").Type<Partial<Record<"AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL", number>>>;
9
+ const typeZod: import("zod").ZodType<Partial<Record<"AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL", number>>, unknown, import("zod/v4/core").$ZodTypeInternals<Partial<Record<"AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BOV" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHE" | "CHF" | "CHW" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "CRC" | "CUC" | "CUP" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KPW" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MXV" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STN" | "SVC" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "USN" | "UYI" | "UYU" | "UYW" | "UZS" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XAG" | "XAU" | "XBA" | "XBB" | "XBC" | "XBD" | "XCD" | "XDR" | "XOF" | "XPD" | "XPF" | "XPT" | "XSU" | "XTS" | "XUA" | "XXX" | "YER" | "ZAR" | "ZMW" | "ZWL", number>>, unknown>>;
9
10
  }
10
11
  export declare namespace Result {
11
12
  function is(value: Result | any): value is Result;
@@ -5,6 +5,7 @@ const Amounts_1 = require("../../Amounts");
5
5
  var Balance;
6
6
  (function (Balance) {
7
7
  Balance.type = Amounts_1.Amounts.type;
8
+ Balance.typeZod = Amounts_1.Amounts.typeZod;
8
9
  })(Balance || (exports.Balance = Balance = {}));
9
10
  var Result;
10
11
  (function (Result) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Treasury/Balance/index.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AAMvC,IAAiB,OAAO,CAEvB;AAFD,WAAiB,OAAO;IACV,YAAI,GAAG,iBAAO,CAAC,IAAI,CAAA;AACjC,CAAC,EAFgB,OAAO,uBAAP,OAAO,QAEvB;AACD,IAAiB,MAAM,CAItB;AAJD,WAAiB,MAAM;IACtB,SAAgB,EAAE,CAAC,KAAmB;QACrC,OAAO,KAAK,IAAI,OAAO,KAAK,IAAI,QAAQ,IAAI,OAAO,KAAK,CAAC,OAAO,IAAI,QAAQ,IAAI,OAAO,KAAK,CAAC,OAAO,IAAI,QAAQ,CAAA;IACjH,CAAC;IAFe,SAAE,KAEjB,CAAA;AACF,CAAC,EAJgB,MAAM,sBAAN,MAAM,QAItB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Treasury/Balance/index.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AAMvC,IAAiB,OAAO,CAGvB;AAHD,WAAiB,OAAO;IACV,YAAI,GAAG,iBAAO,CAAC,IAAI,CAAA;IACnB,eAAO,GAAG,iBAAO,CAAC,OAAO,CAAA;AACvC,CAAC,EAHgB,OAAO,uBAAP,OAAO,QAGvB;AACD,IAAiB,MAAM,CAItB;AAJD,WAAiB,MAAM;IACtB,SAAgB,EAAE,CAAC,KAAmB;QACrC,OAAO,KAAK,IAAI,OAAO,KAAK,IAAI,QAAQ,IAAI,OAAO,KAAK,CAAC,OAAO,IAAI,QAAQ,IAAI,OAAO,KAAK,CAAC,OAAO,IAAI,QAAQ,CAAA;IACjH,CAAC;IAFe,SAAE,KAEjB,CAAA;AACF,CAAC,EAJgB,MAAM,sBAAN,MAAM,QAItB"}
@@ -1,5 +1,6 @@
1
1
  import { isoly } from "isoly";
2
2
  import { Warning } from "../../Warning";
3
+ import { zod } from "../../zod";
3
4
  import { Transaction } from "../Transaction";
4
5
  export interface Account {
5
6
  code: string;
@@ -19,10 +20,12 @@ export declare namespace Account {
19
20
  };
20
21
  namespace Opening {
21
22
  const type: import("isly/dist/cjs/object").IslyObject<Opening, object>;
23
+ const typeZod: zod.ZodType<Opening>;
22
24
  }
23
25
  type Closing = Opening;
24
26
  namespace Closing {
25
27
  const type: import("isly/dist/cjs/object").IslyObject<Opening, object>;
28
+ const typeZod: zod.ZodType<Opening, unknown, zod.z.core.$ZodTypeInternals<Opening, unknown>>;
26
29
  }
27
30
  type Delta = {
28
31
  amount: number;
@@ -30,6 +33,8 @@ export declare namespace Account {
30
33
  };
31
34
  namespace Delta {
32
35
  const type: import("isly/dist/cjs/object").IslyObject<Delta, object>;
36
+ const typeZod: zod.ZodType<Delta>;
33
37
  }
34
38
  const type: import("isly/dist/cjs/object").IslyObject<Account, object>;
39
+ const typeZod: zod.ZodType<Account>;
35
40
  }
@@ -1,22 +1,33 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Account = void 0;
4
+ const isoly_1 = require("isoly");
4
5
  const isly_1 = require("isly");
5
6
  const Warning_1 = require("../../Warning");
7
+ const zod_1 = require("../../zod");
6
8
  const Transaction_1 = require("../Transaction");
7
9
  var Account;
8
10
  (function (Account) {
9
11
  let Opening;
10
12
  (function (Opening) {
11
13
  Opening.type = isly_1.isly.object({ at: isly_1.isly.string(), balance: isly_1.isly.number() });
14
+ Opening.typeZod = zod_1.zod.object({
15
+ at: zod_1.zod.string().refine(isoly_1.isoly.DateTime.is),
16
+ balance: zod_1.zod.number(),
17
+ });
12
18
  })(Opening = Account.Opening || (Account.Opening = {}));
13
19
  let Closing;
14
20
  (function (Closing) {
15
21
  Closing.type = Opening.type;
22
+ Closing.typeZod = Opening.typeZod;
16
23
  })(Closing = Account.Closing || (Account.Closing = {}));
17
24
  let Delta;
18
25
  (function (Delta) {
19
26
  Delta.type = isly_1.isly.object({ amount: isly_1.isly.number(), transactions: Transaction_1.Transaction.type.array() });
27
+ Delta.typeZod = zod_1.zod.object({
28
+ amount: zod_1.zod.number(),
29
+ transactions: zod_1.zod.array(Transaction_1.Transaction.typeZod),
30
+ });
20
31
  })(Delta = Account.Delta || (Account.Delta = {}));
21
32
  Account.type = isly_1.isly.object({
22
33
  code: isly_1.isly.string(),
@@ -29,5 +40,16 @@ var Account;
29
40
  delta: Delta.type,
30
41
  warnings: Warning_1.Warning.Snapshot.type.array().optional(),
31
42
  });
43
+ Account.typeZod = zod_1.zod.object({
44
+ code: zod_1.zod.string(),
45
+ label: zod_1.zod.string(),
46
+ reference: zod_1.zod.string(),
47
+ description: zod_1.zod.string().optional(),
48
+ currency: zod_1.zod.enum(isoly_1.isoly.Currency.values),
49
+ opening: Opening.typeZod.optional(),
50
+ closing: Closing.typeZod,
51
+ delta: Delta.typeZod,
52
+ warnings: zod_1.zod.array(Warning_1.Warning.Snapshot.typeZod).optional(),
53
+ });
32
54
  })(Account || (exports.Account = Account = {}));
33
55
  //# sourceMappingURL=Account.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Account.js","sourceRoot":"","sources":["../../../../Treasury/Snapshot/Account.ts"],"names":[],"mappings":";;;AACA,+BAA2B;AAC3B,2CAAuC;AACvC,gDAA4C;AAa5C,IAAiB,OAAO,CAwBvB;AAxBD,WAAiB,OAAO;IAEvB,IAAiB,OAAO,CAEvB;IAFD,WAAiB,OAAO;QACV,YAAI,GAAG,WAAI,CAAC,MAAM,CAAU,EAAE,EAAE,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IACxF,CAAC,EAFgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAEvB;IAED,IAAiB,OAAO,CAEvB;IAFD,WAAiB,OAAO;QACV,YAAI,GAAG,OAAO,CAAC,IAAI,CAAA;IACjC,CAAC,EAFgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAEvB;IAED,IAAiB,KAAK,CAErB;IAFD,WAAiB,KAAK;QACR,UAAI,GAAG,WAAI,CAAC,MAAM,CAAQ,EAAE,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,YAAY,EAAE,yBAAW,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IAC1G,CAAC,EAFgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAErB;IACY,YAAI,GAAG,WAAI,CAAC,MAAM,CAAU;QACxC,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;QACnB,KAAK,EAAE,WAAI,CAAC,MAAM,EAAE;QACpB,SAAS,EAAE,WAAI,CAAC,MAAM,EAAE;QACxB,WAAW,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,QAAQ,EAAE,WAAI,CAAC,MAAM,EAAE;QACvB,OAAO,EAAE,OAAO,CAAC,IAAI;QACrB,OAAO,EAAE,OAAO,CAAC,IAAI;QACrB,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,QAAQ,EAAE,iBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KAClD,CAAC,CAAA;AACH,CAAC,EAxBgB,OAAO,uBAAP,OAAO,QAwBvB"}
1
+ {"version":3,"file":"Account.js","sourceRoot":"","sources":["../../../../Treasury/Snapshot/Account.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAC3B,2CAAuC;AACvC,mCAA+B;AAC/B,gDAA4C;AAa5C,IAAiB,OAAO,CA4CvB;AA5CD,WAAiB,OAAO;IAEvB,IAAiB,OAAO,CAMvB;IAND,WAAiB,OAAO;QACV,YAAI,GAAG,WAAI,CAAC,MAAM,CAAU,EAAE,EAAE,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;QAC1E,eAAO,GAAyB,SAAG,CAAC,MAAM,CAAC;YACvD,EAAE,EAAE,SAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1C,OAAO,EAAE,SAAG,CAAC,MAAM,EAAE;SACrB,CAAC,CAAA;IACH,CAAC,EANgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAMvB;IAED,IAAiB,OAAO,CAGvB;IAHD,WAAiB,OAAO;QACV,YAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QACnB,eAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IACvC,CAAC,EAHgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAGvB;IAED,IAAiB,KAAK,CAMrB;IAND,WAAiB,KAAK;QACR,UAAI,GAAG,WAAI,CAAC,MAAM,CAAQ,EAAE,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,YAAY,EAAE,yBAAW,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QAC5F,aAAO,GAAuB,SAAG,CAAC,MAAM,CAAC;YACrD,MAAM,EAAE,SAAG,CAAC,MAAM,EAAE;YACpB,YAAY,EAAE,SAAG,CAAC,KAAK,CAAC,yBAAW,CAAC,OAAO,CAAC;SAC5C,CAAC,CAAA;IACH,CAAC,EANgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAMrB;IACY,YAAI,GAAG,WAAI,CAAC,MAAM,CAAU;QACxC,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;QACnB,KAAK,EAAE,WAAI,CAAC,MAAM,EAAE;QACpB,SAAS,EAAE,WAAI,CAAC,MAAM,EAAE;QACxB,WAAW,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,QAAQ,EAAE,WAAI,CAAC,MAAM,EAAE;QACvB,OAAO,EAAE,OAAO,CAAC,IAAI;QACrB,OAAO,EAAE,OAAO,CAAC,IAAI;QACrB,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,QAAQ,EAAE,iBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KAClD,CAAC,CAAA;IACW,eAAO,GAAyB,SAAG,CAAC,MAAM,CAAC;QACvD,IAAI,EAAE,SAAG,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,SAAG,CAAC,MAAM,EAAE;QACnB,SAAS,EAAE,SAAG,CAAC,MAAM,EAAE;QACvB,WAAW,EAAE,SAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACpC,QAAQ,EAAE,SAAG,CAAC,IAAI,CAAC,aAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;QACzC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE;QACnC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,KAAK,EAAE,KAAK,CAAC,OAAO;QACpB,QAAQ,EAAE,SAAG,CAAC,KAAK,CAAC,iBAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;KACxD,CAAC,CAAA;AACH,CAAC,EA5CgB,OAAO,uBAAP,OAAO,QA4CvB"}
@@ -1,4 +1,5 @@
1
1
  import { isoly } from "isoly";
2
+ import { zod } from "../../../zod";
2
3
  import { Base } from "./Base";
3
4
  import { Result } from "./Result";
4
5
  export interface BankFeedIntegrity extends Base {
@@ -22,4 +23,6 @@ export interface BankFeedIntegrity extends Base {
22
23
  result: Result;
23
24
  }[];
24
25
  }
25
- export declare namespace BankFeedIntegrity { }
26
+ export declare namespace BankFeedIntegrity {
27
+ const typeZod: zod.ZodType<BankFeedIntegrity>;
28
+ }
@@ -1,3 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BankFeedIntegrity = void 0;
4
+ const isoly_1 = require("isoly");
5
+ const zod_1 = require("../../../zod");
6
+ const Base_1 = require("./Base");
7
+ const Result_1 = require("./Result");
8
+ var BankFeedIntegrity;
9
+ (function (BankFeedIntegrity) {
10
+ BankFeedIntegrity.typeZod = Base_1.Base.typeZod.extend({
11
+ check: zod_1.zod.literal("bank feed integrity"),
12
+ accounts: zod_1.zod.array(zod_1.zod.object({
13
+ code: zod_1.zod.string(),
14
+ reference: zod_1.zod.string(),
15
+ supplier: zod_1.zod.string(),
16
+ opening: zod_1.zod.object({ at: zod_1.zod.string().refine(isoly_1.isoly.DateTime.is), balance: zod_1.zod.number() }).optional(),
17
+ transaction: zod_1.zod.object({ balance: zod_1.zod.number() }).optional(),
18
+ closing: zod_1.zod.object({ at: zod_1.zod.string().refine(isoly_1.isoly.DateTime.is), balance: zod_1.zod.number() }),
19
+ timestamp: zod_1.zod.string(),
20
+ result: Result_1.Result.typeZod,
21
+ })),
22
+ });
23
+ })(BankFeedIntegrity || (exports.BankFeedIntegrity = BankFeedIntegrity = {}));
3
24
  //# sourceMappingURL=BankFeedIntegrity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BankFeedIntegrity.js","sourceRoot":"","sources":["../../../../../Treasury/Snapshot/Check/BankFeedIntegrity.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"BankFeedIntegrity.js","sourceRoot":"","sources":["../../../../../Treasury/Snapshot/Check/BankFeedIntegrity.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,sCAAkC;AAClC,iCAA6B;AAC7B,qCAAiC;AAgBjC,IAAiB,iBAAiB,CAgBjC;AAhBD,WAAiB,iBAAiB;IACpB,yBAAO,GAAmC,WAAI,CAAC,OAAO,CAAC,MAAM,CAAC;QAC1E,KAAK,EAAE,SAAG,CAAC,OAAO,CAAC,qBAAqB,CAAC;QACzC,QAAQ,EAAE,SAAG,CAAC,KAAK,CAClB,SAAG,CAAC,MAAM,CAAC;YACV,IAAI,EAAE,SAAG,CAAC,MAAM,EAAE;YAClB,SAAS,EAAE,SAAG,CAAC,MAAM,EAAE;YACvB,QAAQ,EAAE,SAAG,CAAC,MAAM,EAAE;YACtB,OAAO,EAAE,SAAG,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,SAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,SAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;YACrG,WAAW,EAAE,SAAG,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,SAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;YAC7D,OAAO,EAAE,SAAG,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,SAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,SAAG,CAAC,MAAM,EAAE,EAAE,CAAC;YAC1F,SAAS,EAAE,SAAG,CAAC,MAAM,EAAE;YACvB,MAAM,EAAE,eAAM,CAAC,OAAO;SACtB,CAAC,CACF;KACD,CAAC,CAAA;AACH,CAAC,EAhBgB,iBAAiB,iCAAjB,iBAAiB,QAgBjC"}
@@ -1,7 +1,13 @@
1
+ import { zod } from "../../../zod";
1
2
  import { Checks } from "./Checks";
2
3
  import { Result } from "./Result";
3
4
  export interface Base {
4
5
  check: Checks;
5
6
  result: Result;
6
7
  }
7
- export declare namespace Base { }
8
+ export declare namespace Base {
9
+ const typeZod: zod.ZodObject<{
10
+ check: zod.ZodType<"overdraft" | "bank feed integrity" | "external reconciliation" | "internal reconciliation" | "ledger integrity" | "transaction match" | "unidentified funds", unknown, zod.z.core.$ZodTypeInternals<"overdraft" | "bank feed integrity" | "external reconciliation" | "internal reconciliation" | "ledger integrity" | "transaction match" | "unidentified funds", unknown>>;
11
+ result: zod.ZodType<Result, unknown, zod.z.core.$ZodTypeInternals<Result, unknown>>;
12
+ }, zod.z.core.$strip>;
13
+ }