@pax2pay/model-banking 0.1.669 → 0.1.671

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 (283) hide show
  1. package/Account/Details.ts +6 -6
  2. package/Account/index.ts +3 -3
  3. package/Acquirer/index.ts +3 -3
  4. package/Amount.ts +2 -2
  5. package/Amounts.ts +2 -2
  6. package/Balances.ts +2 -2
  7. package/Card/Creatable.ts +1 -6
  8. package/Card/index.ts +4 -4
  9. package/Merchant/index.ts +2 -2
  10. package/Operation/Creatable.ts +2 -2
  11. package/Organization/Contact/Address/{General.ts → Default.ts} +2 -3
  12. package/Organization/Contact/Address/GB.ts +1 -2
  13. package/Organization/Contact/Address/SE.ts +1 -1
  14. package/Organization/Contact/Address/index.ts +2 -2
  15. package/Organization/Contact/Addresses.ts +1 -1
  16. package/Organization/Contact/Name.ts +1 -1
  17. package/Organization/Contact/Phone.ts +3 -3
  18. package/Organization/Contact/index.ts +2 -2
  19. package/Organization/Creatable.ts +1 -9
  20. package/Organization/index.ts +4 -4
  21. package/Rail/index.ts +1 -0
  22. package/Rule/index.ts +1 -1
  23. package/Settlement/Totals.ts +2 -2
  24. package/Transaction/Creatable.ts +2 -2
  25. package/Transaction/Incoming.ts +2 -2
  26. package/Transaction/PreTransaction/Base.ts +2 -2
  27. package/Transaction/PreTransaction/Incoming.ts +2 -2
  28. package/Transaction/index.ts +2 -2
  29. package/Treasury/Snapshot/Account.ts +2 -2
  30. package/Treasury/Snapshot/Emoney.ts +2 -2
  31. package/Treasury/Snapshot/funding.ts +2 -2
  32. package/Treasury/Snapshot/index.ts +2 -2
  33. package/Treasury/Transaction/Creatable.ts +2 -2
  34. package/Warning/Issue.ts +2 -2
  35. package/Warning/Settlement/NegativeAmount.ts +2 -2
  36. package/Warning/Snapshot/DeltaFiat.ts +2 -2
  37. package/Warning/Snapshot/MissingBuffer.ts +2 -2
  38. package/Warning/Snapshot/MissingEmoney.ts +2 -2
  39. package/Warning/Snapshot/MissingFiat.ts +2 -2
  40. package/Warning/Snapshot/MissingTransaction.ts +2 -2
  41. package/Warning/Snapshot/Overdraft.ts +2 -2
  42. package/Warning/Snapshot/Reconciliation.ts +2 -2
  43. package/Warning/Snapshot/StaleFiat.ts +2 -2
  44. package/dist/cjs/Account/Details.d.ts +2 -688
  45. package/dist/cjs/Account/Details.js +3 -3
  46. package/dist/cjs/Account/Details.js.map +1 -1
  47. package/dist/cjs/Account/index.d.ts +3 -508
  48. package/dist/cjs/Account/index.js +3 -4
  49. package/dist/cjs/Account/index.js.map +1 -1
  50. package/dist/cjs/Acquirer/index.d.ts +1 -7
  51. package/dist/cjs/Acquirer/index.js +1 -1
  52. package/dist/cjs/Acquirer/index.js.map +1 -1
  53. package/dist/cjs/Amount.d.ts +1 -181
  54. package/dist/cjs/Amount.js +1 -1
  55. package/dist/cjs/Amount.js.map +1 -1
  56. package/dist/cjs/Amounts.js +1 -1
  57. package/dist/cjs/Amounts.js.map +1 -1
  58. package/dist/cjs/Backup/Rule.d.ts +1 -1
  59. package/dist/cjs/Balances.js +1 -1
  60. package/dist/cjs/Balances.js.map +1 -1
  61. package/dist/cjs/Card/Changeable.d.ts +1 -181
  62. package/dist/cjs/Card/Creatable.d.ts +1 -407
  63. package/dist/cjs/Card/Creatable.js +0 -3
  64. package/dist/cjs/Card/Creatable.js.map +1 -1
  65. package/dist/cjs/Card/Operation/Card.d.ts +1 -181
  66. package/dist/cjs/Card/Operation/index.d.ts +1 -181
  67. package/dist/cjs/Card/index.d.ts +1 -811
  68. package/dist/cjs/Card/index.js +3 -3
  69. package/dist/cjs/Card/index.js.map +1 -1
  70. package/dist/cjs/Merchant/index.js +1 -2
  71. package/dist/cjs/Merchant/index.js.map +1 -1
  72. package/dist/cjs/Operation/Creatable.js +1 -1
  73. package/dist/cjs/Operation/Creatable.js.map +1 -1
  74. package/dist/cjs/Organization/Changeable.d.ts +4 -90
  75. package/dist/cjs/Organization/Contact/Address/{General.d.ts → Default.d.ts} +1 -8
  76. package/dist/cjs/Organization/Contact/Address/{General.js → Default.js} +1 -1
  77. package/dist/cjs/Organization/Contact/Address/Default.js.map +1 -0
  78. package/dist/cjs/Organization/Contact/Address/GB.d.ts +1 -7
  79. package/dist/cjs/Organization/Contact/Address/GB.js.map +1 -1
  80. package/dist/cjs/Organization/Contact/Address/SE.d.ts +1 -6
  81. package/dist/cjs/Organization/Contact/Address/SE.js.map +1 -1
  82. package/dist/cjs/Organization/Contact/Address/index.d.ts +3 -21
  83. package/dist/cjs/Organization/Contact/Address/index.js +3 -3
  84. package/dist/cjs/Organization/Contact/Address/index.js.map +1 -1
  85. package/dist/cjs/Organization/Contact/Addresses.d.ts +1 -78
  86. package/dist/cjs/Organization/Contact/Addresses.js.map +1 -1
  87. package/dist/cjs/Organization/Contact/Creatable.d.ts +4 -90
  88. package/dist/cjs/Organization/Contact/Name.d.ts +1 -4
  89. package/dist/cjs/Organization/Contact/Name.js.map +1 -1
  90. package/dist/cjs/Organization/Contact/Phone.d.ts +1 -4
  91. package/dist/cjs/Organization/Contact/Phone.js +1 -1
  92. package/dist/cjs/Organization/Contact/Phone.js.map +1 -1
  93. package/dist/cjs/Organization/Contact/index.d.ts +1 -93
  94. package/dist/cjs/Organization/Contact/index.js +1 -1
  95. package/dist/cjs/Organization/Contact/index.js.map +1 -1
  96. package/dist/cjs/Organization/Creatable.d.ts +2 -112
  97. package/dist/cjs/Organization/Creatable.js +0 -5
  98. package/dist/cjs/Organization/Creatable.js.map +1 -1
  99. package/dist/cjs/Organization/index.d.ts +1 -121
  100. package/dist/cjs/Organization/index.js +3 -3
  101. package/dist/cjs/Organization/index.js.map +1 -1
  102. package/dist/cjs/Rail/Address/Card.d.ts +1 -7
  103. package/dist/cjs/Rail/Address/index.d.ts +1 -7
  104. package/dist/cjs/Rail/index.d.ts +3 -2
  105. package/dist/cjs/Rail/index.js +1 -0
  106. package/dist/cjs/Rail/index.js.map +1 -1
  107. package/dist/cjs/Rule/index.d.ts +1 -1
  108. package/dist/cjs/Settlement/Entry/Creatable.d.ts +4 -550
  109. package/dist/cjs/Settlement/Totals.js +1 -1
  110. package/dist/cjs/Settlement/Totals.js.map +1 -1
  111. package/dist/cjs/Transaction/Amount/index.d.ts +2 -362
  112. package/dist/cjs/Transaction/Creatable.d.ts +7 -739
  113. package/dist/cjs/Transaction/Creatable.js +1 -1
  114. package/dist/cjs/Transaction/Creatable.js.map +1 -1
  115. package/dist/cjs/Transaction/Exchange.d.ts +2 -362
  116. package/dist/cjs/Transaction/PreTransaction/Authorization.d.ts +4 -370
  117. package/dist/cjs/Transaction/PreTransaction/Base.d.ts +3 -369
  118. package/dist/cjs/Transaction/PreTransaction/Base.js +1 -1
  119. package/dist/cjs/Transaction/PreTransaction/Base.js.map +1 -1
  120. package/dist/cjs/Transaction/PreTransaction/Incoming.d.ts +5 -376
  121. package/dist/cjs/Transaction/PreTransaction/Incoming.js +1 -1
  122. package/dist/cjs/Transaction/PreTransaction/Incoming.js.map +1 -1
  123. package/dist/cjs/Transaction/PreTransaction/Outgoing.d.ts +3 -369
  124. package/dist/cjs/Transaction/PreTransaction/index.d.ts +12 -1115
  125. package/dist/cjs/Transaction/index.d.ts +23 -1141
  126. package/dist/cjs/Transaction/index.js +1 -1
  127. package/dist/cjs/Transaction/index.js.map +1 -1
  128. package/dist/cjs/Treasury/Snapshot/Account.js +1 -1
  129. package/dist/cjs/Treasury/Snapshot/Account.js.map +1 -1
  130. package/dist/cjs/Treasury/Snapshot/Emoney.js +1 -1
  131. package/dist/cjs/Treasury/Snapshot/Emoney.js.map +1 -1
  132. package/dist/cjs/Treasury/Snapshot/funding.js +1 -1
  133. package/dist/cjs/Treasury/Snapshot/funding.js.map +1 -1
  134. package/dist/cjs/Treasury/Snapshot/index.js +1 -1
  135. package/dist/cjs/Treasury/Snapshot/index.js.map +1 -1
  136. package/dist/cjs/Treasury/Transaction/Creatable.d.ts +1 -7
  137. package/dist/cjs/Treasury/Transaction/Creatable.js +1 -1
  138. package/dist/cjs/Treasury/Transaction/Creatable.js.map +1 -1
  139. package/dist/cjs/Warning/Issue.js +1 -1
  140. package/dist/cjs/Warning/Issue.js.map +1 -1
  141. package/dist/cjs/Warning/Settlement/NegativeAmount.js +1 -1
  142. package/dist/cjs/Warning/Settlement/NegativeAmount.js.map +1 -1
  143. package/dist/cjs/Warning/Snapshot/DeltaFiat.js +1 -2
  144. package/dist/cjs/Warning/Snapshot/DeltaFiat.js.map +1 -1
  145. package/dist/cjs/Warning/Snapshot/MissingBuffer.js +1 -1
  146. package/dist/cjs/Warning/Snapshot/MissingBuffer.js.map +1 -1
  147. package/dist/cjs/Warning/Snapshot/MissingEmoney.js +1 -2
  148. package/dist/cjs/Warning/Snapshot/MissingEmoney.js.map +1 -1
  149. package/dist/cjs/Warning/Snapshot/MissingFiat.js +1 -2
  150. package/dist/cjs/Warning/Snapshot/MissingFiat.js.map +1 -1
  151. package/dist/cjs/Warning/Snapshot/MissingTransaction.js +1 -2
  152. package/dist/cjs/Warning/Snapshot/MissingTransaction.js.map +1 -1
  153. package/dist/cjs/Warning/Snapshot/Overdraft.js +1 -1
  154. package/dist/cjs/Warning/Snapshot/Overdraft.js.map +1 -1
  155. package/dist/cjs/Warning/Snapshot/Reconciliation.js +1 -2
  156. package/dist/cjs/Warning/Snapshot/Reconciliation.js.map +1 -1
  157. package/dist/cjs/Warning/Snapshot/StaleFiat.js +1 -1
  158. package/dist/cjs/Warning/Snapshot/StaleFiat.js.map +1 -1
  159. package/dist/cjs/zod.d.ts +664 -0
  160. package/dist/cjs/zod.js +4 -0
  161. package/dist/cjs/zod.js.map +1 -1
  162. package/dist/mjs/Account/Details.d.ts +2 -688
  163. package/dist/mjs/Account/Details.js +4 -4
  164. package/dist/mjs/Account/Details.js.map +1 -1
  165. package/dist/mjs/Account/index.d.ts +3 -508
  166. package/dist/mjs/Account/index.js +3 -4
  167. package/dist/mjs/Account/index.js.map +1 -1
  168. package/dist/mjs/Acquirer/index.d.ts +1 -7
  169. package/dist/mjs/Acquirer/index.js +2 -2
  170. package/dist/mjs/Acquirer/index.js.map +1 -1
  171. package/dist/mjs/Amount.d.ts +1 -181
  172. package/dist/mjs/Amount.js +2 -2
  173. package/dist/mjs/Amount.js.map +1 -1
  174. package/dist/mjs/Amounts.js +2 -2
  175. package/dist/mjs/Amounts.js.map +1 -1
  176. package/dist/mjs/Backup/Rule.d.ts +1 -1
  177. package/dist/mjs/Balances.js +2 -2
  178. package/dist/mjs/Balances.js.map +1 -1
  179. package/dist/mjs/Card/Changeable.d.ts +1 -181
  180. package/dist/mjs/Card/Creatable.d.ts +1 -407
  181. package/dist/mjs/Card/Creatable.js +0 -3
  182. package/dist/mjs/Card/Creatable.js.map +1 -1
  183. package/dist/mjs/Card/Operation/Card.d.ts +1 -181
  184. package/dist/mjs/Card/Operation/index.d.ts +1 -181
  185. package/dist/mjs/Card/index.d.ts +1 -811
  186. package/dist/mjs/Card/index.js +3 -3
  187. package/dist/mjs/Card/index.js.map +1 -1
  188. package/dist/mjs/Merchant/index.js +2 -3
  189. package/dist/mjs/Merchant/index.js.map +1 -1
  190. package/dist/mjs/Operation/Creatable.js +2 -2
  191. package/dist/mjs/Operation/Creatable.js.map +1 -1
  192. package/dist/mjs/Organization/Changeable.d.ts +4 -90
  193. package/dist/mjs/Organization/Contact/Address/{General.d.ts → Default.d.ts} +1 -8
  194. package/dist/mjs/Organization/Contact/Address/{General.js → Default.js} +1 -1
  195. package/dist/mjs/Organization/Contact/Address/Default.js.map +1 -0
  196. package/dist/mjs/Organization/Contact/Address/GB.d.ts +1 -7
  197. package/dist/mjs/Organization/Contact/Address/GB.js.map +1 -1
  198. package/dist/mjs/Organization/Contact/Address/SE.d.ts +1 -6
  199. package/dist/mjs/Organization/Contact/Address/SE.js.map +1 -1
  200. package/dist/mjs/Organization/Contact/Address/index.d.ts +3 -21
  201. package/dist/mjs/Organization/Contact/Address/index.js +1 -1
  202. package/dist/mjs/Organization/Contact/Address/index.js.map +1 -1
  203. package/dist/mjs/Organization/Contact/Addresses.d.ts +1 -78
  204. package/dist/mjs/Organization/Contact/Addresses.js.map +1 -1
  205. package/dist/mjs/Organization/Contact/Creatable.d.ts +4 -90
  206. package/dist/mjs/Organization/Contact/Name.d.ts +1 -4
  207. package/dist/mjs/Organization/Contact/Name.js.map +1 -1
  208. package/dist/mjs/Organization/Contact/Phone.d.ts +1 -4
  209. package/dist/mjs/Organization/Contact/Phone.js +2 -2
  210. package/dist/mjs/Organization/Contact/Phone.js.map +1 -1
  211. package/dist/mjs/Organization/Contact/index.d.ts +1 -93
  212. package/dist/mjs/Organization/Contact/index.js +1 -1
  213. package/dist/mjs/Organization/Contact/index.js.map +1 -1
  214. package/dist/mjs/Organization/Creatable.d.ts +2 -112
  215. package/dist/mjs/Organization/Creatable.js +0 -5
  216. package/dist/mjs/Organization/Creatable.js.map +1 -1
  217. package/dist/mjs/Organization/index.d.ts +1 -121
  218. package/dist/mjs/Organization/index.js +3 -3
  219. package/dist/mjs/Organization/index.js.map +1 -1
  220. package/dist/mjs/Rail/Address/Card.d.ts +1 -7
  221. package/dist/mjs/Rail/Address/index.d.ts +1 -7
  222. package/dist/mjs/Rail/index.d.ts +3 -2
  223. package/dist/mjs/Rail/index.js +1 -0
  224. package/dist/mjs/Rail/index.js.map +1 -1
  225. package/dist/mjs/Rule/index.d.ts +1 -1
  226. package/dist/mjs/Settlement/Entry/Creatable.d.ts +4 -550
  227. package/dist/mjs/Settlement/Totals.js +2 -2
  228. package/dist/mjs/Settlement/Totals.js.map +1 -1
  229. package/dist/mjs/Transaction/Amount/index.d.ts +2 -362
  230. package/dist/mjs/Transaction/Creatable.d.ts +7 -739
  231. package/dist/mjs/Transaction/Creatable.js +2 -2
  232. package/dist/mjs/Transaction/Creatable.js.map +1 -1
  233. package/dist/mjs/Transaction/Exchange.d.ts +2 -362
  234. package/dist/mjs/Transaction/PreTransaction/Authorization.d.ts +4 -370
  235. package/dist/mjs/Transaction/PreTransaction/Base.d.ts +3 -369
  236. package/dist/mjs/Transaction/PreTransaction/Base.js +2 -2
  237. package/dist/mjs/Transaction/PreTransaction/Base.js.map +1 -1
  238. package/dist/mjs/Transaction/PreTransaction/Incoming.d.ts +5 -376
  239. package/dist/mjs/Transaction/PreTransaction/Incoming.js +2 -2
  240. package/dist/mjs/Transaction/PreTransaction/Incoming.js.map +1 -1
  241. package/dist/mjs/Transaction/PreTransaction/Outgoing.d.ts +3 -369
  242. package/dist/mjs/Transaction/PreTransaction/index.d.ts +12 -1115
  243. package/dist/mjs/Transaction/index.d.ts +23 -1141
  244. package/dist/mjs/Transaction/index.js +2 -2
  245. package/dist/mjs/Transaction/index.js.map +1 -1
  246. package/dist/mjs/Treasury/Snapshot/Account.js +2 -2
  247. package/dist/mjs/Treasury/Snapshot/Account.js.map +1 -1
  248. package/dist/mjs/Treasury/Snapshot/Emoney.js +2 -2
  249. package/dist/mjs/Treasury/Snapshot/Emoney.js.map +1 -1
  250. package/dist/mjs/Treasury/Snapshot/funding.js +2 -2
  251. package/dist/mjs/Treasury/Snapshot/funding.js.map +1 -1
  252. package/dist/mjs/Treasury/Snapshot/index.js +2 -2
  253. package/dist/mjs/Treasury/Snapshot/index.js.map +1 -1
  254. package/dist/mjs/Treasury/Transaction/Creatable.d.ts +1 -7
  255. package/dist/mjs/Treasury/Transaction/Creatable.js +2 -2
  256. package/dist/mjs/Treasury/Transaction/Creatable.js.map +1 -1
  257. package/dist/mjs/Warning/Issue.js +2 -2
  258. package/dist/mjs/Warning/Issue.js.map +1 -1
  259. package/dist/mjs/Warning/Settlement/NegativeAmount.js +2 -2
  260. package/dist/mjs/Warning/Settlement/NegativeAmount.js.map +1 -1
  261. package/dist/mjs/Warning/Snapshot/DeltaFiat.js +2 -3
  262. package/dist/mjs/Warning/Snapshot/DeltaFiat.js.map +1 -1
  263. package/dist/mjs/Warning/Snapshot/MissingBuffer.js +2 -2
  264. package/dist/mjs/Warning/Snapshot/MissingBuffer.js.map +1 -1
  265. package/dist/mjs/Warning/Snapshot/MissingEmoney.js +2 -3
  266. package/dist/mjs/Warning/Snapshot/MissingEmoney.js.map +1 -1
  267. package/dist/mjs/Warning/Snapshot/MissingFiat.js +2 -3
  268. package/dist/mjs/Warning/Snapshot/MissingFiat.js.map +1 -1
  269. package/dist/mjs/Warning/Snapshot/MissingTransaction.js +2 -3
  270. package/dist/mjs/Warning/Snapshot/MissingTransaction.js.map +1 -1
  271. package/dist/mjs/Warning/Snapshot/Overdraft.js +2 -2
  272. package/dist/mjs/Warning/Snapshot/Overdraft.js.map +1 -1
  273. package/dist/mjs/Warning/Snapshot/Reconciliation.js +2 -3
  274. package/dist/mjs/Warning/Snapshot/Reconciliation.js.map +1 -1
  275. package/dist/mjs/Warning/Snapshot/StaleFiat.js +2 -2
  276. package/dist/mjs/Warning/Snapshot/StaleFiat.js.map +1 -1
  277. package/dist/mjs/zod.d.ts +664 -0
  278. package/dist/mjs/zod.js +4 -0
  279. package/dist/mjs/zod.js.map +1 -1
  280. package/package.json +1 -1
  281. package/zod.ts +4 -0
  282. package/dist/cjs/Organization/Contact/Address/General.js.map +0 -1
  283. package/dist/mjs/Organization/Contact/Address/General.js.map +0 -1
