@temboplus/frontend-core 0.2.9 → 0.2.11

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 (425) hide show
  1. package/README.md +1 -1
  2. package/dist/constants/index.d.ts +1 -0
  3. package/dist/constants/payout-countries.d.ts +2 -0
  4. package/dist/index.cjs.js +8 -0
  5. package/dist/index.cjs.js.map +1 -0
  6. package/dist/index.d.ts +5 -0
  7. package/dist/index.esm.js +5 -0
  8. package/dist/index.esm.js.map +1 -0
  9. package/dist/models/amount/amount.d.ts +733 -0
  10. package/dist/models/amount/index.d.ts +1 -0
  11. package/dist/models/bank/bank.d.ts +106 -0
  12. package/dist/models/bank/bank.schema.d.ts +3 -0
  13. package/{esm/src/models/bank/types.d.ts → dist/models/bank/bank.types.d.ts} +4 -6
  14. package/dist/models/bank/bank.validation.d.ts +80 -0
  15. package/dist/models/bank/index.d.ts +4 -0
  16. package/{script/src → dist}/models/country/country.d.ts +11 -5
  17. package/dist/models/country/country.schema.d.ts +46 -0
  18. package/{script/src/models/country/types.d.ts → dist/models/country/country.types.d.ts} +0 -1
  19. package/{esm/src/models/country/utils.js → dist/models/country/country.validation.d.ts} +11 -10
  20. package/dist/models/country/index.d.ts +4 -0
  21. package/{script/src → dist}/models/currency/currency.d.ts +2 -3
  22. package/dist/models/currency/currency.schema.d.ts +8 -0
  23. package/{esm/src/models/currency/types.d.ts → dist/models/currency/currency.types.d.ts} +1 -2
  24. package/dist/models/currency/currency.validation.d.ts +11 -0
  25. package/dist/models/currency/index.d.ts +4 -0
  26. package/dist/models/index.d.ts +5 -0
  27. package/dist/models/phone-number/index.d.ts +6 -0
  28. package/dist/models/phone-number/mno/index.d.ts +6 -0
  29. package/dist/models/phone-number/mno/ke/mobile-number.ke-mnos.d.ts +22 -0
  30. package/dist/models/phone-number/mno/ke/mobile-number.ke.d.ts +45 -0
  31. package/dist/models/phone-number/mno/mno.types.d.ts +63 -0
  32. package/dist/models/phone-number/mno/mno.utils.d.ts +40 -0
  33. package/dist/models/phone-number/mno/tz/mobile-number.tz-mnos.d.ts +48 -0
  34. package/dist/models/phone-number/mno/tz/mobile-number.tz.d.ts +44 -0
  35. package/dist/models/phone-number/phone-number.d.ts +78 -0
  36. package/dist/models/phone-number/phone-number.factory.d.ts +52 -0
  37. package/dist/models/phone-number/phone-number.service.d.ts +36 -0
  38. package/dist/models/phone-number/phone-number.types.d.ts +115 -0
  39. package/dist/models/phone-number/phone-number.utils.d.ts +67 -0
  40. package/dist/reports/index.d.ts +1 -0
  41. package/{script/src/reports/report_manager.d.ts → dist/reports/report-manager.d.ts} +0 -1
  42. package/{esm/src/config/config_service.d.ts → dist/services/config.d.ts} +6 -5
  43. package/dist/services/index.d.ts +2 -0
  44. package/dist/services/logger.d.ts +1 -0
  45. package/{script/src → dist}/utils/id.d.ts +7 -3
  46. package/dist/utils/index.d.ts +3 -0
  47. package/{esm/src → dist}/utils/text.d.ts +13 -6
  48. package/{script/src → dist}/utils/time.d.ts +9 -4
  49. package/package.json +55 -21
  50. package/LICENSE +0 -7
  51. package/esm/_dnt.test_shims.d.ts.map +0 -1
  52. package/esm/deps/deno.land/std@0.217.0/assert/_constants.d.ts.map +0 -1
  53. package/esm/deps/deno.land/std@0.217.0/assert/_diff.d.ts.map +0 -1
  54. package/esm/deps/deno.land/std@0.217.0/assert/_format.d.ts.map +0 -1
  55. package/esm/deps/deno.land/std@0.217.0/assert/assert.d.ts.map +0 -1
  56. package/esm/deps/deno.land/std@0.217.0/assert/assert_almost_equals.d.ts.map +0 -1
  57. package/esm/deps/deno.land/std@0.217.0/assert/assert_array_includes.d.ts.map +0 -1
  58. package/esm/deps/deno.land/std@0.217.0/assert/assert_equals.d.ts.map +0 -1
  59. package/esm/deps/deno.land/std@0.217.0/assert/assert_exists.d.ts.map +0 -1
  60. package/esm/deps/deno.land/std@0.217.0/assert/assert_false.d.ts.map +0 -1
  61. package/esm/deps/deno.land/std@0.217.0/assert/assert_greater.d.ts.map +0 -1
  62. package/esm/deps/deno.land/std@0.217.0/assert/assert_greater_or_equal.d.ts.map +0 -1
  63. package/esm/deps/deno.land/std@0.217.0/assert/assert_instance_of.d.ts.map +0 -1
  64. package/esm/deps/deno.land/std@0.217.0/assert/assert_is_error.d.ts.map +0 -1
  65. package/esm/deps/deno.land/std@0.217.0/assert/assert_less.d.ts.map +0 -1
  66. package/esm/deps/deno.land/std@0.217.0/assert/assert_less_or_equal.d.ts.map +0 -1
  67. package/esm/deps/deno.land/std@0.217.0/assert/assert_match.d.ts.map +0 -1
  68. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_equals.d.ts.map +0 -1
  69. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_instance_of.d.ts.map +0 -1
  70. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_match.d.ts.map +0 -1
  71. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_strict_equals.d.ts.map +0 -1
  72. package/esm/deps/deno.land/std@0.217.0/assert/assert_object_match.d.ts.map +0 -1
  73. package/esm/deps/deno.land/std@0.217.0/assert/assert_rejects.d.ts.map +0 -1
  74. package/esm/deps/deno.land/std@0.217.0/assert/assert_strict_equals.d.ts.map +0 -1
  75. package/esm/deps/deno.land/std@0.217.0/assert/assert_string_includes.d.ts.map +0 -1
  76. package/esm/deps/deno.land/std@0.217.0/assert/assert_throws.d.ts.map +0 -1
  77. package/esm/deps/deno.land/std@0.217.0/assert/assertion_error.d.ts.map +0 -1
  78. package/esm/deps/deno.land/std@0.217.0/assert/equal.d.ts.map +0 -1
  79. package/esm/deps/deno.land/std@0.217.0/assert/fail.d.ts.map +0 -1
  80. package/esm/deps/deno.land/std@0.217.0/assert/mod.d.ts.map +0 -1
  81. package/esm/deps/deno.land/std@0.217.0/assert/unimplemented.d.ts.map +0 -1
  82. package/esm/deps/deno.land/std@0.217.0/assert/unreachable.d.ts.map +0 -1
  83. package/esm/deps/deno.land/std@0.217.0/fmt/colors.d.ts.map +0 -1
  84. package/esm/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
  85. package/esm/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
  86. package/esm/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
  87. package/esm/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
  88. package/esm/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
  89. package/esm/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
  90. package/esm/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
  91. package/esm/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
  92. package/esm/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
  93. package/esm/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
  94. package/esm/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
  95. package/esm/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
  96. package/esm/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
  97. package/esm/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
  98. package/esm/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
  99. package/esm/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
  100. package/esm/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
  101. package/esm/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
  102. package/esm/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
  103. package/esm/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
  104. package/esm/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
  105. package/esm/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
  106. package/esm/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
  107. package/esm/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
  108. package/esm/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
  109. package/esm/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
  110. package/esm/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
  111. package/esm/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
  112. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +0 -1
  113. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  114. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  115. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  116. package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  117. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  118. package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  119. package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +0 -1
  120. package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +0 -1
  121. package/esm/mod.d.ts +0 -5
  122. package/esm/mod.d.ts.map +0 -1
  123. package/esm/mod.js +0 -4
  124. package/esm/package.json +0 -3
  125. package/esm/src/config/config_service.d.ts.map +0 -1
  126. package/esm/src/config/config_service.js +0 -19
  127. package/esm/src/config/index.d.ts +0 -2
  128. package/esm/src/config/index.d.ts.map +0 -1
  129. package/esm/src/config/index.js +0 -1
  130. package/esm/src/data/banks_tz.d.ts +0 -7
  131. package/esm/src/data/banks_tz.d.ts.map +0 -1
  132. package/esm/src/data/banks_tz.js +0 -197
  133. package/esm/src/data/countries.d.ts +0 -39
  134. package/esm/src/data/countries.d.ts.map +0 -1
  135. package/esm/src/data/countries.js +0 -2475
  136. package/esm/src/data/currencies.d.ts +0 -1901
  137. package/esm/src/data/currencies.d.ts.map +0 -1
  138. package/esm/src/data/currencies.js +0 -1073
  139. package/esm/src/data/phone_patterns.d.ts +0 -3809
  140. package/esm/src/data/phone_patterns.d.ts.map +0 -1
  141. package/esm/src/data/phone_patterns.js +0 -2325
  142. package/esm/src/models/amount/amount.d.ts +0 -53
  143. package/esm/src/models/amount/amount.d.ts.map +0 -1
  144. package/esm/src/models/amount/amount.js +0 -190
  145. package/esm/src/models/amount/amount.test.d.ts.map +0 -1
  146. package/esm/src/models/amount/antd_validator.d.ts +0 -40
  147. package/esm/src/models/amount/antd_validator.d.ts.map +0 -1
  148. package/esm/src/models/amount/antd_validator.js +0 -58
  149. package/esm/src/models/amount/antd_validator.test.d.ts.map +0 -1
  150. package/esm/src/models/amount/index.d.ts +0 -3
  151. package/esm/src/models/amount/index.d.ts.map +0 -1
  152. package/esm/src/models/amount/index.js +0 -2
  153. package/esm/src/models/bank/antd_validator.d.ts +0 -11
  154. package/esm/src/models/bank/antd_validator.d.ts.map +0 -1
  155. package/esm/src/models/bank/antd_validator.js +0 -26
  156. package/esm/src/models/bank/antd_validator.test.d.ts.map +0 -1
  157. package/esm/src/models/bank/bank.d.ts +0 -257
  158. package/esm/src/models/bank/bank.d.ts.map +0 -1
  159. package/esm/src/models/bank/bank.js +0 -450
  160. package/esm/src/models/bank/bank.test.d.ts.map +0 -1
  161. package/esm/src/models/bank/index.d.ts +0 -5
  162. package/esm/src/models/bank/index.d.ts.map +0 -1
  163. package/esm/src/models/bank/index.js +0 -4
  164. package/esm/src/models/bank/types.d.ts.map +0 -1
  165. package/esm/src/models/bank/types.js +0 -45
  166. package/esm/src/models/bank/utils.d.ts +0 -8
  167. package/esm/src/models/bank/utils.d.ts.map +0 -1
  168. package/esm/src/models/bank/utils.js +0 -9
  169. package/esm/src/models/country/country.d.ts +0 -822
  170. package/esm/src/models/country/country.d.ts.map +0 -1
  171. package/esm/src/models/country/country.js +0 -737
  172. package/esm/src/models/country/country.test.d.ts.map +0 -1
  173. package/esm/src/models/country/index.d.ts +0 -4
  174. package/esm/src/models/country/index.d.ts.map +0 -1
  175. package/esm/src/models/country/index.js +0 -3
  176. package/esm/src/models/country/types.d.ts +0 -63
  177. package/esm/src/models/country/types.d.ts.map +0 -1
  178. package/esm/src/models/country/types.js +0 -105
  179. package/esm/src/models/country/utils.d.ts +0 -21
  180. package/esm/src/models/country/utils.d.ts.map +0 -1
  181. package/esm/src/models/currency/currency.d.ts +0 -465
  182. package/esm/src/models/currency/currency.d.ts.map +0 -1
  183. package/esm/src/models/currency/currency.js +0 -471
  184. package/esm/src/models/currency/currency.test.d.ts.map +0 -1
  185. package/esm/src/models/currency/index.d.ts +0 -4
  186. package/esm/src/models/currency/index.d.ts.map +0 -1
  187. package/esm/src/models/currency/index.js +0 -3
  188. package/esm/src/models/currency/types.d.ts.map +0 -1
  189. package/esm/src/models/currency/types.js +0 -28
  190. package/esm/src/models/currency/utils.d.ts +0 -8
  191. package/esm/src/models/currency/utils.d.ts.map +0 -1
  192. package/esm/src/models/currency/utils.js +0 -9
  193. package/esm/src/models/index.d.ts +0 -6
  194. package/esm/src/models/index.d.ts.map +0 -1
  195. package/esm/src/models/index.js +0 -5
  196. package/esm/src/models/phone_number/format.d.ts +0 -14
  197. package/esm/src/models/phone_number/format.d.ts.map +0 -1
  198. package/esm/src/models/phone_number/format.js +0 -14
  199. package/esm/src/models/phone_number/global/phone_number.d.ts +0 -161
  200. package/esm/src/models/phone_number/global/phone_number.d.ts.map +0 -1
  201. package/esm/src/models/phone_number/global/phone_number.js +0 -453
  202. package/esm/src/models/phone_number/global/phone_number.test.d.ts.map +0 -1
  203. package/esm/src/models/phone_number/global/service.d.ts +0 -267
  204. package/esm/src/models/phone_number/global/service.d.ts.map +0 -1
  205. package/esm/src/models/phone_number/global/service.js +0 -498
  206. package/esm/src/models/phone_number/global/service.test.d.ts.map +0 -1
  207. package/esm/src/models/phone_number/index.d.ts +0 -6
  208. package/esm/src/models/phone_number/index.d.ts.map +0 -1
  209. package/esm/src/models/phone_number/index.js +0 -5
  210. package/esm/src/models/phone_number/tz/antd_validator.d.ts +0 -77
  211. package/esm/src/models/phone_number/tz/antd_validator.d.ts.map +0 -1
  212. package/esm/src/models/phone_number/tz/antd_validator.js +0 -90
  213. package/esm/src/models/phone_number/tz/antdvalidator.test.d.ts.map +0 -1
  214. package/esm/src/models/phone_number/tz/network_operator.d.ts +0 -30
  215. package/esm/src/models/phone_number/tz/network_operator.d.ts.map +0 -1
  216. package/esm/src/models/phone_number/tz/network_operator.js +0 -47
  217. package/esm/src/models/phone_number/tz/phone_number.d.ts +0 -135
  218. package/esm/src/models/phone_number/tz/phone_number.d.ts.map +0 -1
  219. package/esm/src/models/phone_number/tz/phone_number.js +0 -278
  220. package/esm/src/models/phone_number/tz/phone_number.test.d.ts.map +0 -1
  221. package/esm/src/reports/index.d.ts +0 -2
  222. package/esm/src/reports/index.d.ts.map +0 -1
  223. package/esm/src/reports/index.js +0 -1
  224. package/esm/src/reports/report_manager.d.ts +0 -144
  225. package/esm/src/reports/report_manager.d.ts.map +0 -1
  226. package/esm/src/reports/report_manager.js +0 -318
  227. package/esm/src/utils/id.d.ts +0 -12
  228. package/esm/src/utils/id.d.ts.map +0 -1
  229. package/esm/src/utils/id.js +0 -19
  230. package/esm/src/utils/index.d.ts +0 -4
  231. package/esm/src/utils/index.d.ts.map +0 -1
  232. package/esm/src/utils/index.js +0 -3
  233. package/esm/src/utils/text.d.ts.map +0 -1
  234. package/esm/src/utils/text.js +0 -68
  235. package/esm/src/utils/text.test.d.ts.map +0 -1
  236. package/esm/src/utils/time.d.ts +0 -21
  237. package/esm/src/utils/time.d.ts.map +0 -1
  238. package/esm/src/utils/time.js +0 -34
  239. package/script/_dnt.test_shims.d.ts.map +0 -1
  240. package/script/deps/deno.land/std@0.217.0/assert/_constants.d.ts.map +0 -1
  241. package/script/deps/deno.land/std@0.217.0/assert/_diff.d.ts.map +0 -1
  242. package/script/deps/deno.land/std@0.217.0/assert/_format.d.ts.map +0 -1
  243. package/script/deps/deno.land/std@0.217.0/assert/assert.d.ts.map +0 -1
  244. package/script/deps/deno.land/std@0.217.0/assert/assert_almost_equals.d.ts.map +0 -1
  245. package/script/deps/deno.land/std@0.217.0/assert/assert_array_includes.d.ts.map +0 -1
  246. package/script/deps/deno.land/std@0.217.0/assert/assert_equals.d.ts.map +0 -1
  247. package/script/deps/deno.land/std@0.217.0/assert/assert_exists.d.ts.map +0 -1
  248. package/script/deps/deno.land/std@0.217.0/assert/assert_false.d.ts.map +0 -1
  249. package/script/deps/deno.land/std@0.217.0/assert/assert_greater.d.ts.map +0 -1
  250. package/script/deps/deno.land/std@0.217.0/assert/assert_greater_or_equal.d.ts.map +0 -1
  251. package/script/deps/deno.land/std@0.217.0/assert/assert_instance_of.d.ts.map +0 -1
  252. package/script/deps/deno.land/std@0.217.0/assert/assert_is_error.d.ts.map +0 -1
  253. package/script/deps/deno.land/std@0.217.0/assert/assert_less.d.ts.map +0 -1
  254. package/script/deps/deno.land/std@0.217.0/assert/assert_less_or_equal.d.ts.map +0 -1
  255. package/script/deps/deno.land/std@0.217.0/assert/assert_match.d.ts.map +0 -1
  256. package/script/deps/deno.land/std@0.217.0/assert/assert_not_equals.d.ts.map +0 -1
  257. package/script/deps/deno.land/std@0.217.0/assert/assert_not_instance_of.d.ts.map +0 -1
  258. package/script/deps/deno.land/std@0.217.0/assert/assert_not_match.d.ts.map +0 -1
  259. package/script/deps/deno.land/std@0.217.0/assert/assert_not_strict_equals.d.ts.map +0 -1
  260. package/script/deps/deno.land/std@0.217.0/assert/assert_object_match.d.ts.map +0 -1
  261. package/script/deps/deno.land/std@0.217.0/assert/assert_rejects.d.ts.map +0 -1
  262. package/script/deps/deno.land/std@0.217.0/assert/assert_strict_equals.d.ts.map +0 -1
  263. package/script/deps/deno.land/std@0.217.0/assert/assert_string_includes.d.ts.map +0 -1
  264. package/script/deps/deno.land/std@0.217.0/assert/assert_throws.d.ts.map +0 -1
  265. package/script/deps/deno.land/std@0.217.0/assert/assertion_error.d.ts.map +0 -1
  266. package/script/deps/deno.land/std@0.217.0/assert/equal.d.ts.map +0 -1
  267. package/script/deps/deno.land/std@0.217.0/assert/fail.d.ts.map +0 -1
  268. package/script/deps/deno.land/std@0.217.0/assert/mod.d.ts.map +0 -1
  269. package/script/deps/deno.land/std@0.217.0/assert/unimplemented.d.ts.map +0 -1
  270. package/script/deps/deno.land/std@0.217.0/assert/unreachable.d.ts.map +0 -1
  271. package/script/deps/deno.land/std@0.217.0/fmt/colors.d.ts.map +0 -1
  272. package/script/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
  273. package/script/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
  274. package/script/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
  275. package/script/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
  276. package/script/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
  277. package/script/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
  278. package/script/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
  279. package/script/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
  280. package/script/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
  281. package/script/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
  282. package/script/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
  283. package/script/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
  284. package/script/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
  285. package/script/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
  286. package/script/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
  287. package/script/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
  288. package/script/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
  289. package/script/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
  290. package/script/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
  291. package/script/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
  292. package/script/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
  293. package/script/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
  294. package/script/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
  295. package/script/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
  296. package/script/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
  297. package/script/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
  298. package/script/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
  299. package/script/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
  300. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +0 -1
  301. package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  302. package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  303. package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  304. package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  305. package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  306. package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  307. package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +0 -1
  308. package/script/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +0 -1
  309. package/script/mod.d.ts +0 -5
  310. package/script/mod.d.ts.map +0 -1
  311. package/script/mod.js +0 -20
  312. package/script/package.json +0 -3
  313. package/script/src/config/config_service.d.ts +0 -11
  314. package/script/src/config/config_service.d.ts.map +0 -1
  315. package/script/src/config/config_service.js +0 -23
  316. package/script/src/config/index.d.ts +0 -2
  317. package/script/src/config/index.d.ts.map +0 -1
  318. package/script/src/config/index.js +0 -17
  319. package/script/src/data/banks_tz.d.ts +0 -7
  320. package/script/src/data/banks_tz.d.ts.map +0 -1
  321. package/script/src/data/banks_tz.js +0 -199
  322. package/script/src/data/countries.d.ts +0 -39
  323. package/script/src/data/countries.d.ts.map +0 -1
  324. package/script/src/data/countries.js +0 -2477
  325. package/script/src/data/currencies.d.ts +0 -1901
  326. package/script/src/data/currencies.d.ts.map +0 -1
  327. package/script/src/data/currencies.js +0 -1075
  328. package/script/src/data/phone_patterns.d.ts +0 -3809
  329. package/script/src/data/phone_patterns.d.ts.map +0 -1
  330. package/script/src/data/phone_patterns.js +0 -2327
  331. package/script/src/models/amount/amount.d.ts +0 -53
  332. package/script/src/models/amount/amount.d.ts.map +0 -1
  333. package/script/src/models/amount/amount.js +0 -194
  334. package/script/src/models/amount/amount.test.d.ts.map +0 -1
  335. package/script/src/models/amount/antd_validator.d.ts +0 -40
  336. package/script/src/models/amount/antd_validator.d.ts.map +0 -1
  337. package/script/src/models/amount/antd_validator.js +0 -62
  338. package/script/src/models/amount/antd_validator.test.d.ts.map +0 -1
  339. package/script/src/models/amount/index.d.ts +0 -3
  340. package/script/src/models/amount/index.d.ts.map +0 -1
  341. package/script/src/models/amount/index.js +0 -18
  342. package/script/src/models/bank/antd_validator.d.ts +0 -11
  343. package/script/src/models/bank/antd_validator.d.ts.map +0 -1
  344. package/script/src/models/bank/antd_validator.js +0 -30
  345. package/script/src/models/bank/antd_validator.test.d.ts.map +0 -1
  346. package/script/src/models/bank/bank.d.ts +0 -257
  347. package/script/src/models/bank/bank.d.ts.map +0 -1
  348. package/script/src/models/bank/bank.js +0 -458
  349. package/script/src/models/bank/bank.test.d.ts.map +0 -1
  350. package/script/src/models/bank/index.d.ts +0 -5
  351. package/script/src/models/bank/index.d.ts.map +0 -1
  352. package/script/src/models/bank/index.js +0 -20
  353. package/script/src/models/bank/types.d.ts +0 -7
  354. package/script/src/models/bank/types.d.ts.map +0 -1
  355. package/script/src/models/bank/types.js +0 -48
  356. package/script/src/models/bank/utils.d.ts +0 -8
  357. package/script/src/models/bank/utils.d.ts.map +0 -1
  358. package/script/src/models/bank/utils.js +0 -12
  359. package/script/src/models/country/country.d.ts.map +0 -1
  360. package/script/src/models/country/country.js +0 -745
  361. package/script/src/models/country/country.test.d.ts.map +0 -1
  362. package/script/src/models/country/index.d.ts +0 -4
  363. package/script/src/models/country/index.d.ts.map +0 -1
  364. package/script/src/models/country/index.js +0 -19
  365. package/script/src/models/country/types.d.ts.map +0 -1
  366. package/script/src/models/country/types.js +0 -108
  367. package/script/src/models/country/utils.d.ts +0 -21
  368. package/script/src/models/country/utils.d.ts.map +0 -1
  369. package/script/src/models/country/utils.js +0 -30
  370. package/script/src/models/currency/currency.d.ts.map +0 -1
  371. package/script/src/models/currency/currency.js +0 -479
  372. package/script/src/models/currency/currency.test.d.ts.map +0 -1
  373. package/script/src/models/currency/index.d.ts +0 -4
  374. package/script/src/models/currency/index.d.ts.map +0 -1
  375. package/script/src/models/currency/index.js +0 -19
  376. package/script/src/models/currency/types.d.ts +0 -21
  377. package/script/src/models/currency/types.d.ts.map +0 -1
  378. package/script/src/models/currency/types.js +0 -31
  379. package/script/src/models/currency/utils.d.ts +0 -8
  380. package/script/src/models/currency/utils.d.ts.map +0 -1
  381. package/script/src/models/currency/utils.js +0 -12
  382. package/script/src/models/index.d.ts +0 -6
  383. package/script/src/models/index.d.ts.map +0 -1
  384. package/script/src/models/index.js +0 -21
  385. package/script/src/models/phone_number/format.d.ts +0 -14
  386. package/script/src/models/phone_number/format.d.ts.map +0 -1
  387. package/script/src/models/phone_number/format.js +0 -17
  388. package/script/src/models/phone_number/global/phone_number.d.ts +0 -161
  389. package/script/src/models/phone_number/global/phone_number.d.ts.map +0 -1
  390. package/script/src/models/phone_number/global/phone_number.js +0 -457
  391. package/script/src/models/phone_number/global/phone_number.test.d.ts.map +0 -1
  392. package/script/src/models/phone_number/global/service.d.ts +0 -267
  393. package/script/src/models/phone_number/global/service.d.ts.map +0 -1
  394. package/script/src/models/phone_number/global/service.js +0 -506
  395. package/script/src/models/phone_number/global/service.test.d.ts.map +0 -1
  396. package/script/src/models/phone_number/index.d.ts +0 -6
  397. package/script/src/models/phone_number/index.d.ts.map +0 -1
  398. package/script/src/models/phone_number/index.js +0 -21
  399. package/script/src/models/phone_number/tz/antd_validator.d.ts +0 -77
  400. package/script/src/models/phone_number/tz/antd_validator.d.ts.map +0 -1
  401. package/script/src/models/phone_number/tz/antd_validator.js +0 -94
  402. package/script/src/models/phone_number/tz/antdvalidator.test.d.ts.map +0 -1
  403. package/script/src/models/phone_number/tz/network_operator.d.ts +0 -30
  404. package/script/src/models/phone_number/tz/network_operator.d.ts.map +0 -1
  405. package/script/src/models/phone_number/tz/network_operator.js +0 -50
  406. package/script/src/models/phone_number/tz/phone_number.d.ts +0 -135
  407. package/script/src/models/phone_number/tz/phone_number.d.ts.map +0 -1
  408. package/script/src/models/phone_number/tz/phone_number.js +0 -282
  409. package/script/src/models/phone_number/tz/phone_number.test.d.ts.map +0 -1
  410. package/script/src/reports/index.d.ts +0 -2
  411. package/script/src/reports/index.d.ts.map +0 -1
  412. package/script/src/reports/index.js +0 -17
  413. package/script/src/reports/report_manager.d.ts.map +0 -1
  414. package/script/src/reports/report_manager.js +0 -328
  415. package/script/src/utils/id.d.ts.map +0 -1
  416. package/script/src/utils/id.js +0 -23
  417. package/script/src/utils/index.d.ts +0 -4
  418. package/script/src/utils/index.d.ts.map +0 -1
  419. package/script/src/utils/index.js +0 -19
  420. package/script/src/utils/text.d.ts +0 -32
  421. package/script/src/utils/text.d.ts.map +0 -1
  422. package/script/src/utils/text.js +0 -75
  423. package/script/src/utils/text.test.d.ts.map +0 -1
  424. package/script/src/utils/time.d.ts.map +0 -1
  425. package/script/src/utils/time.js +0 -39
