@temboplus/frontend-core 0.4.4 → 1.0.1-beta.0

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 (452) hide show
  1. package/README.md +62 -214
  2. package/dist/coverage/coverage.types.d.ts +24 -0
  3. package/dist/coverage/index.d.ts +3 -0
  4. package/dist/coverage/tembo-coverage.d.ts +59 -0
  5. package/dist/domain/amount/amount.d.ts +476 -0
  6. package/dist/domain/amount/amount.helpers.d.ts +64 -0
  7. package/dist/domain/amount/amount.schema.d.ts +34 -0
  8. package/dist/domain/amount/index.d.ts +4 -0
  9. package/dist/domain/bank/bank.d.ts +59 -0
  10. package/dist/domain/bank/bank.helpers.d.ts +29 -0
  11. package/dist/domain/bank/bank.schema.d.ts +39 -0
  12. package/dist/domain/bank/bank.types.d.ts +9 -0
  13. package/dist/domain/bank/index.d.ts +4 -0
  14. package/dist/domain/channel/channel.d.ts +40 -0
  15. package/dist/domain/channel/channel.enums.d.ts +14 -0
  16. package/dist/domain/channel/channel.types.d.ts +12 -0
  17. package/dist/domain/channel/index.d.ts +3 -0
  18. package/dist/domain/country/country.d.ts +73 -0
  19. package/dist/domain/country/country.enums.d.ts +45 -0
  20. package/dist/domain/country/country.helpers.d.ts +6 -0
  21. package/dist/domain/country/country.schema.d.ts +73 -0
  22. package/{script/src/models/country/types.d.ts → dist/domain/country/country.types.d.ts} +18 -1
  23. package/dist/domain/country/index.d.ts +4 -0
  24. package/dist/domain/currency/currency.d.ts +62 -0
  25. package/dist/domain/currency/currency.helpers.d.ts +4 -0
  26. package/dist/domain/currency/currency.schema.d.ts +24 -0
  27. package/{script/src/models/currency/types.d.ts → dist/domain/currency/currency.types.d.ts} +7 -2
  28. package/dist/domain/currency/index.d.ts +4 -0
  29. package/{esm/src/models → dist/domain}/index.d.ts +3 -2
  30. package/dist/domain/mobile-money-provider/index.d.ts +4 -0
  31. package/dist/domain/mobile-money-provider/mobile-money-provider.d.ts +53 -0
  32. package/dist/domain/mobile-money-provider/mobile-money-provider.helpers.d.ts +5 -0
  33. package/dist/domain/mobile-money-provider/mobile-money-provider.schema.d.ts +22 -0
  34. package/dist/domain/mobile-money-provider/mobile-money-provider.types.d.ts +21 -0
  35. package/dist/domain/phone-number/index.d.ts +4 -0
  36. package/dist/domain/phone-number/phone-number.d.ts +57 -0
  37. package/dist/domain/phone-number/phone-number.helpers.d.ts +67 -0
  38. package/dist/domain/phone-number/phone-number.parser.d.ts +43 -0
  39. package/dist/domain/phone-number/phone-number.schema.d.ts +21 -0
  40. package/dist/domain/phone-number/phone-number.types.d.ts +72 -0
  41. package/dist/factories/amount.factory.d.ts +50 -0
  42. package/dist/factories/bank.factory.d.ts +47 -0
  43. package/dist/factories/country.factory.d.ts +40 -0
  44. package/dist/factories/currency.factory.d.ts +40 -0
  45. package/dist/factories/index.d.ts +7 -0
  46. package/dist/factories/mobile-money-provider.factory.d.ts +43 -0
  47. package/dist/factories/phone-number.factory.d.ts +31 -0
  48. package/dist/factories/transaction-limit.factory.d.ts +36 -0
  49. package/dist/index.cjs.js +2 -0
  50. package/dist/index.cjs.js.map +1 -0
  51. package/dist/index.d.ts +5 -0
  52. package/dist/index.esm.js +2 -0
  53. package/dist/index.esm.js.map +1 -0
  54. package/dist/registries/bank.registry.d.ts +36 -0
  55. package/dist/registries/country.registry.d.ts +45 -0
  56. package/dist/registries/currency.registry.d.ts +33 -0
  57. package/dist/registries/index.d.ts +5 -0
  58. package/dist/registries/mobile-money-provider.registry.d.ts +48 -0
  59. package/dist/registries/transaction-limit.registry.d.ts +30 -0
  60. package/dist/repositories/bank.repository.d.ts +30 -0
  61. package/dist/repositories/country.repository.d.ts +31 -0
  62. package/dist/repositories/currency.repository.d.ts +28 -0
  63. package/dist/repositories/index.d.ts +5 -0
  64. package/dist/repositories/mobile-money-provider.repository.d.ts +53 -0
  65. package/dist/repositories/transaction-limit.repository.d.ts +31 -0
  66. package/{script/src → dist}/utils/id.d.ts +7 -3
  67. package/{esm/src/utils/index.js → dist/utils/index.d.ts} +1 -0
  68. package/dist/utils/logger.d.ts +2 -0
  69. package/dist/utils/text.d.ts +103 -0
  70. package/{script/src → dist}/utils/time.d.ts +9 -4
  71. package/package.json +46 -23
  72. package/LICENSE +0 -7
  73. package/esm/_dnt.test_shims.d.ts.map +0 -1
  74. package/esm/deps/deno.land/std@0.217.0/assert/_constants.d.ts.map +0 -1
  75. package/esm/deps/deno.land/std@0.217.0/assert/_diff.d.ts.map +0 -1
  76. package/esm/deps/deno.land/std@0.217.0/assert/_format.d.ts.map +0 -1
  77. package/esm/deps/deno.land/std@0.217.0/assert/assert.d.ts.map +0 -1
  78. package/esm/deps/deno.land/std@0.217.0/assert/assert_almost_equals.d.ts.map +0 -1
  79. package/esm/deps/deno.land/std@0.217.0/assert/assert_array_includes.d.ts.map +0 -1
  80. package/esm/deps/deno.land/std@0.217.0/assert/assert_equals.d.ts.map +0 -1
  81. package/esm/deps/deno.land/std@0.217.0/assert/assert_exists.d.ts.map +0 -1
  82. package/esm/deps/deno.land/std@0.217.0/assert/assert_false.d.ts.map +0 -1
  83. package/esm/deps/deno.land/std@0.217.0/assert/assert_greater.d.ts.map +0 -1
  84. package/esm/deps/deno.land/std@0.217.0/assert/assert_greater_or_equal.d.ts.map +0 -1
  85. package/esm/deps/deno.land/std@0.217.0/assert/assert_instance_of.d.ts.map +0 -1
  86. package/esm/deps/deno.land/std@0.217.0/assert/assert_is_error.d.ts.map +0 -1
  87. package/esm/deps/deno.land/std@0.217.0/assert/assert_less.d.ts.map +0 -1
  88. package/esm/deps/deno.land/std@0.217.0/assert/assert_less_or_equal.d.ts.map +0 -1
  89. package/esm/deps/deno.land/std@0.217.0/assert/assert_match.d.ts.map +0 -1
  90. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_equals.d.ts.map +0 -1
  91. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_instance_of.d.ts.map +0 -1
  92. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_match.d.ts.map +0 -1
  93. package/esm/deps/deno.land/std@0.217.0/assert/assert_not_strict_equals.d.ts.map +0 -1
  94. package/esm/deps/deno.land/std@0.217.0/assert/assert_object_match.d.ts.map +0 -1
  95. package/esm/deps/deno.land/std@0.217.0/assert/assert_rejects.d.ts.map +0 -1
  96. package/esm/deps/deno.land/std@0.217.0/assert/assert_strict_equals.d.ts.map +0 -1
  97. package/esm/deps/deno.land/std@0.217.0/assert/assert_string_includes.d.ts.map +0 -1
  98. package/esm/deps/deno.land/std@0.217.0/assert/assert_throws.d.ts.map +0 -1
  99. package/esm/deps/deno.land/std@0.217.0/assert/assertion_error.d.ts.map +0 -1
  100. package/esm/deps/deno.land/std@0.217.0/assert/equal.d.ts.map +0 -1
  101. package/esm/deps/deno.land/std@0.217.0/assert/fail.d.ts.map +0 -1
  102. package/esm/deps/deno.land/std@0.217.0/assert/mod.d.ts.map +0 -1
  103. package/esm/deps/deno.land/std@0.217.0/assert/unimplemented.d.ts.map +0 -1
  104. package/esm/deps/deno.land/std@0.217.0/assert/unreachable.d.ts.map +0 -1
  105. package/esm/deps/deno.land/std@0.217.0/fmt/colors.d.ts.map +0 -1
  106. package/esm/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
  107. package/esm/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
  108. package/esm/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
  109. package/esm/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
  110. package/esm/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
  111. package/esm/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
  112. package/esm/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
  113. package/esm/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
  114. package/esm/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
  115. package/esm/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
  116. package/esm/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
  117. package/esm/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
  118. package/esm/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
  119. package/esm/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
  120. package/esm/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
  121. package/esm/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
  122. package/esm/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
  123. package/esm/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
  124. package/esm/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
  125. package/esm/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
  126. package/esm/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
  127. package/esm/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
  128. package/esm/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
  129. package/esm/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
  130. package/esm/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
  131. package/esm/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
  132. package/esm/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
  133. package/esm/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
  134. package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +0 -1
  135. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  136. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  137. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  138. package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  139. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  140. package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  141. package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +0 -1
  142. package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +0 -1
  143. package/esm/mod.d.ts +0 -5
  144. package/esm/mod.d.ts.map +0 -1
  145. package/esm/mod.js +0 -4
  146. package/esm/package.json +0 -3
  147. package/esm/src/config/config_service.d.ts +0 -11
  148. package/esm/src/config/config_service.d.ts.map +0 -1
  149. package/esm/src/config/config_service.js +0 -19
  150. package/esm/src/config/index.d.ts +0 -2
  151. package/esm/src/config/index.d.ts.map +0 -1
  152. package/esm/src/config/index.js +0 -1
  153. package/esm/src/data/banks_tz.d.ts +0 -7
  154. package/esm/src/data/banks_tz.d.ts.map +0 -1
  155. package/esm/src/data/banks_tz.js +0 -197
  156. package/esm/src/data/countries.d.ts +0 -39
  157. package/esm/src/data/countries.d.ts.map +0 -1
  158. package/esm/src/data/countries.js +0 -2475
  159. package/esm/src/data/currencies.d.ts +0 -1901
  160. package/esm/src/data/currencies.d.ts.map +0 -1
  161. package/esm/src/data/currencies.js +0 -1073
  162. package/esm/src/data/phone_patterns.d.ts +0 -3809
  163. package/esm/src/data/phone_patterns.d.ts.map +0 -1
  164. package/esm/src/data/phone_patterns.js +0 -2325
  165. package/esm/src/models/amount/amount.d.ts +0 -53
  166. package/esm/src/models/amount/amount.d.ts.map +0 -1
  167. package/esm/src/models/amount/amount.js +0 -190
  168. package/esm/src/models/amount/amount.test.d.ts.map +0 -1
  169. package/esm/src/models/amount/antd_validator.d.ts +0 -40
  170. package/esm/src/models/amount/antd_validator.d.ts.map +0 -1
  171. package/esm/src/models/amount/antd_validator.js +0 -58
  172. package/esm/src/models/amount/antd_validator.test.d.ts.map +0 -1
  173. package/esm/src/models/amount/index.d.ts +0 -3
  174. package/esm/src/models/amount/index.d.ts.map +0 -1
  175. package/esm/src/models/amount/index.js +0 -2
  176. package/esm/src/models/bank/antd_validator.d.ts +0 -11
  177. package/esm/src/models/bank/antd_validator.d.ts.map +0 -1
  178. package/esm/src/models/bank/antd_validator.js +0 -26
  179. package/esm/src/models/bank/antd_validator.test.d.ts.map +0 -1
  180. package/esm/src/models/bank/bank.d.ts +0 -257
  181. package/esm/src/models/bank/bank.d.ts.map +0 -1
  182. package/esm/src/models/bank/bank.js +0 -450
  183. package/esm/src/models/bank/bank.test.d.ts.map +0 -1
  184. package/esm/src/models/bank/index.d.ts +0 -5
  185. package/esm/src/models/bank/index.d.ts.map +0 -1
  186. package/esm/src/models/bank/index.js +0 -4
  187. package/esm/src/models/bank/types.d.ts +0 -7
  188. package/esm/src/models/bank/types.d.ts.map +0 -1
  189. package/esm/src/models/bank/types.js +0 -45
  190. package/esm/src/models/bank/utils.d.ts +0 -8
  191. package/esm/src/models/bank/utils.d.ts.map +0 -1
  192. package/esm/src/models/bank/utils.js +0 -9
  193. package/esm/src/models/country/country.d.ts +0 -822
  194. package/esm/src/models/country/country.d.ts.map +0 -1
  195. package/esm/src/models/country/country.js +0 -737
  196. package/esm/src/models/country/country.test.d.ts.map +0 -1
  197. package/esm/src/models/country/index.d.ts +0 -4
  198. package/esm/src/models/country/index.d.ts.map +0 -1
  199. package/esm/src/models/country/index.js +0 -3
  200. package/esm/src/models/country/types.d.ts +0 -63
  201. package/esm/src/models/country/types.d.ts.map +0 -1
  202. package/esm/src/models/country/types.js +0 -105
  203. package/esm/src/models/country/utils.d.ts +0 -21
  204. package/esm/src/models/country/utils.d.ts.map +0 -1
  205. package/esm/src/models/country/utils.js +0 -25
  206. package/esm/src/models/currency/currency.d.ts +0 -465
  207. package/esm/src/models/currency/currency.d.ts.map +0 -1
  208. package/esm/src/models/currency/currency.js +0 -471
  209. package/esm/src/models/currency/currency.test.d.ts.map +0 -1
  210. package/esm/src/models/currency/index.d.ts +0 -4
  211. package/esm/src/models/currency/index.d.ts.map +0 -1
  212. package/esm/src/models/currency/index.js +0 -3
  213. package/esm/src/models/currency/types.d.ts +0 -21
  214. package/esm/src/models/currency/types.d.ts.map +0 -1
  215. package/esm/src/models/currency/types.js +0 -28
  216. package/esm/src/models/currency/utils.d.ts +0 -8
  217. package/esm/src/models/currency/utils.d.ts.map +0 -1
  218. package/esm/src/models/currency/utils.js +0 -9
  219. package/esm/src/models/index.d.ts.map +0 -1
  220. package/esm/src/models/index.js +0 -5
  221. package/esm/src/models/phone_number/format.d.ts +0 -13
  222. package/esm/src/models/phone_number/format.d.ts.map +0 -1
  223. package/esm/src/models/phone_number/format.js +0 -13
  224. package/esm/src/models/phone_number/global/phone_number.d.ts +0 -162
  225. package/esm/src/models/phone_number/global/phone_number.d.ts.map +0 -1
  226. package/esm/src/models/phone_number/global/phone_number.js +0 -459
  227. package/esm/src/models/phone_number/global/phone_number.test.d.ts.map +0 -1
  228. package/esm/src/models/phone_number/global/service.d.ts +0 -267
  229. package/esm/src/models/phone_number/global/service.d.ts.map +0 -1
  230. package/esm/src/models/phone_number/global/service.js +0 -498
  231. package/esm/src/models/phone_number/global/service.test.d.ts.map +0 -1
  232. package/esm/src/models/phone_number/index.d.ts +0 -6
  233. package/esm/src/models/phone_number/index.d.ts.map +0 -1
  234. package/esm/src/models/phone_number/index.js +0 -5
  235. package/esm/src/models/phone_number/tz/antd_validator.d.ts +0 -77
  236. package/esm/src/models/phone_number/tz/antd_validator.d.ts.map +0 -1
  237. package/esm/src/models/phone_number/tz/antd_validator.js +0 -90
  238. package/esm/src/models/phone_number/tz/antdvalidator.test.d.ts.map +0 -1
  239. package/esm/src/models/phone_number/tz/network_operator.d.ts +0 -30
  240. package/esm/src/models/phone_number/tz/network_operator.d.ts.map +0 -1
  241. package/esm/src/models/phone_number/tz/network_operator.js +0 -47
  242. package/esm/src/models/phone_number/tz/phone_number.d.ts +0 -141
  243. package/esm/src/models/phone_number/tz/phone_number.d.ts.map +0 -1
  244. package/esm/src/models/phone_number/tz/phone_number.js +0 -290
  245. package/esm/src/models/phone_number/tz/phone_number.test.d.ts.map +0 -1
  246. package/esm/src/reports/index.d.ts +0 -2
  247. package/esm/src/reports/index.d.ts.map +0 -1
  248. package/esm/src/reports/index.js +0 -1
  249. package/esm/src/reports/report_manager.d.ts +0 -146
  250. package/esm/src/reports/report_manager.d.ts.map +0 -1
  251. package/esm/src/reports/report_manager.js +0 -326
  252. package/esm/src/utils/id.d.ts +0 -12
  253. package/esm/src/utils/id.d.ts.map +0 -1
  254. package/esm/src/utils/id.js +0 -19
  255. package/esm/src/utils/index.d.ts +0 -4
  256. package/esm/src/utils/index.d.ts.map +0 -1
  257. package/esm/src/utils/text.d.ts +0 -32
  258. package/esm/src/utils/text.d.ts.map +0 -1
  259. package/esm/src/utils/text.js +0 -68
  260. package/esm/src/utils/text.test.d.ts.map +0 -1
  261. package/esm/src/utils/time.d.ts +0 -21
  262. package/esm/src/utils/time.d.ts.map +0 -1
  263. package/esm/src/utils/time.js +0 -34
  264. package/script/_dnt.test_shims.d.ts.map +0 -1
  265. package/script/deps/deno.land/std@0.217.0/assert/_constants.d.ts.map +0 -1
  266. package/script/deps/deno.land/std@0.217.0/assert/_diff.d.ts.map +0 -1
  267. package/script/deps/deno.land/std@0.217.0/assert/_format.d.ts.map +0 -1
  268. package/script/deps/deno.land/std@0.217.0/assert/assert.d.ts.map +0 -1
  269. package/script/deps/deno.land/std@0.217.0/assert/assert_almost_equals.d.ts.map +0 -1
  270. package/script/deps/deno.land/std@0.217.0/assert/assert_array_includes.d.ts.map +0 -1
  271. package/script/deps/deno.land/std@0.217.0/assert/assert_equals.d.ts.map +0 -1
  272. package/script/deps/deno.land/std@0.217.0/assert/assert_exists.d.ts.map +0 -1
  273. package/script/deps/deno.land/std@0.217.0/assert/assert_false.d.ts.map +0 -1
  274. package/script/deps/deno.land/std@0.217.0/assert/assert_greater.d.ts.map +0 -1
  275. package/script/deps/deno.land/std@0.217.0/assert/assert_greater_or_equal.d.ts.map +0 -1
  276. package/script/deps/deno.land/std@0.217.0/assert/assert_instance_of.d.ts.map +0 -1
  277. package/script/deps/deno.land/std@0.217.0/assert/assert_is_error.d.ts.map +0 -1
  278. package/script/deps/deno.land/std@0.217.0/assert/assert_less.d.ts.map +0 -1
  279. package/script/deps/deno.land/std@0.217.0/assert/assert_less_or_equal.d.ts.map +0 -1
  280. package/script/deps/deno.land/std@0.217.0/assert/assert_match.d.ts.map +0 -1
  281. package/script/deps/deno.land/std@0.217.0/assert/assert_not_equals.d.ts.map +0 -1
  282. package/script/deps/deno.land/std@0.217.0/assert/assert_not_instance_of.d.ts.map +0 -1
  283. package/script/deps/deno.land/std@0.217.0/assert/assert_not_match.d.ts.map +0 -1
  284. package/script/deps/deno.land/std@0.217.0/assert/assert_not_strict_equals.d.ts.map +0 -1
  285. package/script/deps/deno.land/std@0.217.0/assert/assert_object_match.d.ts.map +0 -1
  286. package/script/deps/deno.land/std@0.217.0/assert/assert_rejects.d.ts.map +0 -1
  287. package/script/deps/deno.land/std@0.217.0/assert/assert_strict_equals.d.ts.map +0 -1
  288. package/script/deps/deno.land/std@0.217.0/assert/assert_string_includes.d.ts.map +0 -1
  289. package/script/deps/deno.land/std@0.217.0/assert/assert_throws.d.ts.map +0 -1
  290. package/script/deps/deno.land/std@0.217.0/assert/assertion_error.d.ts.map +0 -1
  291. package/script/deps/deno.land/std@0.217.0/assert/equal.d.ts.map +0 -1
  292. package/script/deps/deno.land/std@0.217.0/assert/fail.d.ts.map +0 -1
  293. package/script/deps/deno.land/std@0.217.0/assert/mod.d.ts.map +0 -1
  294. package/script/deps/deno.land/std@0.217.0/assert/unimplemented.d.ts.map +0 -1
  295. package/script/deps/deno.land/std@0.217.0/assert/unreachable.d.ts.map +0 -1
  296. package/script/deps/deno.land/std@0.217.0/fmt/colors.d.ts.map +0 -1
  297. package/script/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
  298. package/script/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
  299. package/script/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
  300. package/script/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
  301. package/script/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
  302. package/script/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
  303. package/script/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
  304. package/script/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
  305. package/script/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
  306. package/script/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
  307. package/script/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
  308. package/script/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
  309. package/script/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
  310. package/script/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
  311. package/script/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
  312. package/script/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
  313. package/script/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
  314. package/script/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
  315. package/script/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
  316. package/script/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
  317. package/script/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
  318. package/script/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
  319. package/script/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
  320. package/script/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
  321. package/script/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
  322. package/script/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
  323. package/script/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
  324. package/script/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
  325. package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +0 -1
  326. package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
  327. package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
  328. package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
  329. package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
  330. package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
  331. package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
  332. package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +0 -1
  333. package/script/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +0 -1
  334. package/script/mod.d.ts +0 -5
  335. package/script/mod.d.ts.map +0 -1
  336. package/script/mod.js +0 -20
  337. package/script/package.json +0 -3
  338. package/script/src/config/config_service.d.ts +0 -11
  339. package/script/src/config/config_service.d.ts.map +0 -1
  340. package/script/src/config/config_service.js +0 -23
  341. package/script/src/config/index.d.ts +0 -2
  342. package/script/src/config/index.d.ts.map +0 -1
  343. package/script/src/config/index.js +0 -17
  344. package/script/src/data/banks_tz.d.ts +0 -7
  345. package/script/src/data/banks_tz.d.ts.map +0 -1
  346. package/script/src/data/banks_tz.js +0 -199
  347. package/script/src/data/countries.d.ts +0 -39
  348. package/script/src/data/countries.d.ts.map +0 -1
  349. package/script/src/data/countries.js +0 -2477
  350. package/script/src/data/currencies.d.ts +0 -1901
  351. package/script/src/data/currencies.d.ts.map +0 -1
  352. package/script/src/data/currencies.js +0 -1075
  353. package/script/src/data/phone_patterns.d.ts +0 -3809
  354. package/script/src/data/phone_patterns.d.ts.map +0 -1
  355. package/script/src/data/phone_patterns.js +0 -2327
  356. package/script/src/models/amount/amount.d.ts +0 -53
  357. package/script/src/models/amount/amount.d.ts.map +0 -1
  358. package/script/src/models/amount/amount.js +0 -194
  359. package/script/src/models/amount/amount.test.d.ts.map +0 -1
  360. package/script/src/models/amount/antd_validator.d.ts +0 -40
  361. package/script/src/models/amount/antd_validator.d.ts.map +0 -1
  362. package/script/src/models/amount/antd_validator.js +0 -62
  363. package/script/src/models/amount/antd_validator.test.d.ts.map +0 -1
  364. package/script/src/models/amount/index.d.ts +0 -3
  365. package/script/src/models/amount/index.d.ts.map +0 -1
  366. package/script/src/models/amount/index.js +0 -18
  367. package/script/src/models/bank/antd_validator.d.ts +0 -11
  368. package/script/src/models/bank/antd_validator.d.ts.map +0 -1
  369. package/script/src/models/bank/antd_validator.js +0 -30
  370. package/script/src/models/bank/antd_validator.test.d.ts.map +0 -1
  371. package/script/src/models/bank/bank.d.ts +0 -257
  372. package/script/src/models/bank/bank.d.ts.map +0 -1
  373. package/script/src/models/bank/bank.js +0 -458
  374. package/script/src/models/bank/bank.test.d.ts.map +0 -1
  375. package/script/src/models/bank/index.d.ts +0 -5
  376. package/script/src/models/bank/index.d.ts.map +0 -1
  377. package/script/src/models/bank/index.js +0 -20
  378. package/script/src/models/bank/types.d.ts +0 -7
  379. package/script/src/models/bank/types.d.ts.map +0 -1
  380. package/script/src/models/bank/types.js +0 -48
  381. package/script/src/models/bank/utils.d.ts +0 -8
  382. package/script/src/models/bank/utils.d.ts.map +0 -1
  383. package/script/src/models/bank/utils.js +0 -12
  384. package/script/src/models/country/country.d.ts +0 -822
  385. package/script/src/models/country/country.d.ts.map +0 -1
  386. package/script/src/models/country/country.js +0 -745
  387. package/script/src/models/country/country.test.d.ts.map +0 -1
  388. package/script/src/models/country/index.d.ts +0 -4
  389. package/script/src/models/country/index.d.ts.map +0 -1
  390. package/script/src/models/country/index.js +0 -19
  391. package/script/src/models/country/types.d.ts.map +0 -1
  392. package/script/src/models/country/types.js +0 -108
  393. package/script/src/models/country/utils.d.ts +0 -21
  394. package/script/src/models/country/utils.d.ts.map +0 -1
  395. package/script/src/models/country/utils.js +0 -30
  396. package/script/src/models/currency/currency.d.ts +0 -465
  397. package/script/src/models/currency/currency.d.ts.map +0 -1
  398. package/script/src/models/currency/currency.js +0 -479
  399. package/script/src/models/currency/currency.test.d.ts.map +0 -1
  400. package/script/src/models/currency/index.d.ts +0 -4
  401. package/script/src/models/currency/index.d.ts.map +0 -1
  402. package/script/src/models/currency/index.js +0 -19
  403. package/script/src/models/currency/types.d.ts.map +0 -1
  404. package/script/src/models/currency/types.js +0 -31
  405. package/script/src/models/currency/utils.d.ts +0 -8
  406. package/script/src/models/currency/utils.d.ts.map +0 -1
  407. package/script/src/models/currency/utils.js +0 -12
  408. package/script/src/models/index.d.ts +0 -6
  409. package/script/src/models/index.d.ts.map +0 -1
  410. package/script/src/models/index.js +0 -21
  411. package/script/src/models/phone_number/format.d.ts +0 -13
  412. package/script/src/models/phone_number/format.d.ts.map +0 -1
  413. package/script/src/models/phone_number/format.js +0 -16
  414. package/script/src/models/phone_number/global/phone_number.d.ts +0 -162
  415. package/script/src/models/phone_number/global/phone_number.d.ts.map +0 -1
  416. package/script/src/models/phone_number/global/phone_number.js +0 -463
  417. package/script/src/models/phone_number/global/phone_number.test.d.ts.map +0 -1
  418. package/script/src/models/phone_number/global/service.d.ts +0 -267
  419. package/script/src/models/phone_number/global/service.d.ts.map +0 -1
  420. package/script/src/models/phone_number/global/service.js +0 -506
  421. package/script/src/models/phone_number/global/service.test.d.ts.map +0 -1
  422. package/script/src/models/phone_number/index.d.ts +0 -6
  423. package/script/src/models/phone_number/index.d.ts.map +0 -1
  424. package/script/src/models/phone_number/index.js +0 -21
  425. package/script/src/models/phone_number/tz/antd_validator.d.ts +0 -77
  426. package/script/src/models/phone_number/tz/antd_validator.d.ts.map +0 -1
  427. package/script/src/models/phone_number/tz/antd_validator.js +0 -94
  428. package/script/src/models/phone_number/tz/antdvalidator.test.d.ts.map +0 -1
  429. package/script/src/models/phone_number/tz/network_operator.d.ts +0 -30
  430. package/script/src/models/phone_number/tz/network_operator.d.ts.map +0 -1
  431. package/script/src/models/phone_number/tz/network_operator.js +0 -50
  432. package/script/src/models/phone_number/tz/phone_number.d.ts +0 -141
  433. package/script/src/models/phone_number/tz/phone_number.d.ts.map +0 -1
  434. package/script/src/models/phone_number/tz/phone_number.js +0 -294
  435. package/script/src/models/phone_number/tz/phone_number.test.d.ts.map +0 -1
  436. package/script/src/reports/index.d.ts +0 -2
  437. package/script/src/reports/index.d.ts.map +0 -1
  438. package/script/src/reports/index.js +0 -17
  439. package/script/src/reports/report_manager.d.ts +0 -146
  440. package/script/src/reports/report_manager.d.ts.map +0 -1
  441. package/script/src/reports/report_manager.js +0 -336
  442. package/script/src/utils/id.d.ts.map +0 -1
  443. package/script/src/utils/id.js +0 -23
  444. package/script/src/utils/index.d.ts +0 -4
  445. package/script/src/utils/index.d.ts.map +0 -1
  446. package/script/src/utils/index.js +0 -19
  447. package/script/src/utils/text.d.ts +0 -32
  448. package/script/src/utils/text.d.ts.map +0 -1
  449. package/script/src/utils/text.js +0 -75
  450. package/script/src/utils/text.test.d.ts.map +0 -1
  451. package/script/src/utils/time.d.ts.map +0 -1
  452. package/script/src/utils/time.js +0 -39