@@ -2,7 +2,7 @@ import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
3
  import { Rail } from "../Rail"
4
4
  import { Supplier } from "../Supplier"
5
- import { zod } from "../zod"
5
+ import { zod, zodHelper } from "../zod"
6
6
 
7
7
  export interface Details {
8
8
  supplier: Supplier
@@ -17,11 +17,11 @@ export namespace Details {
17
17
  reference: isly.string().optional(),
18
18
  addresses: Rail.Address.type.array(),
19
19
  })
20
- export const typeZod = zod.object({
20
+ export const typeZod: zod.ZodType<Details> = zod.object({
21
21
  supplier: Supplier.typeZod,
22
- currencies: zod.array(zod.enum(isoly.Currency.values)),
22
+ currencies: zodHelper.currency.array(),
23
23
  reference: zod.string().optional(),
24
- addresses: zod.array(Rail.Address.typeZod),
24
+ addresses: Rail.Address.typeZod.array(),
25
25
  })
26
26
  export interface Creatable {
27
27
  supplier: Supplier
@@ -32,9 +32,9 @@ export namespace Details {
32
32
  supplier: Supplier.type,
33
33
  currency: isly.string(isoly.Currency.values),
34
34
  })
35
- export const typeZod = zod.object({
35
+ export const typeZod: zod.ZodType<Creatable> = zod.object({
36
36
  supplier: Supplier.typeZod,
37
- currency: zod.enum(isoly.Currency.values),
37
+ currency: zodHelper.currency,
38
38
  })
39
39
  }
40
40
  }
package/Account/index.ts CHANGED
@@ -39,7 +39,7 @@ export namespace Account {
39
39
  rails: Rail.Address.type.array(),
40
40
  details: Details.type.optional(),
41
41
  charges: AccountCharge.type.optional(),
42
- rules: Rule.type.array().optional(),
42
+ rules: isly.any().array().optional(),
43
43
  status: AccountStatus.type,
44
44
  type: Type.type,
45
45
  })
@@ -48,10 +48,10 @@ export namespace Account {
48
48
  created: zod.string().refine(isoly.DateTime.is),
49
49
  organization: zod.string(),
50
50
  balances: Balances.typeZod,
51
- rails: zod.array(Rail.Address.typeZod),
51
+ rails: Rail.Address.typeZod.array(),
52
52
  details: Details.typeZod.optional(),
53
53
  charges: AccountCharge.typeZod.optional(),
54
- rules: zod.array(zod.never()).optional(),
54
+ rules: zod.any().array().optional(),
55
55
  status: AccountStatus.typeZod,
56
56
  type: Type.typeZod,
57
57
  })