@@ -0,0 +1 @@
1
+ export * from "./amount";
@@ -0,0 +1,106 @@
1
+ import { ISO2CountryCode } from "../country/country.types";
2
+ import type { BankSwiftCode, KEBankSwiftCode, TZBankSwiftCode } from "./bank.types";
3
+ export declare class Bank {
4
+ /**
5
+ * The full registered name of the bank.
6
+ */
7
+ readonly fullName: string;
8
+ /**
9
+ * The commonly used short name or abbreviation for the bank.
10
+ */
11
+ readonly shortName: string;
12
+ /**
13
+ * The SWIFT/BIC code for the bank's head office.
14
+ */
15
+ readonly swiftCode: TZBankSwiftCode | KEBankSwiftCode;
16
+ /**
17
+ * The ISO 3166-1 alpha-2 country code (e.g., 'TZ', 'KE').
18
+ */
19
+ readonly countryCode: ISO2CountryCode;
20
+ /**
21
+ * Creates a new Bank instance.
22
+ *
23
+ * @param fullName The full registered name of the bank
24
+ * @param shortName The commonly used short name or abbreviation for the bank
25
+ * @param swiftCode The SWIFT/BIC code for the bank's head office
26
+ * @param countryCode The ISO 3166-1 alpha-2 country code
27
+ */
28
+ constructor(fullName: string, shortName: string, swiftCode: TZBankSwiftCode | KEBankSwiftCode, countryCode: ISO2CountryCode);
29
+ /**
30
+ * Returns a string representation of the bank.
31
+ * @returns A formatted string, e.g., "CRDB BANK PLC (CRDB) - SWIFT: CORUTZTZ [TZ]"
32
+ */
33
+ toString(): string;
34
+ static from(swiftCode: BankSwiftCode, countryCode: ISO2CountryCode): Bank;
35
+ /**
36
+ * Static method to determine if an unknown object is a valid Bank object.
37
+ *
38
+ * This method performs a series of checks to validate if the provided object conforms
39
+ * to the Bank interface and contains valid data.
40
+ *
41
+ * @param {unknown} obj - The object to validate.
42
+ * @returns {obj is Bank} - Returns true if the object is a valid Bank, false otherwise.
43
+ */
44
+ static is(obj: unknown): obj is Bank;
45
+ }
46
+ /**
47
+ * Service for managing bank data, validation, and instance creation
48
+ * across multiple countries. Acts as the central Facade and Factory.
49
+ * @class BankService
50
+ */
51
+ export declare class BankService {
52
+ private static instance;
53
+ private loadedData;
54
+ private constructor();
55
+ /**
56
+ * Gets the singleton instance of BankService.
57
+ * Initializes known countries synchronously on first call.
58
+ * Consider async initialization if data loading becomes async.
59
+ */
60
+ static getInstance(): BankService;
61
+ /**
62
+ * Initializes bank data for a specific country synchronously.
63
+ * @param countryCode The ISO country code (e.g., 'TZ', 'KE').
64
+ * @returns True if successful or already loaded, false on failure.
65
+ */
66
+ initializeCountry(countryCode: ISO2CountryCode): boolean;
67
+ /**
68
+ * Retrieves the loaded data structure for a given country.
69
+ * Ensures country is initialized.
70
+ * @param countryCode The ISO country code.
71
+ * @returns The CountryBankData structure or undefined.
72
+ */
73
+ private getCountryData;
74
+ /**
75
+ * Retrieves a Bank instance by its SWIFT code for a specific country.
76
+ * Performs validation before returning.
77
+ * @param countryCode The ISO country code.
78
+ * @param swiftCode The SWIFT code.
79
+ * @returns The Bank instance or undefined if SWIFT is invalid or not found.
80
+ */
81
+ getBankBySwiftCode(countryCode: ISO2CountryCode, swiftCode: BankSwiftCode): Bank | undefined;
82
+ /**
83
+ * Retrieves all banks for a specific country.
84
+ * @param countryCode The ISO country code.
85
+ * @returns An array of Bank instances, or empty array.
86
+ */
87
+ getAllBanks(countryCode: ISO2CountryCode): Bank[];
88
+ /**
89
+ * Retrieves all banks for all supported countries.
90
+ * @param countryCode The ISO country code.
91
+ * @returns An array of Bank instances, or empty array.
92
+ */
93
+ getAllSupportedBanks(): Bank[];
94
+ /**
95
+ * Searches all supported banks for a bank with the provided swift code
96
+ */
97
+ detectBank(swiftCode: string): Bank | undefined;
98
+ /**
99
+ * Searches for banks within a specific country by name or SWIFT code.
100
+ * @param countryCode The ISO country code.
101
+ * @param searchTerm The term to search for (case-insensitive).
102
+ * @param limit Max number of results.
103
+ * @returns An array of matching Bank instances.
104
+ */
105
+ searchBanks(countryCode: ISO2CountryCode, searchTerm: string, limit?: number): Bank[];
106
+ }
@@ -0,0 +1,3 @@
1
+ import { z } from "zod";
2
+ export declare const TZBankSWIFTCodeSchema: z.ZodEffects<z.ZodString, string, string>;
3
+ export declare const KEBankSWIFTCodeSchema: z.ZodEffects<z.ZodString, string, string>;
@@ -1,7 +1,5 @@
1
+ export declare const KEBankSwiftCodesSet: Set<string>;
2
+ export declare const TZBankSwiftCodesSet: Set<string>;
3
+ export type KEBankSwiftCode = "KCBLKENX" | "EQBLKENX" | "KCOOKENX" | "SCBLKENX" | "BARCKENX" | "CBAFKENX" | "DTKEKENX" | "FABLKENA" | "CITIKENA" | "HFCOKENX" | "SBICKENX" | "NBKEKENX" | "AFRIKENX" | "GTBOKENX" | "IMBLKENX" | "ECOCKENX" | "BARBKENX" | "BKIDKENX" | "UNAFKENX" | "SGKENX";
1
4
  export type TZBankSwiftCode = "CORUTZTZ" | "PBZATZTZ" | "SCBLTZTX" | "SBICTZTX" | "CITITZTZ" | "EUAFTZTZ" | "DTKETZTZ" | "AKCOTZTZ" | "EXTNTZTZ" | "KLMJTZTZ" | "NLCBTZTX" | "NMIBTZTZ" | "KCBLTZTZ" | "HABLTZTZ" | "BKMYTZTZ" | "BARCTZTZ" | "IMBLTZTZ" | "CBAFTZTZ" | "DASUTZTZ" | "BARBTZTZ" | "AZANTZTZ" | "UCCTTZTZ" | "FMBZTZTX" | "ACTZTZTZ" | "BKIDTZTZ" | "UNAFTZTZ" | "MKCBTZTZ" | "ECOCTZTZ" | "MWCBTZTZ" | "FIRNTZTX" | "AMNNTZTZ" | "EQBLTZTZ" | "TAPBTZTZ" | "MBTLTZTZ" | "CNRBTZTZ" | "MWCOTZTZ" | "GTBITZTZ" | "YETMTZTZ" | "CDSHTZTZ";