@@ -0,0 +1,36 @@
1
+ import type { Bank } from "@domain/bank/bank.js";
2
+ import type { BankSwiftCode } from "@domain/bank/bank.types.js";
3
+ import type { ISO2CountryCode } from "@domain/country/country.types.js";
4
+ /**
5
+ * Owns the canonical Bank model cache, keyed by country. Reads raw records from
6
+ * BankRepository, constructs Bank instances through BankFactory, and exposes
7
+ * lookup/search/type guard operations.
8
+ */
9
+ export declare class BankRegistry {
10
+ private static instance;
11
+ private readonly repository;
12
+ private readonly factory;
13
+ private readonly cache;
14
+ private constructor();
15
+ static getInstance(): BankRegistry;
16
+ private getCountryBanks;
17
+ /** Returns every Bank registered for a country. */
18
+ getAll(countryCode: ISO2CountryCode): Bank[];
19
+ /** Returns every Bank registered across every supported country. */
20
+ getAllSupportedBanks(): Bank[];
21
+ /**
22
+ * Resolves a Bank by BIC, scanning every supported country until a match is
23
+ * found. Returns undefined when the code is not a valid SWIFT format.
24
+ */
25
+ detectBank(bic: string): Bank | undefined;
26
+ /** Filters banks for a country whose BIC contains the search term. */
27
+ searchBanks(countryCode: ISO2CountryCode, searchTerm: string, limit?: number): Bank[];
28
+ /** Filters banks across all supported countries by BIC search term. */
29
+ searchAllBanks(searchTerm: string, limit?: number): Bank[];
30
+ /**
31
+ * Resolves a Bank by BIC. When the country is provided the lookup is scoped
32
+ * to that country; otherwise the registry searches across every supported
33
+ * country.
34
+ */
35
+ findByBIC(bic: BankSwiftCode | string, countryCode?: ISO2CountryCode): Bank | undefined;
36
+ }
@@ -0,0 +1,45 @@
1
+ import { CONTINENT, SUB_REGION } from "@domain/country/country.enums.js";
2
+ import type { Country } from "@domain/country/country.js";
3
+ import type { CountryCode } from "@domain/country/country.types.js";
4
+ /**
5
+ * Owns the canonical Country model cache. Reads raw records from
6
+ * CountryRepository, constructs Country instances through CountryFactory, and
7
+ * exposes lookups, type guards, and queries.
8
+ */
9
+ export declare class CountryRegistry {
10
+ private static instance;
11
+ private readonly repository;
12
+ private readonly factory;
13
+ private list;
14
+ private byCode;
15
+ private byIso3;
16
+ private byContinent;
17
+ private byRegion;
18
+ private initialized;
19
+ private constructor();
20
+ static getInstance(): CountryRegistry;
21
+ private ensureInitialized;
22
+ /** Returns every supported Country. */
23
+ getAll(): Country[];
24
+ /** Returns every supported Country keyed by ISO-2 code. */
25
+ getAllAsRecord(): Record<string, Country>;
26
+ /** Returns every Country in a continent. */
27
+ getByContinent(continent: CONTINENT): Country[];
28
+ /** Returns every Country in a sub-region. */
29
+ getByRegion(region: SUB_REGION): Country[];
30
+ /** Returns every supported continent. */
31
+ getContinents(): CONTINENT[];
32
+ /** Returns every supported sub-region. */
33
+ getRegions(): SUB_REGION[];
34
+ /** Returns countries whose ISO-2 or ISO-3 code matches the search term. */
35
+ search(searchTerm: string, limit?: number): Country[];
36
+ /** Resolves a Country by its ISO-2 or ISO-3 code (case-insensitive). */
37
+ findByCode(code: CountryCode | string): Country | undefined;
38
+ /**
39
+ * Resolves a Country from arbitrary string input by trimming, upper-casing,
40
+ * and validating against the ISO code list.
41
+ */
42
+ find(input: string): Country | undefined;
43
+ /** Equality check based on name and ISO-2 code. */
44
+ compare(country1: Country, country2: Country): boolean;
45
+ }
@@ -0,0 +1,33 @@
1
+ import type { Currency } from "@domain/currency/currency.js";
2
+ import type { CurrencyCode } from "@domain/currency/currency.types.js";
3
+ /**
4
+ * Owns the canonical Currency model cache. Reads raw records from
5
+ * CurrencyRepository, constructs Currency instances through CurrencyFactory,
6
+ * and exposes lookups, type guards, and queries.
7
+ */
8
+ export declare class CurrencyRegistry {
9
+ private static instance;
10
+ private readonly repository;
11
+ private readonly factory;
12
+ private list;
13
+ private byCode;
14
+ private initialized;
15
+ private constructor();
16
+ static getInstance(): CurrencyRegistry;
17
+ /** Builds the Currency cache from raw repository data; idempotent. */
18
+ private ensureInitialized;
19
+ /** Returns every supported Currency. */
20
+ getAll(): Currency[];
21
+ /** Returns every supported Currency keyed by code. */
22
+ getAllAsRecord(): Record<string, Currency>;
23
+ /** Resolves a Currency by ISO 4217 code (case-insensitive). */
24
+ findByCode(code: CurrencyCode | string): Currency | undefined;
25
+ /**
26
+ * Resolves a Currency from arbitrary string input by trimming, upper-casing,
27
+ * and validating against the ISO 4217 code list.
28
+ */
29
+ find(input: string | CurrencyCode): Currency | undefined;
30
+ /** Pipe-separated regex pattern of every currency symbol (escaped). */
31
+ getCurrencySymbolPattern(): string;
32
+ private escapeRegExp;
33
+ }
@@ -0,0 +1,5 @@
1
+ export * from "./bank.registry.js";
2
+ export * from "./country.registry.js";
3
+ export * from "./currency.registry.js";
4
+ export * from "./mobile-money-provider.registry.js";
5
+ export * from "./transaction-limit.registry.js";
@@ -0,0 +1,48 @@
1
+ import { TransactionDirection } from "@domain/channel/channel.enums.js";
2
+ import type { ISO2CountryCode } from "@domain/country/country.types.js";
3
+ import type { MobileMoneyProvider } from "@domain/mobile-money-provider/mobile-money-provider.js";
4
+ import { PhoneNumber } from "@domain/phone-number/phone-number.js";
5
+ /**
6
+ * Owns the canonical MobileMoneyProvider cache, keyed by country. Reads raw
7
+ * records from MobileMoneyProviderRepository, constructs provider instances
8
+ * through MobileMoneyProviderFactory, and exposes queries plus prefix-based
9
+ * detection.
10
+ */
11
+ export declare class MobileMoneyProviderRegistry {
12
+ private static instance;
13
+ private readonly repository;
14
+ private readonly factory;
15
+ private readonly cache;
16
+ private constructor();
17
+ static getInstance(): MobileMoneyProviderRegistry;
18
+ private getCountryProviders;
19
+ /** Every configured mobile-money provider for a supported country. */
20
+ getProviders(countryCode: ISO2CountryCode): MobileMoneyProvider[];
21
+ /** Providers in a country filtered by transaction direction. */
22
+ getProvidersByDirection(countryCode: ISO2CountryCode, direction: TransactionDirection): MobileMoneyProvider[];
23
+ /** Looks up a provider by its stable Tembo identifier. */
24
+ findProvider(countryCode: ISO2CountryCode, providerId: string): MobileMoneyProvider | undefined;
25
+ /** Whether a provider exists, optionally constrained to a direction. */
26
+ isProviderSupported(countryCode: ISO2CountryCode, providerId: string, direction?: TransactionDirection): boolean;
27
+ /** Whether prefix-based detection is unreliable in this country. */
28
+ requiresExplicitProvider(countryCode: ISO2CountryCode): boolean;
29
+ /**
30
+ * Detects a provider from a parsed phone number's compact (national)
31
+ * representation. Returns undefined when prefix mapping is unreliable.
32
+ */
33
+ detectProviderByCompactNumber(countryCode: ISO2CountryCode, compactNumber: string): MobileMoneyProvider | undefined;
34
+ /** Detects a provider from a raw phone-number string for a given country. */
35
+ detectProviderByPhoneNumber(countryCode: ISO2CountryCode, phoneNumber: string): MobileMoneyProvider | undefined;
36
+ /**
37
+ * Detects a provider from a phone number when prefix mapping is reliable.
38
+ *
39
+ * Kenya currently returns undefined because number portability means the
40
+ * provider must be supplied explicitly instead of inferred from the prefix.
41
+ */
42
+ detectProviderFromPhoneNumber(input: string | PhoneNumber): MobileMoneyProvider | undefined;
43
+ /**
44
+ * Normalises a raw phone-number string into a national compact number for a
45
+ * country, stripping country-calling-code or leading-zero prefixes.
46
+ */
47
+ private toCompactNumber;
48
+ }
@@ -0,0 +1,30 @@
1
+ import type { ChannelType, TransactionDirection } from "@domain/channel/channel.enums.js";
2
+ import type { ISO2CountryCode } from "@domain/country/country.types.js";
3
+ import type { CurrencyCode } from "@domain/currency/currency.types.js";
4
+ import { type TransactionLimits } from "@factories/transaction-limit.factory.js";
5
+ export interface TransactionLimitQuery {
6
+ countryCode: ISO2CountryCode;
7
+ currencyCode: CurrencyCode;
8
+ direction: TransactionDirection;
9
+ channelType: ChannelType;
10
+ providerId?: string;
11
+ }
12
+ export type { TransactionLimits };
13
+ /**
14
+ * Registry for bundled transaction-limit records.
15
+ *
16
+ * The repository provides raw numeric limits; the factory converts matching
17
+ * records into Amount-aware TransactionLimits objects.
18
+ */
19
+ export declare class TransactionLimitRegistry {
20
+ private static instance;
21
+ private readonly repository;
22
+ private readonly factory;
23
+ private constructor();
24
+ static getInstance(): TransactionLimitRegistry;
25
+ /**
26
+ * Returns limits for an exact coverage query, preserving currency semantics
27
+ * by wrapping numeric min/max values in Amount instances.
28
+ */
29
+ getLimits(query: TransactionLimitQuery): TransactionLimits | undefined;
30
+ }
@@ -0,0 +1,30 @@
1
+ import type { ISO2CountryCode } from "@domain/country/country.types.js";
2
+ /**
3
+ * Raw bank record as it appears in a country dataset.
4
+ *
5
+ * Older entries used `fullName` / `swiftCode`; both legacy and current shapes
6
+ * are accepted to remain backwards-compatible with already-published datasets.
7
+ */
8
+ export interface RawBank {
9
+ officialName?: string;
10
+ fullName?: string;
11
+ shortName: string;
12
+ bic?: string;
13
+ swiftCode?: string;
14
+ formerNames?: string[];
15
+ }
16
+ /**
17
+ * Pure data layer for bank records, indexed by country. Loads bundled JSON
18
+ * datasets and exposes typed lookups; never constructs domain models.
19
+ */
20
+ export declare class BankRepository {
21
+ private static instance;
22
+ private constructor();
23
+ static getInstance(): BankRepository;
24
+ /** ISO-2 codes of every country with bundled bank data. */
25
+ getSupportedCountryCodes(): ISO2CountryCode[];
26
+ /** Returns every raw bank record for a country. */
27
+ listRaw(countryCode: ISO2CountryCode): RawBank[];
28
+ /** Returns a raw bank record matched by BIC inside the given country. */
29
+ findRawByBIC(bic: string, countryCode?: ISO2CountryCode): RawBank | undefined;
30
+ }
@@ -0,0 +1,31 @@
1
+ import type { ISO2CountryCode, ISO3CountryCode } from "@domain/country/country.types.js";
2
+ /**
3
+ * Raw country record as it appears in the source dataset (snake_case).
4
+ */
5
+ export interface RawCountry {
6
+ name: string;
7
+ iso_2: ISO2CountryCode;
8
+ name_official: string;
9
+ iso_3: ISO3CountryCode;
10
+ flag_emoji: string;
11
+ continent: string;
12
+ region: string;
13
+ currency_iso_code: string | null;
14
+ dial_code: number;
15
+ }
16
+ /**
17
+ * Pure data layer for country records. Loads the bundled JSON dataset and
18
+ * exposes typed lookups; never constructs domain models.
19
+ */
20
+ export declare class CountryRepository {
21
+ private static instance;
22
+ private readonly list;
23
+ private readonly byIso2;
24
+ private readonly byIso3;
25
+ private constructor();
26
+ static getInstance(): CountryRepository;
27
+ /** Returns every raw country record. */
28
+ listRaw(): RawCountry[];
29
+ /** Returns a raw country record by ISO-2 or ISO-3 code, or undefined. */
30
+ findRawByCode(code: string): RawCountry | undefined;
31
+ }
@@ -0,0 +1,28 @@
1
+ import type { CurrencyCode } from "@domain/currency/currency.types.js";
2
+ /**
3
+ * Raw currency record as it appears in the source dataset (snake_case).
4
+ */
5
+ export interface RawCurrency {
6
+ symbol: string;
7
+ name: string;
8
+ symbol_native: string;
9
+ decimal_digits: number;
10
+ rounding: number;
11
+ code: CurrencyCode;
12
+ name_plural: string;
13
+ }
14
+ /**
15
+ * Pure data layer for currency records. Loads the bundled JSON dataset and
16
+ * exposes typed lookups; never constructs domain models.
17
+ */
18
+ export declare class CurrencyRepository {
19
+ private static instance;
20
+ private readonly byCode;
21
+ private readonly list;
22
+ private constructor();
23
+ static getInstance(): CurrencyRepository;
24
+ /** Returns every raw currency record. */
25
+ listRaw(): RawCurrency[];
26
+ /** Returns a raw currency record by code, or undefined if unknown. */
27
+ findRawByCode(code: string): RawCurrency | undefined;
28
+ }
@@ -0,0 +1,5 @@
1
+ export * from "./bank.repository.js";
2
+ export * from "./country.repository.js";
3
+ export * from "./currency.repository.js";
4
+ export * from "./mobile-money-provider.repository.js";
5
+ export * from "./transaction-limit.repository.js";
@@ -0,0 +1,53 @@
1
+ import type { ISO2CountryCode } from "@domain/country/country.types.js";
2
+ import type { CurrencyCode } from "@domain/currency/currency.types.js";
3
+ /**
4
+ * Raw provider record as it appears in a country dataset.
5
+ */
6
+ export interface RawMobileMoneyProvider {
7
+ id: string;
8
+ displayName: string;
9
+ mobileMoneyServiceName: string;
10
+ directions: string[];
11
+ requiresExplicitProvider: boolean;
12
+ phonePrefixes: string[];
13
+ }
14
+ /**
15
+ * Raw mobile-money dataset for a country.
16
+ */
17
+ export interface RawMobileMoneyDataset {
18
+ dataset_name: string;
19
+ source: string;
20
+ version: string;
21
+ countryCode: ISO2CountryCode;
22
+ currencyCode: CurrencyCode;
23
+ last_updated: string;
24
+ providers: RawMobileMoneyProvider[];
25
+ }
26
+ /**
27
+ * Pure data layer for mobile-money provider records, indexed by country.
28
+ * Loads bundled JSON datasets and exposes typed lookups; never constructs
29
+ * domain models.
30
+ */
31
+ export declare class MobileMoneyProviderRepository {
32
+ private static instance;
33
+ private constructor();
34
+ static getInstance(): MobileMoneyProviderRepository;
35
+ /** ISO-2 codes of every country with bundled mobile-money data. */
36
+ getSupportedCountryCodes(): ISO2CountryCode[];
37
+ /** Returns the raw dataset for a country, or undefined if unsupported. */
38
+ findRawDataset(countryCode: ISO2CountryCode): RawMobileMoneyDataset | undefined;
39
+ /** Returns every raw provider record for a country. */
40
+ listRaw(countryCode: ISO2CountryCode): RawMobileMoneyProvider[];
41
+ /**
42
+ * Returns a raw provider record matched by ID.
43
+ * If countryCode is provided, searches only within that country.
44
+ * If omitted, searches across all supported countries.
45
+ */
46
+ findRawByID(target: string, countryCode?: ISO2CountryCode): {
47
+ provider: RawMobileMoneyProvider;
48
+ meta: {
49
+ countryCode: ISO2CountryCode;
50
+ currencyCode: CurrencyCode;
51
+ };
52
+ } | undefined;
53
+ }
@@ -0,0 +1,31 @@
1
+ import type { ChannelType, TransactionDirection } from "@domain/channel/channel.enums.js";
2
+ import type { ISO2CountryCode } from "@domain/country/country.types.js";
3
+ import type { CurrencyCode } from "@domain/currency/currency.types.js";
4
+ export interface RawTransactionLimitQuery {
5
+ countryCode: ISO2CountryCode;
6
+ currencyCode: CurrencyCode;
7
+ direction: TransactionDirection;
8
+ channelType: ChannelType;
9
+ providerId?: string;
10
+ }
11
+ export interface RawTransactionLimit extends RawTransactionLimitQuery {
12
+ min: number;
13
+ max: number;
14
+ }
15
+ /**
16
+ * Reads raw transaction limit data as plain numeric values.
17
+ *
18
+ * TransactionLimitFactory wraps these results in Amount instances when callers
19
+ * need currency-aware semantics.
20
+ */
21
+ export declare class TransactionLimitRepository {
22
+ private static instance;
23
+ private readonly limits;
24
+ private constructor();
25
+ static getInstance(): TransactionLimitRepository;
26
+ /**
27
+ * Finds the most specific limit matching country, currency, channel, direction,
28
+ * and optional provider ID.
29
+ */
30
+ findLimit(query: RawTransactionLimitQuery): RawTransactionLimit | undefined;
31
+ }
@@ -2,11 +2,15 @@
2
2
  * Generates a unique UUID (version 4).