package/Acquirer/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
- import { zod } from "../zod"
3
+ import { zod, zodHelper } from "../zod"
4
4
 
5
5
  export interface Acquirer {
6
6
  id: string
@@ -17,10 +17,10 @@ export namespace Acquirer {
17
17
  retrievalReferenceNumber: isly.string().optional(),
18
18
  systemTraceAuditNumber: isly.string().optional(),
19
19
  })
20
- export const typeZod = zod.object({
20
+ export const typeZod: zod.ZodType<Acquirer> = zod.object({
21
21
  id: zod.string(),
22
22
  number: zod.string(),
23
- country: zod.string().refine(isoly.CountryCode.Alpha2.is).optional(),
23
+ country: zodHelper.countryCode.optional(),
24
24
  retrievalReferenceNumber: zod.string().optional(),
25
25
  systemTraceAuditNumber: zod.string().optional(),
26
26
  })
package/Amount.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
3
  import { Amounts } from "./Amounts"
4
- import { zod } from "./zod"
4
+ import { zod, zodHelper } from "./zod"
5
5
 
6
6
  export type Amount = [isoly.Currency, number]
7
7
 
@@ -10,5 +10,5 @@ export namespace Amount {
10
10
  return !amount ? {} : Object.fromEntries<number>([amount])
11
11
  }
12
12
  export const type = isly.tuple<Amount>(isly.string(isoly.Currency.values), isly.number())
13
- export const typeZod = zod.tuple([zod.enum(isoly.Currency.values), zod.number()])
13
+ export const typeZod: zod.ZodType<Amount> = zod.tuple([zodHelper.currency, zod.number()])
14
14
  }
package/Amounts.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
- import { zod } from "./zod"
3
+ import { zod, zodHelper } from "./zod"
4
4
 
5
5
  export type Amounts = Partial<Record<isoly.Currency, number>>
6
6
 
@@ -20,5 +20,5 @@ export namespace Amounts {
20
20
  )
21
21
  }