2
- /**
3
- * A Set containing all SWIFT codes from the provided list.
4
- * Useful for quick lookups (e.g., checking if a string is a valid SWIFT code from this list).
5
- */
6
- export declare const TZBankSwiftCodesSet: Set<TZBankSwiftCode>;
7
- //# sourceMappingURL=types.d.ts.map
5
+ export type BankSwiftCode = KEBankSwiftCode | TZBankSwiftCode;
@@ -0,0 +1,80 @@
1
+ import { ISO2CountryCode } from "../country";
2
+ import { BankSwiftCode } from "./bank.types";
3
+ export declare const BankValidation: {
4
+ /**
5
+ * Validates a bank account number format for a specific country.
6
+ * @param accountNumber The account number string.
7
+ * @param countryCode The ISO2 country code.
8
+ * @returns True if the format is valid, false otherwise.
9
+ */
10
+ validateAccountNumber: (accountNumber: string, countryCode: ISO2CountryCode) => boolean;
11
+ /**
12
+ * Validates a bank account number format for any supported country.
13
+ * @param accountNumber The account number string.
14
+ * @returns True if the format is valid for any supported country, false otherwise.
15
+ */
16
+ validateAccountNumberForAnyCountry: (accountNumber: string) => boolean;
17
+ /**
18
+ * Validates a SWIFT/BIC code for a specific country.
19
+ * @param swiftCode The SWIFT code string.
20
+ * @param countryCode The ISO2 country code.
21
+ * @returns True if the format is valid, false otherwise.
22
+ */
23
+ validateSwiftCode: (swiftCode: string, countryCode: ISO2CountryCode) => swiftCode is BankSwiftCode;
24
+ /**
25
+ * Validates a SWIFT/BIC code for any supported country.
26
+ * @param swiftCode The SWIFT code string.
27
+ * @returns True if the SWIFT code is valid for any supported country, false otherwise.
28
+ */
29
+ validateSwiftCodeForAnyCountry: (swiftCode: string) => swiftCode is BankSwiftCode;
30
+ /**
31
+ * Validates an account name based on various criteria.
32
+ * This validation is country-agnostic as account name rules are generally similar.
33
+ *
34
+ * @param {string} accountName - The account name to validate
35
+ * @returns {boolean} True if the account name meets all validation criteria, false otherwise
36
+ *
37
+ * @example
38
+ * // Returns true
39
+ * validateAccountName("John Smith");
40
+ *
41
+ * @example
42
+ * // Returns false (too short)
43
+ * validateAccountName("Jo");
44
+ *
45
+ * @example
46
+ * // Returns false (invalid characters)
47
+ * validateAccountName("User123");
48
+ */
49
+ validateAccountName: (accountName: string) => boolean;
50
+ /**
51
+ * Validates an account name for any supported country.
52
+ * Since account name validation is generally country-agnostic, this is an alias to validateAccountName.
53
+ * @param accountName The account name to validate.
54
+ * @returns True if the account name is valid, false otherwise.
55
+ */
56
+ validateAccountNameForAnyCountry: (accountName: string) => boolean;
57
+ /**
58
+ * Validates all bank details (account number, SWIFT code, and account name) for a specific country.
59
+ * @param accountNumber The account number string.
60
+ * @param swiftCode The SWIFT code string.
61
+ * @param accountName The account name string.
62
+ * @param countryCode The ISO2 country code.
63
+ * @returns True if all details are valid for the specified country, false otherwise.
64
+ */
65
+ validateAllBankDetails: (accountNumber: string, swiftCode: string, accountName: string, countryCode: ISO2CountryCode) => boolean;
66
+ /**
67
+ * Validates all bank details (account number, SWIFT code, and account name) for any supported country.
68
+ * @param accountNumber The account number string.
69
+ * @param swiftCode The SWIFT code string.
70
+ * @param accountName The account name string.
71
+ * @returns True if all details are valid for any supported country, false otherwise.
72
+ */
73
+ validateAllBankDetailsForAnyCountry: (accountNumber: string, swiftCode: string, accountName: string) => boolean;
74
+ /**
75
+ * Determines which country a SWIFT code belongs to.
76
+ * @param swiftCode The SWIFT code string.
77
+ * @returns The ISO2 country code if found, undefined otherwise.
78
+ */
79
+ getCountryFromSwiftCode: (swiftCode: string) => ISO2CountryCode | undefined;
80
+ };
@@ -0,0 +1,4 @@
1
+ export * from "./bank";
2
+ export * from "./bank.types";
3
+ export * from "./bank.validation";
4
+ export * from "./bank.schema";
@@ -24,9 +24,9 @@
24
24
  * The addition of currency support through the getCurrency() method leverages