3
3
  * @returns {string} - A randomly generated UUID string.
4
4
  */
5
- export declare function generateUniqueUUID(): string;
5
+ declare function generateUniqueUUID(): string;
6
6
  /**
7
7
  * Generates a UUID (version 5) based on the input string and a predefined namespace.
8
8
  * @param {string} data - The input string to generate the UUID from.
9
9
  * @returns {string} - A UUID string generated from the input string.
10
10
  */
11
- export declare function generateUuidBasedOn(data: string): string;
12
- //# sourceMappingURL=id.d.ts.map
11
+ declare function generateUuidBasedOn(data: string): string;
12
+ export declare const IdUtils: {
13
+ generateUniqueUUID: typeof generateUniqueUUID;
14
+ generateUuidBasedOn: typeof generateUuidBasedOn;
15
+ };
16
+ export {};
@@ -1,3 +1,4 @@
1
1
  export * from "./id.js";
2
2
  export * from "./time.js";
3
3
  export * from "./text.js";
4
+ export * from "./logger.js";
@@ -0,0 +1,2 @@
1
+ import pino from "pino";
2
+ export declare const logger: pino.Logger<never, boolean>;
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Capitalizes the first letter of a string and converts the rest of the string to lowercase.
3
+ * @param {string} str - The input string.
4
+ * @returns {string} - The formatted string with the first letter capitalized.
5
+ */
6
+ declare function capitalizeFirstLetter(str: string): string;
7
+ /**
8
+ * Combines a first name and a last name into a full name.
9
+ * @param {string} firstName - The first name.
10
+ * @param {string} lastName - The last name.
11
+ * @returns {string} - The full name formatted as "FirstName LastName".
12
+ */
13
+ declare function getFullName(firstName: string, lastName: string): string;
14
+ /**
15
+ * Generates a URL-friendly slug from a given text.
16
+ * @param {string} text - The input string.
17
+ * @returns {string} - The generated slug with lowercase alphanumeric characters and hyphens.
18
+ */
19
+ declare function generateSlug(text: string): string;
20
+ /**
21
+ * Abbreviates a full name into a first name and the initial of the last name.
22
+ * @param {string} fullName - The input full name.
23
+ * @returns {string} - The abbreviated name in the format "FirstName L.".
24
+ */
25
+ declare function abbreviateName(fullName: string): string;
26
+ /**
27
+ * Extracts the initials from a full name.
28
+ * @param {string} fullName - The input full name.
29
+ * @returns {string} - The initials in uppercase format.
30
+ */
31
+ declare function getInitialsFrom(fullName: string): string;
32
+ /**
33
+ * Validates a personal name (account holder name, wallet owner name, etc.)
34
+ * Used across bank accounts and mobile-money wallets for consistent validation.
35
+ *
36
+ * @param {string} name - The name to validate
37
+ * @returns {boolean} True if the name meets all validation criteria, false otherwise
38
+ *
39
+ * @example
40
+ * // Returns true
41
+ * validatePersonalName("John Smith");
42
+ *
43
+ * @example
44
+ * // Returns false (too short)
45
+ * validatePersonalName("Jo");
46
+ *
47
+ * @example
48
+ * // Returns false (invalid characters)
49
+ * validatePersonalName("User123");
50
+ */
51
+ declare function validatePersonalName(name: string): boolean;
52
+ /**
53
+ * Validates a business name (company, organization, etc.)
54
+ * More lenient than personal name validation.
55
+ *
56
+ * @param {string} name - The business name to validate
57
+ * @returns {boolean} True if the name meets business name criteria, false otherwise
58
+ *
59
+ * @example
60
+ * // Returns true
61
+ * validateBusinessName("ABC Corporation Ltd");
62
+ *
63
+ * @example
64
+ * // Returns true
65
+ * validateBusinessName("Smith & Sons Inc.");
66
+ *
67
+ * @example
68
+ * // Returns true
69
+ * validateBusinessName("M-Pesa");
70
+ */
71
+ declare function validateBusinessName(name: string): boolean;
72
+ /**
73
+ * Validates any name (personal or business) with automatic detection.
74
+ * First tries to detect if it's a business name, then validates accordingly.
75
+ * If detection fails, tries both validation methods.
76
+ *
77
+ * @param {string} name - The name to validate (personal or business)
78
+ * @returns {boolean} True if the name is valid as either personal or business name
79
+ *
80
+ * @example
81
+ * // Returns true (personal name)
82
+ * validateName("John Smith");
83
+ *
84
+ * @example
85
+ * // Returns true (business name)
86
+ * validateName("CRDB Bank PLC");
87
+ *
88
+ * @example
89
+ * // Returns true (could be either)
90
+ * validateName("Smith Solutions");
91
+ */
92
+ declare function validateName(name: string): boolean;
93
+ export declare const TextUtils: {
94
+ capitalizeFirstLetter: typeof capitalizeFirstLetter;
95
+ getFullName: typeof getFullName;
96
+ generateSlug: typeof generateSlug;
97
+ abbreviateName: typeof abbreviateName;
98
+ getInitialsFrom: typeof getInitialsFrom;
99
+ validatePersonalName: typeof validatePersonalName;
100
+ validateBusinessName: typeof validateBusinessName;
101
+ validateName: typeof validateName;
102
+ };
103
+ export {};
@@ -4,18 +4,23 @@
4
4
  * @param {Date} b - The second Date object.
