@temboplus/frontend-core 0.2.20-beta.8 → 0.2.22

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 (424) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +1 -1
  3. package/esm/_dnt.test_shims.d.ts.map +1 -0
  4. package/esm/deps/deno.land/std@0.217.0/assert/_constants.d.ts.map +1 -0
  5. package/esm/deps/deno.land/std@0.217.0/assert/_diff.d.ts.map +1 -0
  6. package/esm/deps/deno.land/std@0.217.0/assert/_format.d.ts.map +1 -0
  7. package/esm/deps/deno.land/std@0.217.0/assert/assert.d.ts.map +1 -0
  8. package/esm/deps/deno.land/std@0.217.0/assert/assert_almost_equals.d.ts.map +1 -0
  9. package/esm/deps/deno.land/std@0.217.0/assert/assert_array_includes.d.ts.map +1 -0
  10. package/esm/deps/deno.land/std@0.217.0/assert/assert_equals.d.ts.map +1 -0
  11. package/esm/deps/deno.land/std@0.217.0/assert/assert_exists.d.ts.map +1 -0
  12. package/esm/deps/deno.land/std@0.217.0/assert/assert_false.d.ts.map +1 -0
  13. package/esm/deps/deno.land/std@0.217.0/assert/assert_greater.d.ts.map +1 -0
  14. package/esm/deps/deno.land/std@0.217.0/assert/assert_greater_or_equal.d.ts.map +1 -0
  15. package/esm/deps/deno.land/std@0.217.0/assert/assert_instance_of.d.ts.map +1 -0
  16. package/esm/deps/deno.land/std@0.217.0/assert/assert_is_error.d.ts.map +1 -0
  17. package/esm/deps/deno.land/std@0.217.0/assert/assert_less.d.ts.map +1 -0
  18. package/esm/deps/deno.land/std@0.217.0/assert/assert_less_or_equal.d.ts.map +1 -0
  19. package/esm/deps/deno.land/std@0.217.0/assert/assert_match.d.ts.map +1 -0
  20. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_equals.d.ts.map +1 -0
  21. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_instance_of.d.ts.map +1 -0
  22. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_match.d.ts.map +1 -0
  23. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_strict_equals.d.ts.map +1 -0
  24. package/esm/deps/deno.land/std@0.217.0/assert/assert_object_match.d.ts.map +1 -0
  25. package/esm/deps/deno.land/std@0.217.0/assert/assert_rejects.d.ts.map +1 -0
  26. package/esm/deps/deno.land/std@0.217.0/assert/assert_strict_equals.d.ts.map +1 -0
  27. package/esm/deps/deno.land/std@0.217.0/assert/assert_string_includes.d.ts.map +1 -0
  28. package/esm/deps/deno.land/std@0.217.0/assert/assert_throws.d.ts.map +1 -0
  29. package/esm/deps/deno.land/std@0.217.0/assert/assertion_error.d.ts.map +1 -0
  30. package/esm/deps/deno.land/std@0.217.0/assert/equal.d.ts.map +1 -0
  31. package/esm/deps/deno.land/std@0.217.0/assert/fail.d.ts.map +1 -0
  32. package/esm/deps/deno.land/std@0.217.0/assert/mod.d.ts.map +1 -0
  33. package/esm/deps/deno.land/std@0.217.0/assert/unimplemented.d.ts.map +1 -0
  34. package/esm/deps/deno.land/std@0.217.0/assert/unreachable.d.ts.map +1 -0
  35. package/esm/deps/deno.land/std@0.217.0/fmt/colors.d.ts.map +1 -0
  36. package/esm/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +1 -0
  37. package/esm/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +1 -0
  38. package/esm/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +1 -0
  39. package/esm/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +1 -0
  40. package/esm/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +1 -0
  41. package/esm/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +1 -0
  42. package/esm/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +1 -0
  43. package/esm/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +1 -0
  44. package/esm/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +1 -0
  45. package/esm/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +1 -0
  46. package/esm/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +1 -0
  47. package/esm/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +1 -0
  48. package/esm/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +1 -0
  49. package/esm/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +1 -0
  50. package/esm/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +1 -0
  51. package/esm/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +1 -0
  52. package/esm/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +1 -0
  53. package/esm/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +1 -0
  54. package/esm/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +1 -0
  55. package/esm/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +1 -0
  56. package/esm/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +1 -0
  57. package/esm/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +1 -0
  58. package/esm/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +1 -0
  59. package/esm/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +1 -0
  60. package/esm/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +1 -0
  61. package/esm/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +1 -0
  62. package/esm/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +1 -0
  63. package/esm/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +1 -0
  64. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
  65. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
  66. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
  67. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
  68. package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
  69. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
  70. package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
  71. package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +1 -0
  72. package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +1 -0
  73. package/esm/mod.d.ts +5 -0
  74. package/esm/mod.d.ts.map +1 -0
  75. package/esm/mod.js +4 -0
  76. package/esm/package.json +3 -0
  77. package/{dist/services/config.d.ts → esm/src/config/config_service.d.ts} +5 -6
  78. package/esm/src/config/config_service.d.ts.map +1 -0
  79. package/esm/src/config/config_service.js +19 -0
  80. package/esm/src/config/index.d.ts +2 -0
  81. package/esm/src/config/index.d.ts.map +1 -0
  82. package/esm/src/config/index.js +1 -0
  83. package/esm/src/data/banks_tz.d.ts +7 -0
  84. package/esm/src/data/banks_tz.d.ts.map +1 -0
  85. package/esm/src/data/banks_tz.js +197 -0
  86. package/esm/src/data/countries.d.ts +39 -0
  87. package/esm/src/data/countries.d.ts.map +1 -0
  88. package/esm/src/data/countries.js +2475 -0
  89. package/esm/src/data/currencies.d.ts +1901 -0
  90. package/esm/src/data/currencies.d.ts.map +1 -0
  91. package/esm/src/data/currencies.js +1073 -0
  92. package/esm/src/data/phone_patterns.d.ts +3809 -0
  93. package/esm/src/data/phone_patterns.d.ts.map +1 -0
  94. package/esm/src/data/phone_patterns.js +2325 -0
  95. package/esm/src/models/amount/amount.d.ts +53 -0
  96. package/esm/src/models/amount/amount.d.ts.map +1 -0
  97. package/esm/src/models/amount/amount.js +190 -0
  98. package/esm/src/models/amount/amount.test.d.ts.map +1 -0
  99. package/esm/src/models/amount/antd_validator.d.ts +40 -0
  100. package/esm/src/models/amount/antd_validator.d.ts.map +1 -0
  101. package/esm/src/models/amount/antd_validator.js +58 -0
  102. package/esm/src/models/amount/antd_validator.test.d.ts.map +1 -0
  103. package/esm/src/models/amount/index.d.ts +3 -0
  104. package/esm/src/models/amount/index.d.ts.map +1 -0
  105. package/esm/src/models/amount/index.js +2 -0
  106. package/esm/src/models/bank/antd_validator.d.ts +11 -0
  107. package/esm/src/models/bank/antd_validator.d.ts.map +1 -0
  108. package/esm/src/models/bank/antd_validator.js +26 -0
  109. package/esm/src/models/bank/antd_validator.test.d.ts.map +1 -0
  110. package/esm/src/models/bank/bank.d.ts +257 -0
  111. package/esm/src/models/bank/bank.d.ts.map +1 -0
  112. package/esm/src/models/bank/bank.js +450 -0
  113. package/esm/src/models/bank/bank.test.d.ts.map +1 -0
  114. package/esm/src/models/bank/index.d.ts +5 -0
  115. package/esm/src/models/bank/index.d.ts.map +1 -0
  116. package/esm/src/models/bank/index.js +4 -0
  117. package/{dist/models/bank/bank.types.d.ts → esm/src/models/bank/types.d.ts} +6 -4
  118. package/esm/src/models/bank/types.d.ts.map +1 -0
  119. package/esm/src/models/bank/types.js +45 -0
  120. package/esm/src/models/bank/utils.d.ts +8 -0
  121. package/esm/src/models/bank/utils.d.ts.map +1 -0
  122. package/esm/src/models/bank/utils.js +9 -0
  123. package/{dist → esm/src}/models/country/country.d.ts +5 -37
  124. package/esm/src/models/country/country.d.ts.map +1 -0
  125. package/esm/src/models/country/country.js +737 -0
  126. package/esm/src/models/country/country.test.d.ts.map +1 -0
  127. package/esm/src/models/country/index.d.ts +4 -0
  128. package/esm/src/models/country/index.d.ts.map +1 -0
  129. package/esm/src/models/country/index.js +3 -0
  130. package/{dist/models/country/country.types.d.ts → esm/src/models/country/types.d.ts} +1 -0
  131. package/esm/src/models/country/types.d.ts.map +1 -0
  132. package/esm/src/models/country/types.js +105 -0
  133. package/{dist/models/country/country.validation.d.ts → esm/src/models/country/utils.d.ts} +6 -10
  134. package/esm/src/models/country/utils.d.ts.map +1 -0
  135. package/esm/src/models/country/utils.js +25 -0
  136. package/{dist → esm/src}/models/currency/currency.d.ts +3 -28
  137. package/esm/src/models/currency/currency.d.ts.map +1 -0
  138. package/esm/src/models/currency/currency.js +471 -0
  139. package/esm/src/models/currency/currency.test.d.ts.map +1 -0
  140. package/esm/src/models/currency/index.d.ts +4 -0
  141. package/esm/src/models/currency/index.d.ts.map +1 -0
  142. package/esm/src/models/currency/index.js +3 -0
  143. package/{dist/models/currency/currency.types.d.ts → esm/src/models/currency/types.d.ts} +2 -1
  144. package/esm/src/models/currency/types.d.ts.map +1 -0
  145. package/esm/src/models/currency/types.js +28 -0
  146. package/esm/src/models/currency/utils.d.ts +8 -0
  147. package/esm/src/models/currency/utils.d.ts.map +1 -0
  148. package/esm/src/models/currency/utils.js +9 -0
  149. package/esm/src/models/index.d.ts +6 -0
  150. package/esm/src/models/index.d.ts.map +1 -0
  151. package/{dist/models/index.d.ts → esm/src/models/index.js} +1 -1
  152. package/esm/src/models/phone_number/format.d.ts +13 -0
  153. package/esm/src/models/phone_number/format.d.ts.map +1 -0
  154. package/esm/src/models/phone_number/format.js +13 -0
  155. package/esm/src/models/phone_number/global/phone_number.d.ts +162 -0
  156. package/esm/src/models/phone_number/global/phone_number.d.ts.map +1 -0
  157. package/esm/src/models/phone_number/global/phone_number.js +459 -0
  158. package/esm/src/models/phone_number/global/phone_number.test.d.ts.map +1 -0
  159. package/esm/src/models/phone_number/global/service.d.ts +267 -0
  160. package/esm/src/models/phone_number/global/service.d.ts.map +1 -0
  161. package/esm/src/models/phone_number/global/service.js +498 -0
  162. package/esm/src/models/phone_number/global/service.test.d.ts.map +1 -0
  163. package/esm/src/models/phone_number/index.d.ts +6 -0
  164. package/esm/src/models/phone_number/index.d.ts.map +1 -0
  165. package/esm/src/models/phone_number/index.js +5 -0
  166. package/esm/src/models/phone_number/tz/antd_validator.d.ts +77 -0
  167. package/esm/src/models/phone_number/tz/antd_validator.d.ts.map +1 -0
  168. package/esm/src/models/phone_number/tz/antd_validator.js +90 -0
  169. package/esm/src/models/phone_number/tz/antdvalidator.test.d.ts.map +1 -0
  170. package/esm/src/models/phone_number/tz/network_operator.d.ts +30 -0
  171. package/esm/src/models/phone_number/tz/network_operator.d.ts.map +1 -0
  172. package/esm/src/models/phone_number/tz/network_operator.js +47 -0
  173. package/esm/src/models/phone_number/tz/phone_number.d.ts +141 -0
  174. package/esm/src/models/phone_number/tz/phone_number.d.ts.map +1 -0
  175. package/esm/src/models/phone_number/tz/phone_number.js +290 -0
  176. package/esm/src/models/phone_number/tz/phone_number.test.d.ts.map +1 -0
  177. package/esm/src/reports/index.d.ts +2 -0
  178. package/esm/src/reports/index.d.ts.map +1 -0
  179. package/esm/src/reports/index.js +1 -0
  180. package/{dist/reports/report-manager.d.ts → esm/src/reports/report_manager.d.ts} +4 -27
  181. package/esm/src/reports/report_manager.d.ts.map +1 -0
  182. package/esm/src/reports/report_manager.js +318 -0
  183. package/{dist → esm/src}/utils/id.d.ts +3 -7
  184. package/esm/src/utils/id.d.ts.map +1 -0
  185. package/esm/src/utils/id.js +19 -0
  186. package/esm/src/utils/index.d.ts +4 -0
  187. package/esm/src/utils/index.d.ts.map +1 -0
  188. package/esm/src/utils/text.d.ts +32 -0
  189. package/esm/src/utils/text.d.ts.map +1 -0
  190. package/esm/src/utils/text.js +68 -0
  191. package/esm/src/utils/text.test.d.ts.map +1 -0
  192. package/{dist → esm/src}/utils/time.d.ts +4 -9
  193. package/esm/src/utils/time.d.ts.map +1 -0
  194. package/esm/src/utils/time.js +34 -0
  195. package/package.json +22 -47
  196. package/script/_dnt.test_shims.d.ts.map +1 -0
  197. package/script/deps/deno.land/std@0.217.0/assert/_constants.d.ts.map +1 -0
  198. package/script/deps/deno.land/std@0.217.0/assert/_diff.d.ts.map +1 -0
  199. package/script/deps/deno.land/std@0.217.0/assert/_format.d.ts.map +1 -0
  200. package/script/deps/deno.land/std@0.217.0/assert/assert.d.ts.map +1 -0
  201. package/script/deps/deno.land/std@0.217.0/assert/assert_almost_equals.d.ts.map +1 -0
  202. package/script/deps/deno.land/std@0.217.0/assert/assert_array_includes.d.ts.map +1 -0
  203. package/script/deps/deno.land/std@0.217.0/assert/assert_equals.d.ts.map +1 -0
  204. package/script/deps/deno.land/std@0.217.0/assert/assert_exists.d.ts.map +1 -0
  205. package/script/deps/deno.land/std@0.217.0/assert/assert_false.d.ts.map +1 -0
  206. package/script/deps/deno.land/std@0.217.0/assert/assert_greater.d.ts.map +1 -0
  207. package/script/deps/deno.land/std@0.217.0/assert/assert_greater_or_equal.d.ts.map +1 -0
  208. package/script/deps/deno.land/std@0.217.0/assert/assert_instance_of.d.ts.map +1 -0
  209. package/script/deps/deno.land/std@0.217.0/assert/assert_is_error.d.ts.map +1 -0
  210. package/script/deps/deno.land/std@0.217.0/assert/assert_less.d.ts.map +1 -0
  211. package/script/deps/deno.land/std@0.217.0/assert/assert_less_or_equal.d.ts.map +1 -0
  212. package/script/deps/deno.land/std@0.217.0/assert/assert_match.d.ts.map +1 -0
  213. package/script/deps/deno.land/std@0.217.0/assert/assert_not_equals.d.ts.map +1 -0
  214. package/script/deps/deno.land/std@0.217.0/assert/assert_not_instance_of.d.ts.map +1 -0
  215. package/script/deps/deno.land/std@0.217.0/assert/assert_not_match.d.ts.map +1 -0
  216. package/script/deps/deno.land/std@0.217.0/assert/assert_not_strict_equals.d.ts.map +1 -0
  217. package/script/deps/deno.land/std@0.217.0/assert/assert_object_match.d.ts.map +1 -0
  218. package/script/deps/deno.land/std@0.217.0/assert/assert_rejects.d.ts.map +1 -0
  219. package/script/deps/deno.land/std@0.217.0/assert/assert_strict_equals.d.ts.map +1 -0
  220. package/script/deps/deno.land/std@0.217.0/assert/assert_string_includes.d.ts.map +1 -0
  221. package/script/deps/deno.land/std@0.217.0/assert/assert_throws.d.ts.map +1 -0
  222. package/script/deps/deno.land/std@0.217.0/assert/assertion_error.d.ts.map +1 -0
  223. package/script/deps/deno.land/std@0.217.0/assert/equal.d.ts.map +1 -0
  224. package/script/deps/deno.land/std@0.217.0/assert/fail.d.ts.map +1 -0
  225. package/script/deps/deno.land/std@0.217.0/assert/mod.d.ts.map +1 -0
  226. package/script/deps/deno.land/std@0.217.0/assert/unimplemented.d.ts.map +1 -0
  227. package/script/deps/deno.land/std@0.217.0/assert/unreachable.d.ts.map +1 -0
  228. package/script/deps/deno.land/std@0.217.0/fmt/colors.d.ts.map +1 -0
  229. package/script/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +1 -0
  230. package/script/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +1 -0
  231. package/script/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +1 -0
  232. package/script/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +1 -0
  233. package/script/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +1 -0
  234. package/script/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +1 -0
  235. package/script/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +1 -0
  236. package/script/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +1 -0
  237. package/script/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +1 -0
  238. package/script/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +1 -0
  239. package/script/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +1 -0
  240. package/script/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +1 -0
  241. package/script/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +1 -0
  242. package/script/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +1 -0
  243. package/script/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +1 -0
  244. package/script/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +1 -0
  245. package/script/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +1 -0
  246. package/script/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +1 -0
  247. package/script/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +1 -0
  248. package/script/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +1 -0
  249. package/script/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +1 -0
  250. package/script/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +1 -0
  251. package/script/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +1 -0
  252. package/script/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +1 -0
  253. package/script/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +1 -0
  254. package/script/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +1 -0
  255. package/script/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +1 -0
  256. package/script/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +1 -0
  257. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
  258. package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
  259. package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
  260. package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
  261. package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
  262. package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
  263. package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
  264. package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +1 -0
  265. package/script/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +1 -0
  266. package/script/mod.d.ts +5 -0
  267. package/script/mod.d.ts.map +1 -0
  268. package/script/mod.js +20 -0
  269. package/script/package.json +3 -0
  270. package/script/src/config/config_service.d.ts +11 -0
  271. package/script/src/config/config_service.d.ts.map +1 -0
  272. package/script/src/config/config_service.js +23 -0
  273. package/script/src/config/index.d.ts +2 -0
  274. package/script/src/config/index.d.ts.map +1 -0
  275. package/script/src/config/index.js +17 -0
  276. package/script/src/data/banks_tz.d.ts +7 -0
  277. package/script/src/data/banks_tz.d.ts.map +1 -0
  278. package/script/src/data/banks_tz.js +199 -0
  279. package/script/src/data/countries.d.ts +39 -0
  280. package/script/src/data/countries.d.ts.map +1 -0
  281. package/script/src/data/countries.js +2477 -0
  282. package/script/src/data/currencies.d.ts +1901 -0
  283. package/script/src/data/currencies.d.ts.map +1 -0
  284. package/script/src/data/currencies.js +1075 -0
  285. package/script/src/data/phone_patterns.d.ts +3809 -0
  286. package/script/src/data/phone_patterns.d.ts.map +1 -0
  287. package/script/src/data/phone_patterns.js +2327 -0
  288. package/script/src/models/amount/amount.d.ts +53 -0
  289. package/script/src/models/amount/amount.d.ts.map +1 -0
  290. package/script/src/models/amount/amount.js +194 -0
  291. package/script/src/models/amount/amount.test.d.ts.map +1 -0
  292. package/script/src/models/amount/antd_validator.d.ts +40 -0
  293. package/script/src/models/amount/antd_validator.d.ts.map +1 -0
  294. package/script/src/models/amount/antd_validator.js +62 -0
  295. package/script/src/models/amount/antd_validator.test.d.ts.map +1 -0
  296. package/script/src/models/amount/index.d.ts +3 -0
  297. package/script/src/models/amount/index.d.ts.map +1 -0
  298. package/script/src/models/amount/index.js +18 -0
  299. package/script/src/models/bank/antd_validator.d.ts +11 -0
  300. package/script/src/models/bank/antd_validator.d.ts.map +1 -0
  301. package/script/src/models/bank/antd_validator.js +30 -0
  302. package/script/src/models/bank/antd_validator.test.d.ts.map +1 -0
  303. package/script/src/models/bank/bank.d.ts +257 -0
  304. package/script/src/models/bank/bank.d.ts.map +1 -0
  305. package/script/src/models/bank/bank.js +458 -0
  306. package/script/src/models/bank/bank.test.d.ts.map +1 -0
  307. package/script/src/models/bank/index.d.ts +5 -0
  308. package/script/src/models/bank/index.d.ts.map +1 -0
  309. package/script/src/models/bank/index.js +20 -0
  310. package/script/src/models/bank/types.d.ts +7 -0
  311. package/script/src/models/bank/types.d.ts.map +1 -0
  312. package/script/src/models/bank/types.js +48 -0
  313. package/script/src/models/bank/utils.d.ts +8 -0
  314. package/script/src/models/bank/utils.d.ts.map +1 -0
  315. package/script/src/models/bank/utils.js +12 -0
  316. package/script/src/models/country/country.d.ts +822 -0
  317. package/script/src/models/country/country.d.ts.map +1 -0
  318. package/script/src/models/country/country.js +745 -0
  319. package/script/src/models/country/country.test.d.ts.map +1 -0
  320. package/script/src/models/country/index.d.ts +4 -0
  321. package/script/src/models/country/index.d.ts.map +1 -0
  322. package/script/src/models/country/index.js +19 -0
  323. package/script/src/models/country/types.d.ts +63 -0
  324. package/script/src/models/country/types.d.ts.map +1 -0
  325. package/script/src/models/country/types.js +108 -0
  326. package/script/src/models/country/utils.d.ts +21 -0
  327. package/script/src/models/country/utils.d.ts.map +1 -0
  328. package/script/src/models/country/utils.js +30 -0
  329. package/script/src/models/currency/currency.d.ts +465 -0
  330. package/script/src/models/currency/currency.d.ts.map +1 -0
  331. package/script/src/models/currency/currency.js +479 -0
  332. package/script/src/models/currency/currency.test.d.ts.map +1 -0
  333. package/script/src/models/currency/index.d.ts +4 -0
  334. package/script/src/models/currency/index.d.ts.map +1 -0
  335. package/script/src/models/currency/index.js +19 -0
  336. package/script/src/models/currency/types.d.ts +21 -0
  337. package/script/src/models/currency/types.d.ts.map +1 -0
  338. package/script/src/models/currency/types.js +31 -0
  339. package/script/src/models/currency/utils.d.ts +8 -0
  340. package/script/src/models/currency/utils.d.ts.map +1 -0
  341. package/script/src/models/currency/utils.js +12 -0
  342. package/script/src/models/index.d.ts +6 -0
  343. package/script/src/models/index.d.ts.map +1 -0
  344. package/script/src/models/index.js +21 -0
  345. package/script/src/models/phone_number/format.d.ts +13 -0
  346. package/script/src/models/phone_number/format.d.ts.map +1 -0
  347. package/script/src/models/phone_number/format.js +16 -0
  348. package/script/src/models/phone_number/global/phone_number.d.ts +162 -0
  349. package/script/src/models/phone_number/global/phone_number.d.ts.map +1 -0
  350. package/script/src/models/phone_number/global/phone_number.js +463 -0
  351. package/script/src/models/phone_number/global/phone_number.test.d.ts.map +1 -0
  352. package/script/src/models/phone_number/global/service.d.ts +267 -0
  353. package/script/src/models/phone_number/global/service.d.ts.map +1 -0
  354. package/script/src/models/phone_number/global/service.js +506 -0
  355. package/script/src/models/phone_number/global/service.test.d.ts.map +1 -0
  356. package/script/src/models/phone_number/index.d.ts +6 -0
  357. package/script/src/models/phone_number/index.d.ts.map +1 -0
  358. package/script/src/models/phone_number/index.js +21 -0
  359. package/script/src/models/phone_number/tz/antd_validator.d.ts +77 -0
  360. package/script/src/models/phone_number/tz/antd_validator.d.ts.map +1 -0
  361. package/script/src/models/phone_number/tz/antd_validator.js +94 -0
  362. package/script/src/models/phone_number/tz/antdvalidator.test.d.ts.map +1 -0
  363. package/script/src/models/phone_number/tz/network_operator.d.ts +30 -0
  364. package/script/src/models/phone_number/tz/network_operator.d.ts.map +1 -0
  365. package/script/src/models/phone_number/tz/network_operator.js +50 -0
  366. package/script/src/models/phone_number/tz/phone_number.d.ts +141 -0
  367. package/script/src/models/phone_number/tz/phone_number.d.ts.map +1 -0
  368. package/script/src/models/phone_number/tz/phone_number.js +294 -0
  369. package/script/src/models/phone_number/tz/phone_number.test.d.ts.map +1 -0
  370. package/script/src/reports/index.d.ts +2 -0
  371. package/script/src/reports/index.d.ts.map +1 -0
  372. package/script/src/reports/index.js +17 -0
  373. package/script/src/reports/report_manager.d.ts +144 -0
  374. package/script/src/reports/report_manager.d.ts.map +1 -0
  375. package/script/src/reports/report_manager.js +328 -0
  376. package/script/src/utils/id.d.ts +12 -0
  377. package/script/src/utils/id.d.ts.map +1 -0
  378. package/script/src/utils/id.js +23 -0
  379. package/script/src/utils/index.d.ts +4 -0
  380. package/script/src/utils/index.d.ts.map +1 -0
  381. package/script/src/utils/index.js +19 -0
  382. package/script/src/utils/text.d.ts +32 -0
  383. package/script/src/utils/text.d.ts.map +1 -0
  384. package/script/src/utils/text.js +75 -0
  385. package/script/src/utils/text.test.d.ts.map +1 -0
  386. package/script/src/utils/time.d.ts +21 -0
  387. package/script/src/utils/time.d.ts.map +1 -0
  388. package/script/src/utils/time.js +39 -0
  389. package/dist/constants/index.d.ts +0 -1
  390. package/dist/constants/payout-countries.d.ts +0 -2
  391. package/dist/index.cjs.js +0 -8
  392. package/dist/index.cjs.js.map +0 -1
  393. package/dist/index.d.ts +0 -5
  394. package/dist/index.esm.js +0 -5
  395. package/dist/index.esm.js.map +0 -1
  396. package/dist/models/amount/amount.d.ts +0 -761
  397. package/dist/models/amount/index.d.ts +0 -1
  398. package/dist/models/bank/bank.d.ts +0 -193
  399. package/dist/models/bank/bank.schema.d.ts +0 -23
  400. package/dist/models/bank/bank.validation.d.ts +0 -80
  401. package/dist/models/bank/index.d.ts +0 -4
  402. package/dist/models/country/country.schema.d.ts +0 -73
  403. package/dist/models/country/index.d.ts +0 -4
  404. package/dist/models/currency/currency.schema.d.ts +0 -24
  405. package/dist/models/currency/currency.validation.d.ts +0 -11
  406. package/dist/models/currency/index.d.ts +0 -4
  407. package/dist/models/phone-number/index.d.ts +0 -6
  408. package/dist/models/phone-number/mno/index.d.ts +0 -6
  409. package/dist/models/phone-number/mno/ke/mobile-number.ke-mnos.d.ts +0 -22
  410. package/dist/models/phone-number/mno/ke/mobile-number.ke.d.ts +0 -45
  411. package/dist/models/phone-number/mno/mno.types.d.ts +0 -63
  412. package/dist/models/phone-number/mno/mno.utils.d.ts +0 -40
  413. package/dist/models/phone-number/mno/tz/mobile-number.tz-mnos.d.ts +0 -48
  414. package/dist/models/phone-number/mno/tz/mobile-number.tz.d.ts +0 -44
  415. package/dist/models/phone-number/phone-number.d.ts +0 -135
  416. package/dist/models/phone-number/phone-number.factory.d.ts +0 -52
  417. package/dist/models/phone-number/phone-number.service.d.ts +0 -36
  418. package/dist/models/phone-number/phone-number.types.d.ts +0 -115
  419. package/dist/models/phone-number/phone-number.utils.d.ts +0 -67
  420. package/dist/reports/index.d.ts +0 -1
  421. package/dist/services/index.d.ts +0 -2
  422. package/dist/services/logger.d.ts +0 -2
  423. package/dist/utils/text.d.ts +0 -103
  424. /package/{dist/utils/index.d.ts → esm/src/utils/index.js} +0 -0