25
25
  * the Currency model while maintaining a clean separation of concerns.
26
26
  */
27
- import { Currency } from "../currency/currency.js";
28
- import type { CurrencyCode } from "../currency/index.js";
29
- import type { CountryCode, ISO2CountryCode, ISO3CountryCode } from "./types.js";
27
+ import { Currency } from "../../models/currency";
28
+ import type { CurrencyCode } from "../../models/currency";
29
+ import type { CountryCode, ISO2CountryCode, ISO3CountryCode } from "./country.types";
30
30
  /**
31
31
  * Enum for continents
32
32
  */
@@ -78,6 +78,7 @@ export declare class Country {
78
78
  private readonly _continent;
79
79
  private readonly _region;
80
80
  private readonly _currencyCode;
81
+ private readonly _dialCode;
81
82
  static readonly AF: Country;
82
83
  static readonly AX: Country;
83
84
  static readonly AL: Country;
@@ -578,8 +579,9 @@ export declare class Country {
578
579
  * @param {CONTINENT} _continent - The continent where the country is located
579
580
  * @param {SUB_REGION} _region - The region within the continent where the country is located
580
581
  * @param {string | null} _currencyCode - The ISO currency code used in the country
582
+ * @param {number} _dialCode - The dial code used in the country
581
583
  */
582
- constructor(_name: string, _iso2: ISO2CountryCode, _nameOfficial: string, _iso3: ISO3CountryCode, _flagEmoji?: string, _continent?: CONTINENT, _region?: SUB_REGION, _currencyCode?: CurrencyCode | null);
584
+ constructor(token: symbol, _name: string, _iso2: ISO2CountryCode, _nameOfficial: string | undefined, _iso3: ISO3CountryCode, _flagEmoji: string | undefined, _continent: CONTINENT | undefined, _region: SUB_REGION | undefined, _currencyCode: (CurrencyCode | null) | undefined, _dialCode: number);
583
585
  /**
584
586
  * Gets the common name of the country.
585
587
  * @returns {string} The common name of the country
@@ -620,6 +622,11 @@ export declare class Country {
620
622
  * @returns {string | null} The ISO currency code of the country, or null if not available
621
623
  */
622
624
  get currencyCode(): CurrencyCode | null;
625
+ /**
626
+ * Gets the dial code used in the country.
627
+ * @returns {number} The dial code of the country
628
+ */
629
+ get dialCode(): number;
623
630
  /**
624
631
  * Gets the Currency instance for this country.
625
632
  * @returns {Currency | undefined} The Currency instance or undefined if no currency is assigned
@@ -819,4 +826,3 @@ export declare class CountryService {
819
826
  */
820
827
  compare(country1: Country, country2: Country): boolean;
821
828
  }
822
- //# sourceMappingURL=country.d.ts.map
@@ -0,0 +1,46 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Zod schema for validating ISO 3166-1 alpha-2 country codes.
4
+ *
5
+ * This schema checks if a given string is a valid ISO 3166-1 alpha-2 country code
6
+ * by checking against the predefined set of valid codes.
7
+ *
8
+ * @example
9
+ * const result = iso2CountryCodeSchema.safeParse("US");
10
+ * if (result.success) {
11
+ * console.log("Valid ISO2 country code");
12
+ * } else {
13
+ * console.error("Invalid ISO2 country code");
14
+ * }
15
+ */
16
+ export declare const ISO2CountryCodeSchema: z.ZodEffects<z.ZodString, string, string>;
17
+ /**
18
+ * Zod schema for validating ISO 3166-1 alpha-3 country codes.
19
+ *
20
+ * This schema checks if a given string is a valid ISO 3166-1 alpha-3 country code
21
+ * by checking against the predefined set of valid codes.
22
+ *
23
+ * @example
24
+ * const result = iso3CountryCodeSchema.safeParse("USA");
25
+ * if (result.success) {
26
+ * console.log("Valid ISO3 country code");
27
+ * } else {
28
+ * console.error("Invalid ISO3 country code");
29
+ * }
30
+ */
31
+ export declare const ISO3CountryCodeSchema: z.ZodEffects<z.ZodString, string, string>;
32
+ /**
33
+ * Zod schema for validating either ISO 3166-1 alpha-2 or alpha-3 country codes.
34
+ *
35
+ * This schema allows for flexibility in accepting both two-letter and three-letter
36
+ * country codes, making it useful for functions that need to handle both formats.
37
+ *
38
+ * @example
39
+ * const result = countryCodeSchema.safeParse("US");
40
+ * if (result.success) {
41
+ * console.log("Valid country code");
42
+ * } else {
43
+ * console.error("Invalid country code");
44
+ * }
45
+ */
46
+ export declare const CountryCodeSchema: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
@@ -60,4 +60,3 @@ export declare const ISO3CountryCodesSet: Set<string>;
60
60
  * @see ISO3CountryCode - For three-letter country codes only
61
61
  */
62
62
  export type CountryCode = ISO2CountryCode | ISO3CountryCode;
63
- //# sourceMappingURL=types.d.ts.map
@@ -1,25 +1,26 @@
1
- import { ISO2CountryCodesSet } from "./index.js";
1
+ import { type ISO2CountryCode, type ISO3CountryCode } from "./country.types";
2
+ import type { CountryCode } from "..";
3
+ export declare const CountryValidation: {
4
+ isISO2CountryCode: typeof isISO2CountryCode;
5
+ isISO3CountryCode: typeof isISO3CountryCode;
6
+ isCountryCode: typeof isCountryCode;
7
+ };
2
8
  /**
3
9
  * Type guard to check if a string is a valid ISO2CountryCode.
4
10
  * @param code The string to check.
5
11
  * @returns True if the string is a member of the ISO2CountryCode union type, false otherwise.
6
12
  */
7
- export function isISO2CountryCode(code) {
8
- return ISO2CountryCodesSet.has(code);
9
- }
13
+ declare function isISO2CountryCode(code: string): code is ISO2CountryCode;
10
14
  /**
11
15
  * Type guard to check if a string is a valid isISO3CountryCode.
12
16
  * @param code The string to check.
13
17
  * @returns True if the string is a member of the isISO3CountryCode union type, false otherwise.
14
18
  */
15
- export function isISO3CountryCode(code) {
16
- return ISO2CountryCodesSet.has(code);
17
- }
19
+ declare function isISO3CountryCode(code: string): code is ISO3CountryCode;
18
20
  /**
19
21
  * Type guard to check if a string is a valid CountryCode.
20
22
  * @param code The string to check
21
23
  * @returns True if the string is a valid ISO-2 or ISO-3 country code
22
24
  */
23
- export function isCountryCode(code) {
24
- return isISO2CountryCode(code) || isISO3CountryCode(code);
25
- }
25
+ declare function isCountryCode(code: string): code is CountryCode;
26
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from "./country";
2
+ export * from "./country.types";
3
+ export * from "./country.validation";
4
+ export * from "./country.schema";
@@ -26,7 +26,7 @@
26
26
  * This approach follows the principle that closely related classes with circular
27
27
  * dependencies are best managed in a unified module.
28
28
  */
29
- import type { CurrencyCode } from "./types.js";
29
+ import type { CurrencyCode } from "./currency.types";
30
30
  /**
31
31
  * Represents a currency with essential details.
32
32
  * @class Currency
@@ -284,7 +284,7 @@ export declare class Currency {
284
284
  * @param {CurrencyCode} _code - The ISO 4217 currency code
285
285
  * @param {string} _namePlural - The plural form of the currency name
286
286
  */
287
- constructor(_symbol: string, _name: string, _symbolNative: string, _decimalDigits: number, _rounding: number, _code: CurrencyCode, _namePlural: string);
287
+ constructor(token: symbol, _symbol: string, _name: string, _symbolNative: string, _decimalDigits: number, _rounding: number, _code: CurrencyCode, _namePlural: string);
288
288
  /**
289
289
  * Gets the international symbol of the currency.
290
290
  * @returns {string} The international symbol of the currency
@@ -462,4 +462,3 @@ export declare class CurrencyService {
462
462
  */
463
463
  private escapeRegExp;
464
464
  }