5
5
  * @returns {boolean} - Returns true if the dates are equal in terms of year, month, and day; otherwise, false.
6
6
  */
7
- export declare function compareDates(a: Date, b: Date): boolean;
7
+ declare function compareDates(a: Date, b: Date): boolean;
8
8
  /**
9
9
  * Sorts two dates in descending order (latest date first).
10
10
  * @param {Date} a - The first Date object.
11
11
  * @param {Date} b - The second Date object.
12
12
  * @returns {number} - Returns a positive value if `b` is after `a`, a negative value if `a` is after `b`, and 0 if they are equal.
13
13
  */
14
- export declare function sortDates(a: Date, b: Date): number;
14
+ declare function sortDates(a: Date, b: Date): number;
15
15
  /**
16
16
  * Creates a delay for a given number of milliseconds.
17
17
  * @param {number} milliseconds - The delay duration in milliseconds.
18
18
  * @returns {Promise<void>} - A promise that resolves after the specified delay.
19
19
  */
20
- export declare function delay(milliseconds: number): Promise<void>;
21
- //# sourceMappingURL=time.d.ts.map
20
+ declare function delay(milliseconds: number): Promise<void>;
21
+ export declare const TimeUtils: {
22
+ compareDates: typeof compareDates;
23
+ sortDates: typeof sortDates;
24
+ delay: typeof delay;
25
+ };
26
+ export {};
package/package.json CHANGED
@@ -1,36 +1,59 @@
1
1
  {
2
2
  "name": "@temboplus/frontend-core",
3
- "version": "0.4.4",
3
+ "version": "1.0.1-beta.0",
4
4
  "description": "A JavaScript/TypeScript package providing common utilities and logic shared across front-end TemboPlus projects.",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/TemboPlus-Frontend/frontend-core-js.git"
8
- },
5
+ "author": "Okello Gerald",
9
6
  "license": "MIT",