22
22
  export const type = isly.record<Amounts>(isly.string(isoly.Currency.values), isly.number())
23
- export const typeZod: zod.ZodType<Amounts> = zod.partialRecord(zod.enum(isoly.Currency.values), zod.number())
23
+ export const typeZod: zod.ZodType<Amounts> = zod.partialRecord(zodHelper.currency, zod.number())
24
24
  }
package/Balances.ts CHANGED
@@ -2,14 +2,14 @@ import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
3
  import { Amounts } from "./Amounts"
4
4
  import { Balance as BalancesBalance } from "./Balance"
5
- import { zod } from "./zod"
5
+ import { zod, zodHelper } from "./zod"
6
6
 
7
7
  export type Balances = Partial<Record<isoly.Currency, Balances.Balance.Extended>>
8
8
 
9
9
  export namespace Balances {
10
10
  export import Balance = BalancesBalance
11
11
  export const type = isly.record<Balances>(isly.fromIs("isoly.Currency", isoly.Currency.is), Balances.Balance.type)
12
- export const typeZod = zod.partialRecord(zod.enum(isoly.Currency.values), Balances.Balance.Extended.typeZod)
12
+ export const typeZod = zod.partialRecord(zodHelper.currency, Balances.Balance.Extended.typeZod)
13
13
  export function update(balances: Balances): Balances {
14
14
  const result: Balances = {}
15
15
  for (const [currency, balance] of Object.entries(balances)) {
package/Card/Creatable.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
3
  import { Amount } from "../Amount"
4
- import type { Rule } from "../Rule"
5
- import { type as ruleType } from "../Rule/type"
6
4
  import { zod } from "../zod"
7
5
  import { Expiry } from "./Expiry"
8
6
  import { Meta } from "./Meta"
@@ -18,7 +16,6 @@ export interface Creatable {
18
16
  holder: string
19
17
  }
20
18
  limit: Amount
21
- rules?: Rule[]
22
19
  meta?: Meta
23
20
  key?: isoly.Date | string
24
21
  restricted?: { to?: Restriction }
@@ -31,18 +28,16 @@ export namespace Creatable {
31
28
  preset: Preset.type,
32
29
  details: isly.object({ expiry: Expiry.type, holder: isly.string() }),
33
30
  limit: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()),
34
- rules: ruleType.array().optional(),
35
31
  meta: isly.fromIs("Card.Meta", Meta.is).optional(),
36
32
  key: isly.string().optional(),
37
33
  restricted: isly.object<Required<Creatable>["restricted"]>({ to: Restriction.type.optional() }).optional(),
38
34
  })
39
- export const typeZod = zod.object({
35
+ export const typeZod: zod.ZodType<Creatable> = zod.object({
40
36
  account: zod.string(),
41
37
  number: zod.string().optional(),
42
38
  preset: Preset.typeZod,
43
39
  details: zod.object({ expiry: Expiry.typeZod, holder: zod.string() }),
44
40
  limit: Amount.typeZod,
45
- rules: zod.array(zod.never()).optional(),
46
41
  meta: Meta.typeZod.optional(),
47
42
  key: zod.string().optional(),
48
43
  restricted: zod.object({ to: Restriction.typeZod.optional() }).optional(),
package/Card/index.ts CHANGED
@@ -71,12 +71,12 @@ export namespace Card {
71
71
  limit: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()),
72
72
  spent: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()),
73
73
  status: isly.union(isly.string("active"), isly.string("cancelled")),
74
- history: isly.array(CardOperation.type),
74
+ history: CardOperation.type.array(),
75
75
  rules: ruleType.array(),
76
76
  meta: isly.fromIs("Card.Meta", CardMeta.is).optional(),
77
77
  restricted: isly.object<Required<Card>["restricted"]>({ to: CardRestriction.type.optional() }).optional(),
78
78
  })
79
- export const typeZod = zod.object({
79
+ export const typeZod: zod.ZodType<Card> = zod.object({
80
80
  id: zod.string(),
81
81
  number: zod.string().optional(),
82
82
  created: zod.string().refine(isoly.DateTime.is),
@@ -96,8 +96,8 @@ export namespace Card {
96
96
  limit: Amount.typeZod,
97
97
  spent: Amount.typeZod,
98
98
  status: zod.enum(["active", "cancelled"]),
99
- history: zod.array(CardOperation.typeZod),
100
- rules: zod.array(zod.never()),
99
+ history: CardOperation.typeZod.array(),
100
+ rules: zod.any().array(),
101
101
  meta: CardMeta.typeZod.optional(),
102
102
  restricted: zod.object({ to: CardRestriction.typeZod.optional() }).optional(),
103
103
  })
package/Merchant/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
- import { zod } from "../zod"
3
+ import { zod, zodHelper } from "../zod"
4
4
  import { Category as MerchantCategory } from "./Category"
5
5
 
6
6
  export interface Merchant {
@@ -33,6 +33,6 @@ export namespace Merchant {
33
33
  city: zod.string(),
34
34
  zip: zod.string(),
35
35
  state: zod.string().optional(),
36
- country: zod.enum(isoly.CountryCode.Alpha2.values),
36
+ country: zodHelper.countryCode,
37
37
  })
38
38
  }
@@ -2,7 +2,7 @@ import { cryptly } from "cryptly"
2
2
  import { isoly } from "isoly"
3
3
  import { isly } from "isly"
4
4
  import { Settlement } from "../Settlement"
5
- import { zod } from "../zod"
5
+ import { zod, zodHelper } from "../zod"
6
6
  import { Changes } from "./Changes"
7
7
 
8
8
  export interface Creatable {
@@ -40,7 +40,7 @@ export namespace Creatable {
40
40
  })
41
41
  export const typeZod = zod.object({
42
42
  account: zod.string(),
43
- currency: zod.enum(isoly.Currency.values),
43
+ currency: zodHelper.currency,
44
44
  changes: Changes.typeZod,
45
45
  type: zod.enum(types),
46
46
  counterbalance: zod.string().optional(),
@@ -10,7 +10,6 @@ export interface Default {
10
10
  zipCode: string
11
11
  street: string
12
12
  }
13
-
14
13
  export namespace Default {
15
14
  export const type = isly.object<Default>({
16
15
  countryCode: isly.string(),
@@ -20,8 +19,8 @@ export namespace Default {
20
19
  street: isly.string(),
21
20
  zipCode: isly.string(),
22
21
  })
23
- export const typeZod = zod.object({
24
- countryCode: zod.string(),
22
+ export const typeZod: zod.ZodType<Default> = zod.object({
23
+ countryCode: zod.string() as any,
25
24
  state: zod.string().optional(),
26
25
  county: zod.string().optional(),
27
26
  city: zod.string(),
@@ -9,7 +9,6 @@ export interface GB {
9
9
  building: string
10
10
  zipCode: string
11
11
  }
12
-
13
12
  export namespace GB {
14
13
  export const name = isoly.CountryCode.Name.en.from("GB")
15
14
  export const type = isly.object<GB>({
@@ -19,7 +18,7 @@ export namespace GB {
19
18
  building: isly.string(),
20
19
  zipCode: isly.string(),
21
20
  })
22
- export const typeZod = zod.object({
21
+ export const typeZod: zod.ZodType<GB> = zod.object({
23
22
  countryCode: zod.literal("GB"),
24
23
  city: zod.string(),
25
24
  street: zod.string(),
@@ -14,7 +14,7 @@ export namespace SE {
14
14
  city: isly.string(),
15
15
  street: isly.string(),
16
16
  })
17
- export const typeZod = zod.object({
17
+ export const typeZod: zod.ZodType<SE> = zod.object({
18
18
  countryCode: zod.literal("SE"),
19
19
  zipCode: zod.string(),
20
20
  city: zod.string(),
@@ -1,12 +1,12 @@
1
1
  import { isly } from "isly"
2
2
  import { zod } from "../../../zod"
3
+ import { Default } from "./Default"
3
4
  import { GB } from "./GB"
4
- import { Default } from "./General"
5
5
  import { SE } from "./SE"
6
6
 
7
7
  export type Address = GB | SE | Default
8
8
 
9
9
  export namespace Address {
10
10
  export const type = isly.union(GB.type, SE.type, Default.type)
11
- export const typeZod = zod.union([GB.typeZod, SE.typeZod, Default.typeZod])
11
+ export const typeZod: zod.ZodType<Address> = zod.union([GB.typeZod, SE.typeZod, Default.typeZod])
12
12
  }
@@ -15,7 +15,7 @@ export namespace Addresses {
15
15
  delivery: Address.type.optional(),
16
16
  visit: Address.type.optional(),
17
17
  })
18
- export const typeZod = zod.object({
18
+ export const typeZod: zod.ZodType<Addresses> = zod.object({
19
19
  primary: Address.typeZod,
20
20
  billing: Address.typeZod.optional(),
21
21
  delivery: Address.typeZod.optional(),
@@ -7,5 +7,5 @@ export interface Name {
7
7
  }
8
8
  export namespace Name {
9
9
  export const type = isly.object<Name>({ first: isly.string(), last: isly.string() })
10
- export const typeZod = zod.object({ first: zod.string(), last: zod.string() })
10
+ export const typeZod: zod.ZodType<Name> = zod.object({ first: zod.string(), last: zod.string() })
11
11
  }
@@ -1,6 +1,6 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
- import { zod } from "../../zod"
3
+ import { zod, zodHelper } from "../../zod"
4
4
 
5
5
  export interface Phone {
6
6
  number: string
@@ -11,8 +11,8 @@ export namespace Phone {
11
11
  number: isly.string(/^\d+$/),
12
12
  code: isly.fromIs("CallingCode", isoly.CallingCode.is),
13
13
  })
14
- export const typeZod = zod.object({
14
+ export const typeZod: zod.ZodType<Phone> = zod.object({
15
15
  number: zod.string().regex(/^\d+$/),
16
- code: zod.custom<isoly.CallingCode>(isoly.CallingCode.is),
16
+ code: zodHelper.callingCode,
17
17
  })
18
18
  }
@@ -26,11 +26,11 @@ export namespace Contact {
26
26
  phone: Phone.type,
27
27
  owners: Name.type.array().optional(),
28
28
  })
29
- export const typeZod = zod.object({
29
+ export const typeZod: zod.ZodType<Contact> = zod.object({
30
30
  address: Addresses.typeZod,
31
31
  email: zod.string().regex(/^\S+@\S+\.\S+$/),
32
32
  name: Name.typeZod,
33
33
  phone: Phone.typeZod,
34
- owners: zod.array(Name.typeZod).optional(),
34
+ owners: Name.typeZod.array().optional(),
35
35
  })
36
36
  }
@@ -1,6 +1,4 @@
1
1
  import { isly } from "isly"
2
- import type { Rule } from "../Rule"
3
- import { type as ruleType } from "../Rule/type"
4
2
  import { zod } from "../zod"
5
3
  import { Contact } from "./Contact"
6
4
  import { Fx } from "./Fx"
@@ -10,9 +8,7 @@ export interface Creatable {
10
8
  name: string
11
9
  code: string
12
10
  risk: Risk
13
- rules?: Rule[]
14
11
  contact?: Contact.Creatable
15
- groups?: string[]
16
12
  fx?: Fx
17
13
  }
18
14
  export namespace Creatable {
@@ -20,18 +16,14 @@ export namespace Creatable {
20
16
  name: isly.string(),
21
17
  code: isly.string(new RegExp(/^[A-Za-z0-9\-_]+$/)),
22
18
  risk: Risk.type,
23
- rules: ruleType.array().optional(),
24
19
  contact: Contact.Creatable.type.optional(),
25
- groups: isly.string().array().optional(),
26
20
  fx: Fx.type.optional(),
27
21
  })
28
- export const typeZod = zod.object({
22
+ export const typeZod: zod.ZodType<Creatable> = zod.object({
29
23
  name: zod.string(),
30
24
  code: zod.string().regex(/^[A-Za-z0-9\-_]+$/),
31
25
  risk: Risk.typeZod,
32
- rules: zod.array(zod.never()).optional(),
33
26
  contact: Contact.Creatable.typeZod.optional(),
34
- groups: zod.array(zod.string()).optional(),
35
27
  fx: Fx.typeZod.optional(),
36
28
  })
37
29
  }
@@ -40,19 +40,19 @@ export namespace Organization {
40
40
  fx: OrganizationFx.type.optional(),
41
41
  type: Type.type,
42
42
  })
43
- export const typeZod = zod.object({
43
+ export const typeZod: zod.ZodType<Organization> = zod.object({
44
44
  name: zod.string(),
45
45
  code: zod.string().regex(/^[A-Za-z0-9\-_]+$/),
46
46
  realm: Realm.typeZod,
47
- rules: zod.array(zod.never()),
47
+ rules: zod.any().array(),
48
48
  status: zod.enum(["active", "inactive"]),
49
49
  risk: Organization.Risk.typeZod,
50
50
  contact: Contact.typeZod.optional(),
51
- groups: zod.array(zod.string()).optional(),
51
+ groups: zod.string().array().optional(),
52
52
  fx: OrganizationFx.typeZod.optional(),
53
53
  type: Type.typeZod,
54
54
  })
55
55
  export function from(creatable: Creatable, realm: Realm): Organization {
56
- return { ...creatable, realm, rules: creatable.rules ?? [], status: "active", type: "emoney" }
56
+ return { ...creatable, realm, rules: [], status: "active", type: "emoney" }
57
57
  }
58
58
  }
package/Rail/index.ts CHANGED
@@ -20,6 +20,7 @@ export namespace Rail {
20
20
  "sepa-instant",
21
21
  "rix-rtgs",
22
22
  "rix-inst",
23
+ "swift",
23
24
  ] as const
24
25
  export const type = isly.string<Rail>(rails)
25
26
  export const typeZod = zod.enum(rails)
package/Rule/index.ts CHANGED
@@ -2,7 +2,7 @@ import { isly } from "isly"
2
2
  import { State as RuleState } from "./State"
3
3
  import { type as ruleType } from "./type"
4
4
 
5
- export type Rule = never
5
+ export type Rule = any
6
6
  export namespace Rule {
7
7
  export import State = RuleState
8
8
  export type Kind = (typeof Kind.values)[number]
@@ -1,13 +1,13 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
- import { zod } from "../zod"
3
+ import { zod, zodHelper } from "../zod"
4
4
  import { Entry } from "./Entry"
5
5
  import { Total } from "./Total"
6
6
 
7
7
  export type Totals = Partial<Record<isoly.Currency, Total>>
8
8
  export namespace Totals {
9
9
  export const type = isly.record<isoly.Currency, Total>(isly.string(isoly.Currency.values), Total.type)
10
- export const typeZod: zod.ZodType<Totals> = zod.partialRecord(zod.enum(isoly.Currency.values), Total.typeZod)
10
+ export const typeZod: zod.ZodType<Totals> = zod.partialRecord(zodHelper.currency, Total.typeZod)
11
11
  export function addEntry(totals: Totals, entry: Entry): Totals {
12
12
  const result = { ...totals }
13
13
  if (entry.status == "succeeded" && (entry.type == "capture" || entry.type == "refund")) {
@@ -3,7 +3,7 @@ import { isly } from "isly"
3
3
  import { Account } from "../Account"
4
4
  import { Preset } from "../Card/Preset"
5
5
  import { Rail } from "../Rail"
6
- import { zod } from "../zod"
6
+ import { zod, zodHelper } from "../zod"
7
7
  import { Amount } from "./Amount"
8
8
  import { Exchange } from "./Exchange"
9
9
 
@@ -27,7 +27,7 @@ export namespace Creatable {
27
27
  })
28
28
  export const typeZod = zod.object({
29
29
  counterpart: Rail.Address.typeZod,
30
- currency: zod.enum(isoly.Currency.values),
30
+ currency: zodHelper.currency,
31
31
  amount: zod.number(),
32
32
  description: zod.string(),
33
33
  exchange: Exchange.typeZod.optional(),
@@ -1,7 +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
+ import { zod, zodHelper } from "../zod"
5
5
  import { Reference as TransactionReference } from "./Reference"
6
6
 
7
7
  export interface Incoming {
@@ -28,7 +28,7 @@ export namespace Incoming {
28
28
  export const typeZod = zod.object({
29
29
  account: Rail.Address.typeZod,
30
30
  counterpart: Rail.Address.typeZod,
31
- currency: zod.enum(isoly.Currency.values),
31
+ currency: zodHelper.currency,
32
32
  amount: zod.number(),
33
33
  description: zod.string(),
34
34
  posted: zod.string(),
@@ -1,7 +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
+ import { zod, zodHelper } from "../../zod"
5
5
  import { Exchange } from "../Exchange"
6
6
 
7
7
  export interface Base {
@@ -24,7 +24,7 @@ export namespace Base {
24
24
  export const typeZod = zod.object({
25
25
  type: zod.enum(["outgoing", "incoming", "authorization"]),
26
26
  counterpart: Rail.Address.typeZod,
27
- currency: zod.enum(isoly.Currency.values),
27
+ currency: zodHelper.currency,
28
28
  amount: zod.number(),
29
29
  description: zod.string(),
30
30
  exchange: Exchange.typeZod.optional(),
@@ -2,7 +2,7 @@ import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
3
  import { Rail } from "../../Rail"
4
4
  import { Settlement } from "../../Settlement"
5
- import { zod } from "../../zod"
5
+ import { zod, zodHelper } from "../../zod"
6
6
  import { Reference as TransactionReference } from "../Reference"
7
7
  import { Base } from "./Base"
8
8
 
@@ -30,7 +30,7 @@ export namespace Incoming {
30
30
  export const typeZod = Base.typeZod.extend({
31
31
  type: zod.literal("incoming"),
32
32
  account: Rail.Address.typeZod,
33
- currency: zod.enum(isoly.Currency.values),
33
+ currency: zodHelper.currency,
34
34
  amount: zod.number(),
35
35
  description: zod.string(),
36
36
  posted: zod.string(),
@@ -7,7 +7,7 @@ import { Rail } from "../Rail"
7
7
  import { Report } from "../Report"
8
8
  import type { Rule } from "../Rule"
9
9
  import { Settlement } from "../Settlement"
10
- import { zod } from "../zod"
10
+ import { zod, zodHelper } from "../zod"
11
11
  import { Amount as TransactionAmount } from "./Amount"
12
12
  import { Creatable as TransactionCreatable } from "./Creatable"
13
13
  import { Exchange as TransactionExchange } from "./Exchange"
@@ -88,7 +88,7 @@ export namespace Transaction {
88
88
  })
89
89
  export const typeZod = zod.object({
90
90
  counterpart: Rail.Address.typeZod,
91
- currency: zod.enum(isoly.Currency.values),
91
+ currency: zodHelper.currency,
92
92
  amount: Amount.typeZod,
93
93
  description: zod.string(),
94
94
  organization: zod.string(),
@@ -1,7 +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
+ import { zod, zodHelper } from "../../zod"
5
5
  import { Transaction } from "../Transaction"
6
6
 
7
7
  export interface Account {
@@ -53,7 +53,7 @@ export namespace Account {
53
53
  label: zod.string(),
54
54
  reference: zod.string(),
55
55
  description: zod.string().optional(),
56
- currency: zod.enum(isoly.Currency.values),
56
+ currency: zodHelper.currency,
57
57
  opening: Opening.typeZod.optional(),
58
58
  closing: Closing.typeZod,
59
59
  delta: Delta.typeZod,
@@ -1,7 +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
+ import { zod, zodHelper } from "../../zod"
5
5
 
6
6
  export interface Emoney {
7
7
  organization: string
@@ -18,7 +18,7 @@ export namespace Emoney {
18
18
  account: zod.string(),
19
19
  created: zod.string().refine(isoly.DateTime.is).optional(),
20
20
  supplier: Supplier.typeZod.optional(),
21
- currencies: zod.array(zod.enum(isoly.Currency.values)).optional(),
21
+ currencies: zod.array(zodHelper.currency).optional(),
22
22
  timestamp: zod.string().refine(isoly.DateTime.is),
23
23
  balances: Balances.typeZod,
24
24
  })
@@ -1,6 +1,6 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
- import { zod } from "../../zod"
3
+ import { zod, zodHelper } from "../../zod"
4
4
  import { Transaction } from "../Transaction"
5
5
 
6
6
  export namespace funding {
@@ -24,7 +24,7 @@ export namespace funding {
24
24
  export type Cursors = Partial<Record<isoly.Currency, Cursor>>
25
25
  export namespace Cursors {
26
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)
27
+ export const typeZod: zod.ZodType<Cursors> = zod.partialRecord(zodHelper.currency, Cursor.typeZod)
28
28
  export function updateAmount(settlement: Transaction, cursors: Cursors): Cursors {
29
29
  const cursor = cursors[settlement.currency]
30
30
  if (!cursor) {
@@ -3,7 +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
+ import { zod, zodHelper } from "../../zod"
7
7
  import { Account as SnapshotAccount } from "./Account"
8
8
  import { Check as SnapshotCheck } from "./Check"
9
9
  import { Emoney as SnapshotEmoney } from "./Emoney"
@@ -58,7 +58,7 @@ export namespace Snapshot {
58
58
  accounts: zod.array(EmoneyAccounts.typeZod),
59
59
  }),
60
60
  created: zod.string().refine(isoly.DateTime.is),
61
- currency: zod.enum(isoly.Currency.values),
61
+ currency: zodHelper.currency,
62
62
  supplier: Supplier.typeZod,
63
63
  fiat: zod.object({
64
64
  total: zod.number(),
@@ -1,7 +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
+ import { zod, zodHelper } from "../../zod"
5
5
 
6
6
  export interface Creatable {
7
7
  creditor: Rail.Address
@@ -20,7 +20,7 @@ export namespace Creatable {
20
20
  })
21
21
  export const typeZod = zod.object({
22
22
  creditor: Rail.Address.typeZod,
23
- currency: zod.enum(isoly.Currency.values),
23
+ currency: zodHelper.currency,
24
24
  amount: zod.number(),
25
25
  description: zod.string(),
26
26
  external: zod.string().optional(),
package/Warning/Issue.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
- import { zod } from "../zod"
3
+ import { zod, zodHelper } from "../zod"
4
4
 
5
5
  export interface Issue {
6
6
  link: string
@@ -30,7 +30,7 @@ export namespace Issue {
30
30
  })
31
31
  export const typeZod: zod.ZodType<Creatable> = zod.object({
32
32
  type: zod.string(),
33
- currency: zod.enum(isoly.Currency.values),
33
+ currency: zodHelper.currency,
34
34
  resource: zod.string().optional(),
35
35
  issue: Issue.typeZod,
36
36
  })