465
- //# sourceMappingURL=currency.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Zod schema for validating ISO 4217 currency codes
4
+ *
5
+ * This schema checks if the provided string is a valid ISO 4217 currency code.
6
+ * If the validation fails, it returns an error message.
7
+ */
8
+ export declare const CurrencyCodeSchema: z.ZodEffects<z.ZodString, string, string>;
@@ -17,5 +17,4 @@
17
17
  * Example: "USD" for US Dollar, "EUR" for Euro, "JPY" for Japanese Yen
18
18
  */
19
19
  export type CurrencyCode = "USD" | "CAD" | "EUR" | "AED" | "AFN" | "ALL" | "AMD" | "ARS" | "AUD" | "AZN" | "BAM" | "BDT" | "BGN" | "BHD" | "BIF" | "BND" | "BOB" | "BRL" | "BWP" | "BYN" | "BZD" | "CDF" | "CHF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "GBP" | "GEL" | "GHS" | "GNF" | "GTQ" | "HKD" | "HNL" | "HRK" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JMD" | "JOD" | "JPY" | "KES" | "KHR" | "KMF" | "KRW" | "KWD" | "KZT" | "LBP" | "LKR" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MOP" | "MUR" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SDG" | "SEK" | "SGD" | "SOS" | "SSP" | "SYP" | "THB" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "UYU" | "UZS" | "VES" | "VND" | "XAF" | "XOF" | "YER" | "ZAR" | "ZMW" | "STN" | "MRU" | "ZWG";