10
- "bugs": {
11
- "url": "https://github.com/TemboPlus-Frontend/frontend-core-js/issues"
12
- },
13
- "main": "./script/mod.js",
14
- "module": "./esm/mod.js",
7
+ "keywords": [
8
+ "temboplus",
9
+ "frontend-core"
10
+ ],
11
+ "type": "module",
12
+ "main": "./dist/index.cjs.js",
13
+ "module": "./dist/index.esm.js",
14
+ "types": "./dist/index.d.ts",
15
15
  "exports": {
16
16
  ".": {
17
- "import": "./esm/mod.js",
18
- "require": "./script/mod.js"
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.esm.js",
19
+ "require": "./dist/index.cjs.js"
19
20
  }
20
21
  },
22
+ "files": [
23
+ "dist"
24
+ ],
21
25
  "scripts": {
22
- "test": "node test_runner.js"
26
+ "build": "node ./node_modules/rollup/dist/bin/rollup -c rollup.config.js",
27
+ "prepare": "npm run build",
28
+ "dev": "npm run build -- --watch",
29
+ "test": "node ./node_modules/vitest/vitest.mjs"
23
30
  },
24
- "private": false,
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/TemboPlus-Frontend/frontend-core-js.git"
34
+ },
35
+ "bugs": {
36
+ "url": "https://github.com/TemboPlus-Frontend/frontend-core-js/issues"
37
+ },
38
+ "homepage": "https://github.com/TemboPlus-Frontend/frontend-core-js#readme",
25
39
  "dependencies": {
26
- "antd": "^5.24.2",
27
- "file-saver": "^2.0.5",
28
- "uuid": "^11.1.0"
40
+ "libphonenumber-js": "^1.12.6",
41
+ "pino": "^9.13.1",
42
+ "tslib": "^2.8.1",
43
+ "uuid": "^11.1.0",
44
+ "zod": "^3.24.2"
29
45
  },
