@pax2pay/model-banking 0.1.670 → 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 (276) 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/Rule/index.ts +1 -1
  22. package/Settlement/Totals.ts +2 -2
  23. package/Transaction/Creatable.ts +2 -2
  24. package/Transaction/Incoming.ts +2 -2
  25. package/Transaction/PreTransaction/Base.ts +2 -2
  26. package/Transaction/PreTransaction/Incoming.ts +2 -2
  27. package/Transaction/index.ts +2 -2
  28. package/Treasury/Snapshot/Account.ts +2 -2
  29. package/Treasury/Snapshot/Emoney.ts +2 -2
  30. package/Treasury/Snapshot/funding.ts +2 -2
  31. package/Treasury/Snapshot/index.ts +2 -2
  32. package/Treasury/Transaction/Creatable.ts +2 -2
  33. package/Warning/Issue.ts +2 -2
  34. package/Warning/Settlement/NegativeAmount.ts +2 -2
  35. package/Warning/Snapshot/DeltaFiat.ts +2 -2
  36. package/Warning/Snapshot/MissingBuffer.ts +2 -2
  37. package/Warning/Snapshot/MissingEmoney.ts +2 -2
  38. package/Warning/Snapshot/MissingFiat.ts +2 -2
  39. package/Warning/Snapshot/MissingTransaction.ts +2 -2
  40. package/Warning/Snapshot/Overdraft.ts +2 -2
  41. package/Warning/Snapshot/Reconciliation.ts +2 -2
  42. package/Warning/Snapshot/StaleFiat.ts +2 -2
  43. package/dist/cjs/Account/Details.d.ts +2 -688
  44. package/dist/cjs/Account/Details.js +3 -3
  45. package/dist/cjs/Account/Details.js.map +1 -1
  46. package/dist/cjs/Account/index.d.ts +3 -508
  47. package/dist/cjs/Account/index.js +3 -4
  48. package/dist/cjs/Account/index.js.map +1 -1
  49. package/dist/cjs/Acquirer/index.d.ts +1 -7
  50. package/dist/cjs/Acquirer/index.js +1 -1
  51. package/dist/cjs/Acquirer/index.js.map +1 -1
  52. package/dist/cjs/Amount.d.ts +1 -181
  53. package/dist/cjs/Amount.js +1 -1
  54. package/dist/cjs/Amount.js.map +1 -1
  55. package/dist/cjs/Amounts.js +1 -1
  56. package/dist/cjs/Amounts.js.map +1 -1
  57. package/dist/cjs/Backup/Rule.d.ts +1 -1
  58. package/dist/cjs/Balances.js +1 -1
  59. package/dist/cjs/Balances.js.map +1 -1
  60. package/dist/cjs/Card/Changeable.d.ts +1 -181
  61. package/dist/cjs/Card/Creatable.d.ts +1 -407
  62. package/dist/cjs/Card/Creatable.js +0 -3
  63. package/dist/cjs/Card/Creatable.js.map +1 -1
  64. package/dist/cjs/Card/Operation/Card.d.ts +1 -181
  65. package/dist/cjs/Card/Operation/index.d.ts +1 -181
  66. package/dist/cjs/Card/index.d.ts +1 -811
  67. package/dist/cjs/Card/index.js +3 -3
  68. package/dist/cjs/Card/index.js.map +1 -1
  69. package/dist/cjs/Merchant/index.js +1 -2
  70. package/dist/cjs/Merchant/index.js.map +1 -1
  71. package/dist/cjs/Operation/Creatable.js +1 -1
  72. package/dist/cjs/Operation/Creatable.js.map +1 -1
  73. package/dist/cjs/Organization/Changeable.d.ts +4 -90
  74. package/dist/cjs/Organization/Contact/Address/{General.d.ts → Default.d.ts} +1 -8
  75. package/dist/cjs/Organization/Contact/Address/{General.js → Default.js} +1 -1
  76. package/dist/cjs/Organization/Contact/Address/Default.js.map +1 -0
  77. package/dist/cjs/Organization/Contact/Address/GB.d.ts +1 -7
  78. package/dist/cjs/Organization/Contact/Address/GB.js.map +1 -1
  79. package/dist/cjs/Organization/Contact/Address/SE.d.ts +1 -6
  80. package/dist/cjs/Organization/Contact/Address/SE.js.map +1 -1
  81. package/dist/cjs/Organization/Contact/Address/index.d.ts +3 -21
  82. package/dist/cjs/Organization/Contact/Address/index.js +3 -3
  83. package/dist/cjs/Organization/Contact/Address/index.js.map +1 -1
  84. package/dist/cjs/Organization/Contact/Addresses.d.ts +1 -78
  85. package/dist/cjs/Organization/Contact/Addresses.js.map +1 -1
  86. package/dist/cjs/Organization/Contact/Creatable.d.ts +4 -90
  87. package/dist/cjs/Organization/Contact/Name.d.ts +1 -4
  88. package/dist/cjs/Organization/Contact/Name.js.map +1 -1
  89. package/dist/cjs/Organization/Contact/Phone.d.ts +1 -4
  90. package/dist/cjs/Organization/Contact/Phone.js +1 -1
  91. package/dist/cjs/Organization/Contact/Phone.js.map +1 -1
  92. package/dist/cjs/Organization/Contact/index.d.ts +1 -93
  93. package/dist/cjs/Organization/Contact/index.js +1 -1
  94. package/dist/cjs/Organization/Contact/index.js.map +1 -1
  95. package/dist/cjs/Organization/Creatable.d.ts +2 -112
  96. package/dist/cjs/Organization/Creatable.js +0 -5
  97. package/dist/cjs/Organization/Creatable.js.map +1 -1
  98. package/dist/cjs/Organization/index.d.ts +1 -121
  99. package/dist/cjs/Organization/index.js +3 -3
  100. package/dist/cjs/Organization/index.js.map +1 -1
  101. package/dist/cjs/Rail/Address/Card.d.ts +1 -7
  102. package/dist/cjs/Rail/Address/index.d.ts +1 -7
  103. package/dist/cjs/Rule/index.d.ts +1 -1
  104. package/dist/cjs/Settlement/Entry/Creatable.d.ts +4 -550
  105. package/dist/cjs/Settlement/Totals.js +1 -1
  106. package/dist/cjs/Settlement/Totals.js.map +1 -1
  107. package/dist/cjs/Transaction/Amount/index.d.ts +2 -362
  108. package/dist/cjs/Transaction/Creatable.d.ts +7 -739
  109. package/dist/cjs/Transaction/Creatable.js +1 -1
  110. package/dist/cjs/Transaction/Creatable.js.map +1 -1
  111. package/dist/cjs/Transaction/Exchange.d.ts +2 -362
  112. package/dist/cjs/Transaction/PreTransaction/Authorization.d.ts +4 -370
  113. package/dist/cjs/Transaction/PreTransaction/Base.d.ts +3 -369
  114. package/dist/cjs/Transaction/PreTransaction/Base.js +1 -1
  115. package/dist/cjs/Transaction/PreTransaction/Base.js.map +1 -1
  116. package/dist/cjs/Transaction/PreTransaction/Incoming.d.ts +4 -376
  117. package/dist/cjs/Transaction/PreTransaction/Incoming.js +1 -1
  118. package/dist/cjs/Transaction/PreTransaction/Incoming.js.map +1 -1
  119. package/dist/cjs/Transaction/PreTransaction/Outgoing.d.ts +3 -369
  120. package/dist/cjs/Transaction/PreTransaction/index.d.ts +11 -1115
  121. package/dist/cjs/Transaction/index.d.ts +19 -1141
  122. package/dist/cjs/Transaction/index.js +1 -1
  123. package/dist/cjs/Transaction/index.js.map +1 -1
  124. package/dist/cjs/Treasury/Snapshot/Account.js +1 -1
  125. package/dist/cjs/Treasury/Snapshot/Account.js.map +1 -1
  126. package/dist/cjs/Treasury/Snapshot/Emoney.js +1 -1
  127. package/dist/cjs/Treasury/Snapshot/Emoney.js.map +1 -1
  128. package/dist/cjs/Treasury/Snapshot/funding.js +1 -1
  129. package/dist/cjs/Treasury/Snapshot/funding.js.map +1 -1
  130. package/dist/cjs/Treasury/Snapshot/index.js +1 -1
  131. package/dist/cjs/Treasury/Snapshot/index.js.map +1 -1
  132. package/dist/cjs/Treasury/Transaction/Creatable.d.ts +1 -7
  133. package/dist/cjs/Treasury/Transaction/Creatable.js +1 -1
  134. package/dist/cjs/Treasury/Transaction/Creatable.js.map +1 -1
  135. package/dist/cjs/Warning/Issue.js +1 -1
  136. package/dist/cjs/Warning/Issue.js.map +1 -1
  137. package/dist/cjs/Warning/Settlement/NegativeAmount.js +1 -1
  138. package/dist/cjs/Warning/Settlement/NegativeAmount.js.map +1 -1
  139. package/dist/cjs/Warning/Snapshot/DeltaFiat.js +1 -2
  140. package/dist/cjs/Warning/Snapshot/DeltaFiat.js.map +1 -1
  141. package/dist/cjs/Warning/Snapshot/MissingBuffer.js +1 -1
  142. package/dist/cjs/Warning/Snapshot/MissingBuffer.js.map +1 -1
  143. package/dist/cjs/Warning/Snapshot/MissingEmoney.js +1 -2
  144. package/dist/cjs/Warning/Snapshot/MissingEmoney.js.map +1 -1
  145. package/dist/cjs/Warning/Snapshot/MissingFiat.js +1 -2
  146. package/dist/cjs/Warning/Snapshot/MissingFiat.js.map +1 -1
  147. package/dist/cjs/Warning/Snapshot/MissingTransaction.js +1 -2
  148. package/dist/cjs/Warning/Snapshot/MissingTransaction.js.map +1 -1
  149. package/dist/cjs/Warning/Snapshot/Overdraft.js +1 -1
  150. package/dist/cjs/Warning/Snapshot/Overdraft.js.map +1 -1
  151. package/dist/cjs/Warning/Snapshot/Reconciliation.js +1 -2
  152. package/dist/cjs/Warning/Snapshot/Reconciliation.js.map +1 -1
  153. package/dist/cjs/Warning/Snapshot/StaleFiat.js +1 -1
  154. package/dist/cjs/Warning/Snapshot/StaleFiat.js.map +1 -1
  155. package/dist/cjs/zod.d.ts +664 -0
  156. package/dist/cjs/zod.js +4 -0
  157. package/dist/cjs/zod.js.map +1 -1
  158. package/dist/mjs/Account/Details.d.ts +2 -688
  159. package/dist/mjs/Account/Details.js +4 -4
  160. package/dist/mjs/Account/Details.js.map +1 -1
  161. package/dist/mjs/Account/index.d.ts +3 -508
  162. package/dist/mjs/Account/index.js +3 -4
  163. package/dist/mjs/Account/index.js.map +1 -1
  164. package/dist/mjs/Acquirer/index.d.ts +1 -7
  165. package/dist/mjs/Acquirer/index.js +2 -2
  166. package/dist/mjs/Acquirer/index.js.map +1 -1
  167. package/dist/mjs/Amount.d.ts +1 -181
  168. package/dist/mjs/Amount.js +2 -2
  169. package/dist/mjs/Amount.js.map +1 -1
  170. package/dist/mjs/Amounts.js +2 -2
  171. package/dist/mjs/Amounts.js.map +1 -1
  172. package/dist/mjs/Backup/Rule.d.ts +1 -1
  173. package/dist/mjs/Balances.js +2 -2
  174. package/dist/mjs/Balances.js.map +1 -1
  175. package/dist/mjs/Card/Changeable.d.ts +1 -181
  176. package/dist/mjs/Card/Creatable.d.ts +1 -407
  177. package/dist/mjs/Card/Creatable.js +0 -3
  178. package/dist/mjs/Card/Creatable.js.map +1 -1
  179. package/dist/mjs/Card/Operation/Card.d.ts +1 -181
  180. package/dist/mjs/Card/Operation/index.d.ts +1 -181
  181. package/dist/mjs/Card/index.d.ts +1 -811
  182. package/dist/mjs/Card/index.js +3 -3
  183. package/dist/mjs/Card/index.js.map +1 -1
  184. package/dist/mjs/Merchant/index.js +2 -3
  185. package/dist/mjs/Merchant/index.js.map +1 -1
  186. package/dist/mjs/Operation/Creatable.js +2 -2
  187. package/dist/mjs/Operation/Creatable.js.map +1 -1
  188. package/dist/mjs/Organization/Changeable.d.ts +4 -90
  189. package/dist/mjs/Organization/Contact/Address/{General.d.ts → Default.d.ts} +1 -8
  190. package/dist/mjs/Organization/Contact/Address/{General.js → Default.js} +1 -1
  191. package/dist/mjs/Organization/Contact/Address/Default.js.map +1 -0
  192. package/dist/mjs/Organization/Contact/Address/GB.d.ts +1 -7
  193. package/dist/mjs/Organization/Contact/Address/GB.js.map +1 -1
  194. package/dist/mjs/Organization/Contact/Address/SE.d.ts +1 -6
  195. package/dist/mjs/Organization/Contact/Address/SE.js.map +1 -1
  196. package/dist/mjs/Organization/Contact/Address/index.d.ts +3 -21
  197. package/dist/mjs/Organization/Contact/Address/index.js +1 -1
  198. package/dist/mjs/Organization/Contact/Address/index.js.map +1 -1
  199. package/dist/mjs/Organization/Contact/Addresses.d.ts +1 -78
  200. package/dist/mjs/Organization/Contact/Addresses.js.map +1 -1
  201. package/dist/mjs/Organization/Contact/Creatable.d.ts +4 -90
  202. package/dist/mjs/Organization/Contact/Name.d.ts +1 -4
  203. package/dist/mjs/Organization/Contact/Name.js.map +1 -1
  204. package/dist/mjs/Organization/Contact/Phone.d.ts +1 -4
  205. package/dist/mjs/Organization/Contact/Phone.js +2 -2
  206. package/dist/mjs/Organization/Contact/Phone.js.map +1 -1
  207. package/dist/mjs/Organization/Contact/index.d.ts +1 -93
  208. package/dist/mjs/Organization/Contact/index.js +1 -1
  209. package/dist/mjs/Organization/Contact/index.js.map +1 -1
  210. package/dist/mjs/Organization/Creatable.d.ts +2 -112
  211. package/dist/mjs/Organization/Creatable.js +0 -5
  212. package/dist/mjs/Organization/Creatable.js.map +1 -1
  213. package/dist/mjs/Organization/index.d.ts +1 -121
  214. package/dist/mjs/Organization/index.js +3 -3
  215. package/dist/mjs/Organization/index.js.map +1 -1
  216. package/dist/mjs/Rail/Address/Card.d.ts +1 -7
  217. package/dist/mjs/Rail/Address/index.d.ts +1 -7
  218. package/dist/mjs/Rule/index.d.ts +1 -1
  219. package/dist/mjs/Settlement/Entry/Creatable.d.ts +4 -550
  220. package/dist/mjs/Settlement/Totals.js +2 -2
  221. package/dist/mjs/Settlement/Totals.js.map +1 -1
  222. package/dist/mjs/Transaction/Amount/index.d.ts +2 -362
  223. package/dist/mjs/Transaction/Creatable.d.ts +7 -739
  224. package/dist/mjs/Transaction/Creatable.js +2 -2
  225. package/dist/mjs/Transaction/Creatable.js.map +1 -1
  226. package/dist/mjs/Transaction/Exchange.d.ts +2 -362
  227. package/dist/mjs/Transaction/PreTransaction/Authorization.d.ts +4 -370
  228. package/dist/mjs/Transaction/PreTransaction/Base.d.ts +3 -369
  229. package/dist/mjs/Transaction/PreTransaction/Base.js +2 -2
  230. package/dist/mjs/Transaction/PreTransaction/Base.js.map +1 -1
  231. package/dist/mjs/Transaction/PreTransaction/Incoming.d.ts +4 -376
  232. package/dist/mjs/Transaction/PreTransaction/Incoming.js +2 -2
  233. package/dist/mjs/Transaction/PreTransaction/Incoming.js.map +1 -1
  234. package/dist/mjs/Transaction/PreTransaction/Outgoing.d.ts +3 -369
  235. package/dist/mjs/Transaction/PreTransaction/index.d.ts +11 -1115
  236. package/dist/mjs/Transaction/index.d.ts +19 -1141
  237. package/dist/mjs/Transaction/index.js +2 -2
  238. package/dist/mjs/Transaction/index.js.map +1 -1
  239. package/dist/mjs/Treasury/Snapshot/Account.js +2 -2
  240. package/dist/mjs/Treasury/Snapshot/Account.js.map +1 -1
  241. package/dist/mjs/Treasury/Snapshot/Emoney.js +2 -2
  242. package/dist/mjs/Treasury/Snapshot/Emoney.js.map +1 -1
  243. package/dist/mjs/Treasury/Snapshot/funding.js +2 -2
  244. package/dist/mjs/Treasury/Snapshot/funding.js.map +1 -1
  245. package/dist/mjs/Treasury/Snapshot/index.js +2 -2
  246. package/dist/mjs/Treasury/Snapshot/index.js.map +1 -1
  247. package/dist/mjs/Treasury/Transaction/Creatable.d.ts +1 -7
  248. package/dist/mjs/Treasury/Transaction/Creatable.js +2 -2
  249. package/dist/mjs/Treasury/Transaction/Creatable.js.map +1 -1
  250. package/dist/mjs/Warning/Issue.js +2 -2
  251. package/dist/mjs/Warning/Issue.js.map +1 -1
  252. package/dist/mjs/Warning/Settlement/NegativeAmount.js +2 -2
  253. package/dist/mjs/Warning/Settlement/NegativeAmount.js.map +1 -1
  254. package/dist/mjs/Warning/Snapshot/DeltaFiat.js +2 -3
  255. package/dist/mjs/Warning/Snapshot/DeltaFiat.js.map +1 -1
  256. package/dist/mjs/Warning/Snapshot/MissingBuffer.js +2 -2
  257. package/dist/mjs/Warning/Snapshot/MissingBuffer.js.map +1 -1
  258. package/dist/mjs/Warning/Snapshot/MissingEmoney.js +2 -3
  259. package/dist/mjs/Warning/Snapshot/MissingEmoney.js.map +1 -1
  260. package/dist/mjs/Warning/Snapshot/MissingFiat.js +2 -3
  261. package/dist/mjs/Warning/Snapshot/MissingFiat.js.map +1 -1
  262. package/dist/mjs/Warning/Snapshot/MissingTransaction.js +2 -3
  263. package/dist/mjs/Warning/Snapshot/MissingTransaction.js.map +1 -1
  264. package/dist/mjs/Warning/Snapshot/Overdraft.js +2 -2
  265. package/dist/mjs/Warning/Snapshot/Overdraft.js.map +1 -1
  266. package/dist/mjs/Warning/Snapshot/Reconciliation.js +2 -3
  267. package/dist/mjs/Warning/Snapshot/Reconciliation.js.map +1 -1
  268. package/dist/mjs/Warning/Snapshot/StaleFiat.js +2 -2
  269. package/dist/mjs/Warning/Snapshot/StaleFiat.js.map +1 -1
  270. package/dist/mjs/zod.d.ts +664 -0
  271. package/dist/mjs/zod.js +4 -0
  272. package/dist/mjs/zod.js.map +1 -1
  273. package/package.json +1 -1
  274. package/zod.ts +4 -0
  275. package/dist/cjs/Organization/Contact/Address/General.js.map +0 -1
  276. 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/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
  })