20
- export declare const ValidCurrencyCodesSet: Set<CurrencyCode>;
21
- //# sourceMappingURL=types.d.ts.map
20
+ export declare const CurrencyCodesSet: Set<CurrencyCode>;
@@ -0,0 +1,11 @@
1
+ import { type CurrencyCode } from "./currency.types";
2
+ export declare const CurrencyValidation: {
3
+ isCurrencyCode: typeof isCurrencyCode;
4
+ };
5
+ /**
6
+ * Type guard to check if a string is a valid CurrencyCode.
7
+ * @param code The string to check.
8
+ * @returns True if the string is a member of the CurrencyCode union type, false otherwise.
9
+ */
10
+ declare function isCurrencyCode(code: string): code is CurrencyCode;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from "./currency";
2
+ export * from "./currency.types";
3
+ export * from "./currency.validation";
4
+ export * from "./currency.schema";
@@ -0,0 +1,5 @@
1
+ export * from "./amount/index";
2
+ export * from "./bank/index";
3
+ export * from "./phone-number/index";
4
+ export * from "./country/index";
5
+ export * from "./currency/index";
@@ -0,0 +1,6 @@
1
+ export * from "./phone-number.factory";
2
+ export * from "./phone-number.types";
3
+ export * from "./mno/mno.utils";
4
+ export * from "./mno/mno.types";
5
+ export * from "./phone-number";
6
+ export * from "./mno";
@@ -0,0 +1,6 @@
1
+ export * from "./ke/mobile-number.ke";
2
+ export * from "./ke/mobile-number.ke-mnos";
3
+ export * from "./tz/mobile-number.tz";
4
+ export * from "./tz/mobile-number.tz-mnos";
5
+ export * from "./mno.types";
6
+ export * from "./mno.utils";
@@ -0,0 +1,22 @@
1
+ import { ISO2CountryCode } from "../../../country/country.types";
2
+ import { CountryMNOImplementation, KEMNOId, MNOInfo } from "../mno.types";
3
+ /**
4
+ * Configuration object for Kenyan mobile network operators.
5
+ * Conforms to the generic MNOInfo interface.
6
+ */
7
+ export declare const KE_MNO_CONFIG: Record<KEMNOId, MNOInfo>;
8
+ /**
9
+ * Gets all available Kenyan MNO configurations.
10
+ * @returns Array of all KE MNO configurations.
11
+ */
12
+ export declare function getAllKEMNOs(): MNOInfo[];
13
+ export declare class KEMNOImplementation implements CountryMNOImplementation {
14
+ private static instance;
15
+ private constructor();
16
+ static getInstance(): KEMNOImplementation;
17
+ getAllMNOs(): MNOInfo[];
18
+ isValidMNOId(id: string): boolean;
19
+ getMNOById(id: string): MNOInfo | undefined;
20
+ requiresExplicitMNO(): boolean;
21
+ getCountryCode(): ISO2CountryCode;
22
+ }
@@ -0,0 +1,45 @@
1
+ import { ISO2CountryCode } from "../../../country";
2
+ import { MNOInfo } from "../mno.types";
3
+ import { PhoneNumber } from "../../phone-number";
4
+ import { type ParsedPhoneNumber, PhoneNumberService } from "../../phone-number.service";
5
+ import { type PhoneNumberContract, type PhoneNumberParseOptions, PhoneNumberType } from "../../phone-number.types";
6
+ /**
7
+ * Represents a validated Kenyan (KE) **mobile** phone number.
8
+ * Extends the generic PhoneNumber class and implements the common PhoneNumberContract interface.
9
+ * Note: Does not provide MNO details as per requirement.
10
+ */
11
+ export declare class KEMobileNumber extends PhoneNumber implements PhoneNumberContract {
12
+ readonly countryCode: ISO2CountryCode;
13
+ /**
14
+ * Protected constructor. Use static `from` method for instantiation.
15
+ * Calls the base class constructor.
16
+ */
17
+ protected constructor(parsedInfo: ParsedPhoneNumber, service: PhoneNumberService);
18
+ /**
19
+ * Validates the structure for a Kenyan **mobile** phone number.
20
+ * Checks base validity AND ensures the national number starts with a valid KE mobile prefix.
21
+ * @returns {boolean} True if the number is a valid KE mobile number structure.
22
+ */
23
+ validate(): boolean;
24
+ /**
25
+ * Gets associated mobile operator information. Returns undefined for KE.
26
+ * Overrides the base implementation.
27
+ * @returns {MNOInfo | undefined} Always returns undefined.
28
+ */
29
+ getOperatorInfo(): MNOInfo | undefined;
30
+ /**
31
+ * Gets the specific type for this class, overriding the base method.
32
+ * @returns {PhoneNumberType} Always returns MOBILE.
33
+ */
34
+ getNumberType(): PhoneNumberType;
35
+ /**
36
+ * Attempts to create a `KEMobileNumber` instance from a given string input.
37
+ * Performs KE-specific parsing and validation FIRST, then uses the core
38
+ * service for final validation and object creation.
39
+ *
40
+ * @param input - The input phone number string.
41
+ * @param options - Parsing options (optional).
42
+ * @returns {KEMobileNumber | undefined} An instance if valid, otherwise undefined.
43
+ */
44
+ static from(input: string | null | undefined, options?: PhoneNumberParseOptions): KEMobileNumber | undefined;
45
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Tanzanian mobile network operator identifiers.
3
+ * Values are used in payout channel-code field and should not change.
4
+ */
5
+ import { ISO2CountryCode } from "../../country/country.types";
6
+ export declare enum TZMNOId {
7
+ VODACOM = "VODACOM",
8
+ AIRTEL = "AIRTEL",
9
+ TIGO = "TIGO",
10
+ HALOTEL = "HALOTEL"
11
+ }
12
+ /**
13
+ * Kenyan mobile network operator identifiers.
14
+ * Values are used in payout channel-code field and should not change.
15
+ */
16
+ export declare enum KEMNOId {
17
+ SAFARICOM = "SAFARICOM",
18
+ AIRTEL = "AIRTEL"
19
+ }
20
+ /**
21
+ * Union type for all MNO IDs
22
+ */
23
+ export type MNOId = TZMNOId | KEMNOId;
24
+ /**
25
+ * Generic interface for Mobile Network Operator information.
26
+ * Now properly typed with specific MNO IDs.
27
+ */
28
+ export interface MNOInfo {
29
+ id: MNOId;
30
+ displayName: string;
31
+ mobileMoneyService: string;
32
+ }
33
+ /**
34
+ * Extended interface for country-specific MNO implementations
35
+ */
36
+ export interface CountryMNOImplementation {
37
+ /**
38
+ * Get all MNOs for this country
39
+ */
40
+ getAllMNOs(): MNOInfo[];
41
+ /**
42
+ * Validate if an MNO ID is valid for this country
43
+ */
44
+ isValidMNOId(id: string): boolean;
45
+ /**
46
+ * Get MNO info by ID
47
+ */
48
+ getMNOById(id: string): MNOInfo | undefined;
49
+ /**
50
+ * Check if this country requires explicit MNO (has MNP)
51
+ */
52
+ requiresExplicitMNO(): boolean;
53
+ /**
54
+ * Get the country code
55
+ */
56
+ getCountryCode(): ISO2CountryCode;
57
+ /**
58
+ * Validate MNO for a phone number (if applicable)
59
+ *
60
+ * Returns undefined for countries with MNP
61
+ */
62
+ validateMNOForPhoneNumber?(phoneNumber: string, mnoId: string): boolean;
63
+ }
@@ -0,0 +1,40 @@
1
+ import { CountryCode, ISO2CountryCode } from "../../country";
2
+ import { CountryMNOImplementation, MNOInfo } from "./mno.types";
3
+ /**
4
+ * Utility functions for working with MNO data across countries.
5
+ */
6
+ export declare class MNOUtils {
7
+ private static implementations;
8
+ /**
9
+ * Get MNO implementation for a specific country
10
+ */
11
+ private static getImplementation;
12
+ /**
13
+ * Get all MNOs for a specific country
14
+ */
15
+ static getCountryMNOs(countryCode: CountryCode): MNOInfo[];
16
+ /**
17
+ * Validate if an MNO ID is valid for a specific country
18
+ */
19
+ static isValidMNOForCountry(mnoId: string, countryCode: CountryCode): boolean;
20
+ /**
21
+ * Get MNO info by ID for a specific country
22
+ */
23
+ static getMNOById(mnoId: string, countryCode: CountryCode): MNOInfo | undefined;
24
+ /**
25
+ * Check if a country requires explicit MNO (has MNP)
26
+ */
27
+ static requiresExplicitMNO(countryCode: CountryCode): boolean;
28
+ /**
29
+ * Validate MNO for a phone number (country-specific logic)
30
+ */
31
+ static validateMNOForPhoneNumber(phoneNumber: string, mnoId: string, countryCode: CountryCode): boolean;
32
+ /**
33
+ * Get MNO by phone number (for countries without MNP)
34
+ */
35
+ static getMNOByPhoneNumber(phoneNumber: string, countryCode: CountryCode): MNOInfo | undefined;
36
+ /**
37
+ * Register a new country implementation
38
+ */
39
+ static registerCountryImplementation(countryCode: ISO2CountryCode, implementation: CountryMNOImplementation): void;
40
+ }