30
46
  "devDependencies": {
31
- "@types/node": "^20.9.0",
32
- "picocolors": "^1.0.0",
33
- "@deno/shim-deno": "~0.18.0"
34
- },
35
- "_generatedBy": "dnt@dev"
36
- }
47
+ "@rollup/plugin-alias": "^5.1.1",
48
+ "@rollup/plugin-commonjs": "^28.0.3",
49
+ "@rollup/plugin-json": "^6.1.0",
50
+ "@rollup/plugin-node-resolve": "^16.0.1",
51
+ "@rollup/plugin-terser": "^0.4.4",
52
+ "@rollup/plugin-typescript": "^12.1.2",
53
+ "pino-pretty": "^13.1.1",
54
+ "rollup": "^4.39.0",
55
+ "ts-node": "^10.9.2",
56
+ "typescript": "^5.9.3",
57
+ "vitest": "^3.2.4"
58
+ }
59
+ }
package/LICENSE DELETED
@@ -1,7 +0,0 @@
1
- Copyright (c) 2025 TemboPlus Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1 +0,0 @@
1
- {"version":3,"file":"_dnt.test_shims.d.ts","sourceRoot":"","sources":["../src/_dnt.test_shims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAKvC,eAAO,MAAM,aAAa;;CAA2C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_constants.d.ts","sourceRoot":"","sources":["../../../../../src/deps/deno.land/std@0.217.0/assert/_constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,qBAAqB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_diff.d.ts","sourceRoot":"","sources":["../../../../../src/deps/deno.land/std@0.217.0/assert/_diff.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE7C,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;CAChC;AA4BD;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CA+L5D;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAqI3C;AAwCD,wBAAgB,YAAY,CAC1B,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAC7C,EAAE,UAAkB,EAAE;;CAAK,GAC1B,MAAM,EAAE,CAwBV"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"_format.d.ts","sourceRoot":"","sources":["../../../../../src/deps/deno.land/std@0.217.0/assert/_format.ts"],"names":[],"mappings":"AAYA,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAezC"}