@@ -1 +0,0 @@
1
- export * from "./amount.js";
@@ -1,193 +0,0 @@
1
- import { ISO2CountryCode } from "../country/country.types.js";
2
- import type { BankSwiftCode, KEBankSwiftCode, TZBankSwiftCode } from "./bank.types.js";
3
- import { z } from "zod";
4
- import { BankJSONSchema } from "./bank.schema.js";
5
- /**
6
- * Infer the BankJSON type from the schema
7
- */
8
- export type BankJSON = z.infer<typeof BankJSONSchema>;
9
- export declare class Bank {
10
- /**
11
- * The full registered name of the bank.
12
- */
13
- readonly fullName: string;
14
- /**
15
- * The commonly used short name or abbreviation for the bank.
16
- */
17
- readonly shortName: string;
18
- /**
19
- * The SWIFT/BIC code for the bank's head office.
20
- */
21
- readonly swiftCode: TZBankSwiftCode | KEBankSwiftCode;
22
- /**
23
- * The ISO 3166-1 alpha-2 country code (e.g., 'TZ', 'KE').
24
- */
25
- readonly countryCode: ISO2CountryCode;
26
- /**
27
- * Optional list of former names the bank was known by.
28
- * Useful for historical reference and search functionality.
29
- */
30
- readonly formerNames?: string[];
31
- /**
32
- * Creates a new Bank instance.
33
- *
34
- * @param fullName The full registered name of the bank
35
- * @param shortName The commonly used short name or abbreviation for the bank
36
- * @param swiftCode The SWIFT/BIC code for the bank's head office
37
- * @param countryCode The ISO 3166-1 alpha-2 country code
38
- * @param formerNames Optional list of former names the bank was known by
39
- */
40
- constructor(fullName: string, shortName: string, swiftCode: TZBankSwiftCode | KEBankSwiftCode, countryCode: ISO2CountryCode, formerNames?: string[]);
41
- /**
42
- * Checks if this bank has any former names recorded.
43
- * @returns True if the bank has at least one former name, false otherwise.
44
- */
45
- hasFormerNames(): boolean;
46
- /**
47
- * Gets a display string showing the current name with former names in parentheses.
48
- * @returns A formatted string, e.g., "Access Bank Tanzania Limited (formerly BancABC)"
49
- */
50
- getDisplayNameWithHistory(): string;
51
- /**
52
- * Returns a string representation of the bank.
53
- * @returns A formatted string, e.g., "CRDB BANK PLC (CRDB) - SWIFT: CORUTZTZ [TZ]"
54
- */
55
- toString(): string;
56
- static from(swiftCode: BankSwiftCode, countryCode: ISO2CountryCode): Bank;
57
- /**
58
- * Converts the Bank instance to a plain JavaScript object.
59
- * Suitable for serialization or data transfer.
60
- *
61
- * @returns {Object} Plain object representation of the bank
62
- * @returns {string} returns.fullName - The full registered name of the bank
63
- * @returns {string} returns.shortName - The commonly used short name
64
- * @returns {string} returns.swiftCode - The SWIFT/BIC code
65
- * @returns {ISO2CountryCode} returns.countryCode - The ISO 3166-1 alpha-2 country code
66
- * @returns {string[] | undefined} returns.formerNames - Optional list of former names
67
- *
68
- * @example
69
- * ```typescript
70
- * const bank = Bank.from("FMBZTZTX", "TZ");
71
- * const obj = bank.toObject();
72
- * console.log(obj);
73
- * // {
74
- * // fullName: "Access Bank Tanzania Limited",
75
- * // shortName: "ABT",
76
- * // swiftCode: "FMBZTZTX",
77
- * // countryCode: "TZ",
78
- * // formerNames: ["BancABC"]
79
- * // }
80
- * ```
81
- */
82
- toObject(): {
83
- fullName: string;
84
- shortName: string;
85
- swiftCode: TZBankSwiftCode | KEBankSwiftCode;
86
- countryCode: ISO2CountryCode;
87
- formerNames?: string[];
88
- };
89
- /**
90
- * Static method to determine if an unknown object is a valid Bank object.
91
- *
92
- * This method performs a series of checks to validate if the provided object conforms
93
- * to the Bank interface and contains valid data.
94
- *
95
- * @param {unknown} obj - The object to validate.
96
- * @returns {obj is Bank} - Returns true if the object is a valid Bank, false otherwise.
97
- */
98
- static is(obj: unknown): obj is Bank;
99
- /**
100
- * Serializes the Bank instance to a JSON-compatible object
101
- */
102
- toJSON(): BankJSON;
103
- /**
104
- * Serializes the Bank instance to a JSON string
105
- */
106
- toJSONString(): string;
107
- /**
108
- * Creates a Bank instance from a JSON-compatible object or string
109
- */
110
- static fromJSON(json: BankJSON | string): Bank | undefined;
111
- /**
112
- * Creates a Bank instance from a JSON string
113
- */
114
- static fromJSONString(jsonString: string): Bank | undefined;
115
- /**
116
- * Type guard to check if an object is a valid BankJSON using Zod validation
117
- */
118
- static isBankJSON(obj: unknown): obj is BankJSON;
119
- }
120
- /**
121
- * Service for managing bank data, validation, and instance creation
122
- * across multiple countries. Acts as the central Facade and Factory.
123
- * @class BankService
124
- */
125
- export declare class BankService {
126
- private static instance;
127
- private loadedData;
128
- private constructor();
129
- /**
130
- * Gets the singleton instance of BankService.
131
- * Initializes known countries synchronously on first call.
132
- * Consider async initialization if data loading becomes async.
133
- */
134
- static getInstance(): BankService;
135
- /**
136
- * Initializes bank data for a specific country synchronously.
137
- * @param countryCode The ISO country code (e.g., 'TZ', 'KE').
138
- * @returns True if successful or already loaded, false on failure.
139
- */
140
- initializeCountry(countryCode: ISO2CountryCode): boolean;
141
- /**
142
- * Retrieves the loaded data structure for a given country.
143
- * Ensures country is initialized.
144
- * @param countryCode The ISO country code.
145
- * @returns The CountryBankData structure or undefined.
146
- */
147
- private getCountryData;
148
- /**
149
- * Retrieves a Bank instance by its SWIFT code for a specific country.
150
- * Performs validation before returning.
151
- * @param countryCode The ISO country code.
152
- * @param swiftCode The SWIFT code.
153
- * @returns The Bank instance or undefined if SWIFT is invalid or not found.
154
- */
155
- getBankBySwiftCode(countryCode: ISO2CountryCode, swiftCode: BankSwiftCode): Bank | undefined;
156
- /**
157
- * Retrieves all banks for a specific country.
158
- * @param countryCode The ISO country code.
159
- * @returns An array of Bank instances, or empty array.
160
- */
161
- getAllBanks(countryCode: ISO2CountryCode): Bank[];
162
- /**
163
- * Retrieves all banks for all supported countries.
164
- * @returns An array of Bank instances, or empty array.
165
- */
166
- getAllSupportedBanks(): Bank[];
167
- /**
168
- * Searches all supported banks for a bank with the provided swift code
169
- */
170
- detectBank(swiftCode: string): Bank | undefined;
171
- /**
172
- * Searches for banks within a specific country by name, SWIFT code, or former names.
173
- * @param countryCode The ISO country code.
174
- * @param searchTerm The term to search for (case-insensitive).
175
- * @param limit Max number of results.
176
- * @returns An array of matching Bank instances.
177
- */
178
- searchBanks(countryCode: ISO2CountryCode, searchTerm: string, limit?: number): Bank[];
179
- /**
180
- * Searches for banks across all supported countries by name, SWIFT code, or former names.
181
- * @param searchTerm The term to search for (case-insensitive).
182
- * @param limit Max number of results.
183
- * @returns An array of matching Bank instances from all supported countries.
184
- */
185
- searchAllBanks(searchTerm: string, limit?: number): Bank[];
186
- /**
187
- * Finds banks that were formerly known by a specific name.
188
- * @param formerName The former name to search for (case-insensitive).
189
- * @param countryCode Optional country code to limit the search.
190
- * @returns An array of Bank instances that match the former name.
191
- */
192
- findByFormerName(formerName: string, countryCode?: ISO2CountryCode): Bank[];
193
- }
@@ -1,23 +0,0 @@
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>;
4
- /**
5
- * Zod schema for Bank JSON serialization
6
- * This schema validates the JSON representation of a Bank instance
7
- */
8
- export declare const BankJSONSchema: z.ZodObject<{
9
- /** The SWIFT/BIC code for the bank's head office */
10
- swiftCode: z.ZodString;
11
- /** The ISO 3166-1 alpha-2 country code */
12
- countryCode: z.ZodString;
13
- /** Version for future compatibility */
14
- version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
15
- }, "strip", z.ZodTypeAny, {
16
- version: string;
17
- swiftCode: string;
18
- countryCode: string;
19
- }, {
20
- swiftCode: string;
21
- countryCode: string;
22
- version?: string | undefined;
23
- }>;
@@ -1,80 +0,0 @@
1
- import { ISO2CountryCode } from "@models/country/country.types.js";
2
- import { BankSwiftCode } from "./bank.types.js";
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
- };
@@ -1,4 +0,0 @@
1
- export * from "./bank.js";
2
- export * from "./bank.types.js";
3
- export * from "./bank.validation.js";
4
- export * from "./bank.schema.js";
@@ -1,73 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * Zod schema for Country JSON serialization
4
- * This schema validates the JSON representation of a Country instance
5
- */
6
- export declare const CountryJSONSchema: z.ZodObject<{
7
- /** The ISO 3166-1 alpha-2 country code */
8
- code: z.ZodString;
9
- /** Version for future compatibility */
10
- version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
11
- }, "strip", z.ZodTypeAny, {
12
- code: string;
13
- version: string;
14
- }, {
15
- code: string;
16
- version?: string | undefined;
17
- }>;
18
- /**
19
- * Zod schema for validating ISO 3166-1 alpha-2 country codes.
20
- *
21
- * This schema checks if a given string is a valid ISO 3166-1 alpha-2 country code
22
- * by checking against the predefined set of valid codes.
23
- *
24
- * @example
25
- * const result = iso2CountryCodeSchema.safeParse("US");
26
- * if (result.success) {
27
- * console.log("Valid ISO2 country code");
28
- * } else {
29
- * console.error("Invalid ISO2 country code");
30
- * }
31
- */
32
- export declare const ISO2CountryCodeSchema: z.ZodEffects<z.ZodString, string, string>;
33
- /**
34
- * Zod schema for validating ISO 3166-1 alpha-3 country codes.
35
- *
36
- * This schema checks if a given string is a valid ISO 3166-1 alpha-3 country code
37
- * by checking against the predefined set of valid codes.
38
- *
39
- * @example
40
- * const result = iso3CountryCodeSchema.safeParse("USA");
41
- * if (result.success) {
42
- * console.log("Valid ISO3 country code");
43
- * } else {
44
- * console.error("Invalid ISO3 country code");
45
- * }
46
- */
47
- export declare const ISO3CountryCodeSchema: z.ZodEffects<z.ZodString, string, string>;
48
- /**
49
- * Zod schema for validating either ISO 3166-1 alpha-2 or alpha-3 country codes.
50
- *
51
- * This schema allows for flexibility in accepting both two-letter and three-letter
52
- * country codes, making it useful for functions that need to handle both formats.
53
- *
54
- * @example
55
- * const result = countryCodeSchema.safeParse("US");
56
- * if (result.success) {
57
- * console.log("Valid country code");
58
- * } else {
59
- * console.error("Invalid country code");
60
- * }
61
- */
62
- export declare const CountryCodeSchema: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
63
- /** The ISO 3166-1 alpha-2 country code */
64
- code: z.ZodString;
65
- /** Version for future compatibility */
66
- version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
67
- }, "strip", z.ZodTypeAny, {
68
- code: string;
69
- version: string;
70
- }, {
71
- code: string;
72
- version?: string | undefined;
73
- }>]>;
@@ -1,4 +0,0 @@
1
- export * from "./country.js";
2
- export * from "./country.types.js";
3
- export * from "./country.validation.js";
4
- export * from "./country.schema.js";
@@ -1,24 +0,0 @@
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>;
9
- /**
10
- * Zod schema for Currency JSON serialization
11
- * This schema validates the JSON representation of a Currency instance
12
- */
13
- export declare const CurrencyJSONSchema: z.ZodObject<{
14
- /** The ISO 4217 currency code */
15
- code: z.ZodString;
16
- /** Version for future compatibility */
17
- version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
18
- }, "strip", z.ZodTypeAny, {
19
- code: string;
20
- version: string;
21
- }, {
22
- code: string;
23
- version?: string | undefined;
24
- }>;
@@ -1,11 +0,0 @@
1
- import { type CurrencyCode } from "./currency.types.js";
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 {};
@@ -1,4 +0,0 @@
1
- export * from "./currency.js";
2
- export * from "./currency.types.js";
3
- export * from "./currency.validation.js";
4
- export * from "./currency.schema.js";
@@ -1,6 +0,0 @@
1
- export * from "./phone-number.factory.js";
2
- export * from "./phone-number.types.js";
3
- export * from "./mno/mno.utils.js";
4
- export * from "./mno/mno.types.js";
5
- export * from "./phone-number.js";
6
- export * from "./mno/index.js";
@@ -1,6 +0,0 @@
1
- export * from "./ke/mobile-number.ke.js";
2
- export * from "./ke/mobile-number.ke-mnos.js";
3
- export * from "./tz/mobile-number.tz.js";
4
- export * from "./tz/mobile-number.tz-mnos.js";
5
- export * from "./mno.types.js";
6
- export * from "./mno.utils.js";
@@ -1,22 +0,0 @@
1
- import { ISO2CountryCode } from "@models/country/country.types.js";
2
- import { CountryMNOImplementation, KEMNOId, MNOInfo } from "@models/phone-number/mno/mno.types.js";
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
- }
@@ -1,45 +0,0 @@
1
- import { ISO2CountryCode } from "@models/country/country.types.js";
2
- import { MNOInfo } from "@models/phone-number/mno/mno.types.js";
3
- import { PhoneNumber } from "@models/phone-number/phone-number.js";
4
- import { type ParsedPhoneNumber, PhoneNumberService } from "@models/phone-number/phone-number.service.js";
5
- import { type PhoneNumberContract, type PhoneNumberParseOptions, PhoneNumberType } from "@models/phone-number/phone-number.types.js";
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
- }
@@ -1,63 +0,0 @@
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 "@models/country/country.types.js";
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
- }
@@ -1,40 +0,0 @@
1
- import { CountryCode, ISO2CountryCode } from "@models/country/country.types.js";
2
- import { CountryMNOImplementation, MNOInfo } from "./mno.types.js";
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
- }
@@ -1,48 +0,0 @@
1
- import { ISO2CountryCode } from "@models/country/country.types.js";
2
- import { CountryMNOImplementation, MNOInfo, TZMNOId } from "@models/phone-number/mno/mno.types.js";
3
- /**
4
- * Configuration object for Tanzanian mobile network operators.
5
- * Conforms to the generic NetworkOperatorInfo interface.
6
- */
7
- export declare const TZ_MNO_CONFIG: Record<TZMNOId, MNOInfo>;
8
- /**
9
- * Tanzania MNO Implementation
10
- * Handles all TZ-specific MNO logic including prefix validation
11
- */
12
- export declare class TZMNOImplementation implements CountryMNOImplementation {
13
- private static instance;
14
- private constructor();
15
- static getInstance(): TZMNOImplementation;
16
- getAllMNOs(): MNOInfo[];
17
- isValidMNOId(id: string): boolean;
18
- getMNOById(id: string): MNOInfo | undefined;
19
- requiresExplicitMNO(): boolean;
20
- getCountryCode(): ISO2CountryCode;
21
- /**
22
- * Validate MNO against phone number prefix (TZ-specific logic)
23
- */
24
- validateMNOForPhoneNumber(phoneNumber: string, mnoId: string): boolean;
25
- /**
26
- * Get MNO by phone number prefix (TZ-specific)
27
- */
28
- getMNOByPhonePrefix(phoneNumber: string): MNOInfo | undefined;
29
- /**
30
- * Get prefixes for a specific MNO (TZ-specific utility)
31
- */
32
- getPrefixesForMNO(mnoId: TZMNOId): string[];
33
- }
34
- /**
35
- * @deprecated Use TZMNOImplementation.getInstance().getPrefixesForMNO() instead
36
- * Helper function within the TZ context to get prefixes for an operator ID.
37
- */
38
- export declare function getTZPrefixesForOperator(operatorId: TZMNOId): string[] | undefined;
39
- /**
40
- * @deprecated Use TZMNOImplementation.getInstance().getMNOByPhonePrefix() instead
41
- * Helper function within the TZ context to find operator config by prefix.
42
- */
43
- export declare function findTZOperatorByPrefix(prefix: string): MNOInfo | undefined;
44
- /**
45
- * @deprecated Use TZMNOImplementation.getInstance().getAllMNOs() instead
46
- * Gets all available Tanzanian MNO configurations.
47
- */
48
- export declare function getAllTZMNOs(): MNOInfo[];