@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.
- package/LICENSE +7 -0
- package/README.md +1 -1
- package/esm/_dnt.test_shims.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/_constants.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/_diff.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/_format.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_almost_equals.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_array_includes.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_equals.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_exists.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_false.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_greater.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_greater_or_equal.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_instance_of.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_is_error.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_less.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_less_or_equal.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_match.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_not_equals.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_not_instance_of.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_not_match.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_not_strict_equals.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_object_match.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_rejects.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_strict_equals.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_string_includes.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assert_throws.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/assertion_error.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/equal.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/fail.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/mod.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/unimplemented.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/assert/unreachable.d.ts.map +1 -0
- package/esm/deps/deno.land/std@0.217.0/fmt/colors.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +1 -0
- package/esm/mod.d.ts +5 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +4 -0
- package/esm/package.json +3 -0
- package/{dist/services/config.d.ts → esm/src/config/config_service.d.ts} +5 -6
- package/esm/src/config/config_service.d.ts.map +1 -0
- package/esm/src/config/config_service.js +19 -0
- package/esm/src/config/index.d.ts +2 -0
- package/esm/src/config/index.d.ts.map +1 -0
- package/esm/src/config/index.js +1 -0
- package/esm/src/data/banks_tz.d.ts +7 -0
- package/esm/src/data/banks_tz.d.ts.map +1 -0
- package/esm/src/data/banks_tz.js +197 -0
- package/esm/src/data/countries.d.ts +39 -0
- package/esm/src/data/countries.d.ts.map +1 -0
- package/esm/src/data/countries.js +2475 -0
- package/esm/src/data/currencies.d.ts +1901 -0
- package/esm/src/data/currencies.d.ts.map +1 -0
- package/esm/src/data/currencies.js +1073 -0
- package/esm/src/data/phone_patterns.d.ts +3809 -0
- package/esm/src/data/phone_patterns.d.ts.map +1 -0
- package/esm/src/data/phone_patterns.js +2325 -0
- package/esm/src/models/amount/amount.d.ts +53 -0
- package/esm/src/models/amount/amount.d.ts.map +1 -0
- package/esm/src/models/amount/amount.js +190 -0
- package/esm/src/models/amount/amount.test.d.ts.map +1 -0
- package/esm/src/models/amount/antd_validator.d.ts +40 -0
- package/esm/src/models/amount/antd_validator.d.ts.map +1 -0
- package/esm/src/models/amount/antd_validator.js +58 -0
- package/esm/src/models/amount/antd_validator.test.d.ts.map +1 -0
- package/esm/src/models/amount/index.d.ts +3 -0
- package/esm/src/models/amount/index.d.ts.map +1 -0
- package/esm/src/models/amount/index.js +2 -0
- package/esm/src/models/bank/antd_validator.d.ts +11 -0
- package/esm/src/models/bank/antd_validator.d.ts.map +1 -0
- package/esm/src/models/bank/antd_validator.js +26 -0
- package/esm/src/models/bank/antd_validator.test.d.ts.map +1 -0
- package/esm/src/models/bank/bank.d.ts +257 -0
- package/esm/src/models/bank/bank.d.ts.map +1 -0
- package/esm/src/models/bank/bank.js +450 -0
- package/esm/src/models/bank/bank.test.d.ts.map +1 -0
- package/esm/src/models/bank/index.d.ts +5 -0
- package/esm/src/models/bank/index.d.ts.map +1 -0
- package/esm/src/models/bank/index.js +4 -0
- package/{dist/models/bank/bank.types.d.ts → esm/src/models/bank/types.d.ts} +6 -4
- package/esm/src/models/bank/types.d.ts.map +1 -0
- package/esm/src/models/bank/types.js +45 -0
- package/esm/src/models/bank/utils.d.ts +8 -0
- package/esm/src/models/bank/utils.d.ts.map +1 -0
- package/esm/src/models/bank/utils.js +9 -0
- package/{dist → esm/src}/models/country/country.d.ts +5 -37
- package/esm/src/models/country/country.d.ts.map +1 -0
- package/esm/src/models/country/country.js +737 -0
- package/esm/src/models/country/country.test.d.ts.map +1 -0
- package/esm/src/models/country/index.d.ts +4 -0
- package/esm/src/models/country/index.d.ts.map +1 -0
- package/esm/src/models/country/index.js +3 -0
- package/{dist/models/country/country.types.d.ts → esm/src/models/country/types.d.ts} +1 -0
- package/esm/src/models/country/types.d.ts.map +1 -0
- package/esm/src/models/country/types.js +105 -0
- package/{dist/models/country/country.validation.d.ts → esm/src/models/country/utils.d.ts} +6 -10
- package/esm/src/models/country/utils.d.ts.map +1 -0
- package/esm/src/models/country/utils.js +25 -0
- package/{dist → esm/src}/models/currency/currency.d.ts +3 -28
- package/esm/src/models/currency/currency.d.ts.map +1 -0
- package/esm/src/models/currency/currency.js +471 -0
- package/esm/src/models/currency/currency.test.d.ts.map +1 -0
- package/esm/src/models/currency/index.d.ts +4 -0
- package/esm/src/models/currency/index.d.ts.map +1 -0
- package/esm/src/models/currency/index.js +3 -0
- package/{dist/models/currency/currency.types.d.ts → esm/src/models/currency/types.d.ts} +2 -1
- package/esm/src/models/currency/types.d.ts.map +1 -0
- package/esm/src/models/currency/types.js +28 -0
- package/esm/src/models/currency/utils.d.ts +8 -0
- package/esm/src/models/currency/utils.d.ts.map +1 -0
- package/esm/src/models/currency/utils.js +9 -0
- package/esm/src/models/index.d.ts +6 -0
- package/esm/src/models/index.d.ts.map +1 -0
- package/{dist/models/index.d.ts → esm/src/models/index.js} +1 -1
- package/esm/src/models/phone_number/format.d.ts +13 -0
- package/esm/src/models/phone_number/format.d.ts.map +1 -0
- package/esm/src/models/phone_number/format.js +13 -0
- package/esm/src/models/phone_number/global/phone_number.d.ts +162 -0
- package/esm/src/models/phone_number/global/phone_number.d.ts.map +1 -0
- package/esm/src/models/phone_number/global/phone_number.js +459 -0
- package/esm/src/models/phone_number/global/phone_number.test.d.ts.map +1 -0
- package/esm/src/models/phone_number/global/service.d.ts +267 -0
- package/esm/src/models/phone_number/global/service.d.ts.map +1 -0
- package/esm/src/models/phone_number/global/service.js +498 -0
- package/esm/src/models/phone_number/global/service.test.d.ts.map +1 -0
- package/esm/src/models/phone_number/index.d.ts +6 -0
- package/esm/src/models/phone_number/index.d.ts.map +1 -0
- package/esm/src/models/phone_number/index.js +5 -0
- package/esm/src/models/phone_number/tz/antd_validator.d.ts +77 -0
- package/esm/src/models/phone_number/tz/antd_validator.d.ts.map +1 -0
- package/esm/src/models/phone_number/tz/antd_validator.js +90 -0
- package/esm/src/models/phone_number/tz/antdvalidator.test.d.ts.map +1 -0
- package/esm/src/models/phone_number/tz/network_operator.d.ts +30 -0
- package/esm/src/models/phone_number/tz/network_operator.d.ts.map +1 -0
- package/esm/src/models/phone_number/tz/network_operator.js +47 -0
- package/esm/src/models/phone_number/tz/phone_number.d.ts +141 -0
- package/esm/src/models/phone_number/tz/phone_number.d.ts.map +1 -0
- package/esm/src/models/phone_number/tz/phone_number.js +290 -0
- package/esm/src/models/phone_number/tz/phone_number.test.d.ts.map +1 -0
- package/esm/src/reports/index.d.ts +2 -0
- package/esm/src/reports/index.d.ts.map +1 -0
- package/esm/src/reports/index.js +1 -0
- package/{dist/reports/report-manager.d.ts → esm/src/reports/report_manager.d.ts} +4 -27
- package/esm/src/reports/report_manager.d.ts.map +1 -0
- package/esm/src/reports/report_manager.js +318 -0
- package/{dist → esm/src}/utils/id.d.ts +3 -7
- package/esm/src/utils/id.d.ts.map +1 -0
- package/esm/src/utils/id.js +19 -0
- package/esm/src/utils/index.d.ts +4 -0
- package/esm/src/utils/index.d.ts.map +1 -0
- package/esm/src/utils/text.d.ts +32 -0
- package/esm/src/utils/text.d.ts.map +1 -0
- package/esm/src/utils/text.js +68 -0
- package/esm/src/utils/text.test.d.ts.map +1 -0
- package/{dist → esm/src}/utils/time.d.ts +4 -9
- package/esm/src/utils/time.d.ts.map +1 -0
- package/esm/src/utils/time.js +34 -0
- package/package.json +22 -47
- package/script/_dnt.test_shims.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/_constants.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/_diff.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/_format.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_almost_equals.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_array_includes.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_equals.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_exists.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_false.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_greater.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_greater_or_equal.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_instance_of.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_is_error.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_less.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_less_or_equal.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_match.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_not_equals.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_not_instance_of.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_not_match.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_not_strict_equals.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_object_match.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_rejects.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_strict_equals.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_string_includes.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assert_throws.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/assertion_error.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/equal.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/fail.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/mod.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/unimplemented.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/assert/unreachable.d.ts.map +1 -0
- package/script/deps/deno.land/std@0.217.0/fmt/colors.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/assertion_state.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/_test_suite.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/testing/1.0.9/bdd.d.ts.map +1 -0
- package/script/mod.d.ts +5 -0
- package/script/mod.d.ts.map +1 -0
- package/script/mod.js +20 -0
- package/script/package.json +3 -0
- package/script/src/config/config_service.d.ts +11 -0
- package/script/src/config/config_service.d.ts.map +1 -0
- package/script/src/config/config_service.js +23 -0
- package/script/src/config/index.d.ts +2 -0
- package/script/src/config/index.d.ts.map +1 -0
- package/script/src/config/index.js +17 -0
- package/script/src/data/banks_tz.d.ts +7 -0
- package/script/src/data/banks_tz.d.ts.map +1 -0
- package/script/src/data/banks_tz.js +199 -0
- package/script/src/data/countries.d.ts +39 -0
- package/script/src/data/countries.d.ts.map +1 -0
- package/script/src/data/countries.js +2477 -0
- package/script/src/data/currencies.d.ts +1901 -0
- package/script/src/data/currencies.d.ts.map +1 -0
- package/script/src/data/currencies.js +1075 -0
- package/script/src/data/phone_patterns.d.ts +3809 -0
- package/script/src/data/phone_patterns.d.ts.map +1 -0
- package/script/src/data/phone_patterns.js +2327 -0
- package/script/src/models/amount/amount.d.ts +53 -0
- package/script/src/models/amount/amount.d.ts.map +1 -0
- package/script/src/models/amount/amount.js +194 -0
- package/script/src/models/amount/amount.test.d.ts.map +1 -0
- package/script/src/models/amount/antd_validator.d.ts +40 -0
- package/script/src/models/amount/antd_validator.d.ts.map +1 -0
- package/script/src/models/amount/antd_validator.js +62 -0
- package/script/src/models/amount/antd_validator.test.d.ts.map +1 -0
- package/script/src/models/amount/index.d.ts +3 -0
- package/script/src/models/amount/index.d.ts.map +1 -0
- package/script/src/models/amount/index.js +18 -0
- package/script/src/models/bank/antd_validator.d.ts +11 -0
- package/script/src/models/bank/antd_validator.d.ts.map +1 -0
- package/script/src/models/bank/antd_validator.js +30 -0
- package/script/src/models/bank/antd_validator.test.d.ts.map +1 -0
- package/script/src/models/bank/bank.d.ts +257 -0
- package/script/src/models/bank/bank.d.ts.map +1 -0
- package/script/src/models/bank/bank.js +458 -0
- package/script/src/models/bank/bank.test.d.ts.map +1 -0
- package/script/src/models/bank/index.d.ts +5 -0
- package/script/src/models/bank/index.d.ts.map +1 -0
- package/script/src/models/bank/index.js +20 -0
- package/script/src/models/bank/types.d.ts +7 -0
- package/script/src/models/bank/types.d.ts.map +1 -0
- package/script/src/models/bank/types.js +48 -0
- package/script/src/models/bank/utils.d.ts +8 -0
- package/script/src/models/bank/utils.d.ts.map +1 -0
- package/script/src/models/bank/utils.js +12 -0
- package/script/src/models/country/country.d.ts +822 -0
- package/script/src/models/country/country.d.ts.map +1 -0
- package/script/src/models/country/country.js +745 -0
- package/script/src/models/country/country.test.d.ts.map +1 -0
- package/script/src/models/country/index.d.ts +4 -0
- package/script/src/models/country/index.d.ts.map +1 -0
- package/script/src/models/country/index.js +19 -0
- package/script/src/models/country/types.d.ts +63 -0
- package/script/src/models/country/types.d.ts.map +1 -0
- package/script/src/models/country/types.js +108 -0
- package/script/src/models/country/utils.d.ts +21 -0
- package/script/src/models/country/utils.d.ts.map +1 -0
- package/script/src/models/country/utils.js +30 -0
- package/script/src/models/currency/currency.d.ts +465 -0
- package/script/src/models/currency/currency.d.ts.map +1 -0
- package/script/src/models/currency/currency.js +479 -0
- package/script/src/models/currency/currency.test.d.ts.map +1 -0
- package/script/src/models/currency/index.d.ts +4 -0
- package/script/src/models/currency/index.d.ts.map +1 -0
- package/script/src/models/currency/index.js +19 -0
- package/script/src/models/currency/types.d.ts +21 -0
- package/script/src/models/currency/types.d.ts.map +1 -0
- package/script/src/models/currency/types.js +31 -0
- package/script/src/models/currency/utils.d.ts +8 -0
- package/script/src/models/currency/utils.d.ts.map +1 -0
- package/script/src/models/currency/utils.js +12 -0
- package/script/src/models/index.d.ts +6 -0
- package/script/src/models/index.d.ts.map +1 -0
- package/script/src/models/index.js +21 -0
- package/script/src/models/phone_number/format.d.ts +13 -0
- package/script/src/models/phone_number/format.d.ts.map +1 -0
- package/script/src/models/phone_number/format.js +16 -0
- package/script/src/models/phone_number/global/phone_number.d.ts +162 -0
- package/script/src/models/phone_number/global/phone_number.d.ts.map +1 -0
- package/script/src/models/phone_number/global/phone_number.js +463 -0
- package/script/src/models/phone_number/global/phone_number.test.d.ts.map +1 -0
- package/script/src/models/phone_number/global/service.d.ts +267 -0
- package/script/src/models/phone_number/global/service.d.ts.map +1 -0
- package/script/src/models/phone_number/global/service.js +506 -0
- package/script/src/models/phone_number/global/service.test.d.ts.map +1 -0
- package/script/src/models/phone_number/index.d.ts +6 -0
- package/script/src/models/phone_number/index.d.ts.map +1 -0
- package/script/src/models/phone_number/index.js +21 -0
- package/script/src/models/phone_number/tz/antd_validator.d.ts +77 -0
- package/script/src/models/phone_number/tz/antd_validator.d.ts.map +1 -0
- package/script/src/models/phone_number/tz/antd_validator.js +94 -0
- package/script/src/models/phone_number/tz/antdvalidator.test.d.ts.map +1 -0
- package/script/src/models/phone_number/tz/network_operator.d.ts +30 -0
- package/script/src/models/phone_number/tz/network_operator.d.ts.map +1 -0
- package/script/src/models/phone_number/tz/network_operator.js +50 -0
- package/script/src/models/phone_number/tz/phone_number.d.ts +141 -0
- package/script/src/models/phone_number/tz/phone_number.d.ts.map +1 -0
- package/script/src/models/phone_number/tz/phone_number.js +294 -0
- package/script/src/models/phone_number/tz/phone_number.test.d.ts.map +1 -0
- package/script/src/reports/index.d.ts +2 -0
- package/script/src/reports/index.d.ts.map +1 -0
- package/script/src/reports/index.js +17 -0
- package/script/src/reports/report_manager.d.ts +144 -0
- package/script/src/reports/report_manager.d.ts.map +1 -0
- package/script/src/reports/report_manager.js +328 -0
- package/script/src/utils/id.d.ts +12 -0
- package/script/src/utils/id.d.ts.map +1 -0
- package/script/src/utils/id.js +23 -0
- package/script/src/utils/index.d.ts +4 -0
- package/script/src/utils/index.d.ts.map +1 -0
- package/script/src/utils/index.js +19 -0
- package/script/src/utils/text.d.ts +32 -0
- package/script/src/utils/text.d.ts.map +1 -0
- package/script/src/utils/text.js +75 -0
- package/script/src/utils/text.test.d.ts.map +1 -0
- package/script/src/utils/time.d.ts +21 -0
- package/script/src/utils/time.d.ts.map +1 -0
- package/script/src/utils/time.js +39 -0
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/payout-countries.d.ts +0 -2
- package/dist/index.cjs.js +0 -8
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.esm.js +0 -5
- package/dist/index.esm.js.map +0 -1
- package/dist/models/amount/amount.d.ts +0 -761
- package/dist/models/amount/index.d.ts +0 -1
- package/dist/models/bank/bank.d.ts +0 -193
- package/dist/models/bank/bank.schema.d.ts +0 -23
- package/dist/models/bank/bank.validation.d.ts +0 -80
- package/dist/models/bank/index.d.ts +0 -4
- package/dist/models/country/country.schema.d.ts +0 -73
- package/dist/models/country/index.d.ts +0 -4
- package/dist/models/currency/currency.schema.d.ts +0 -24
- package/dist/models/currency/currency.validation.d.ts +0 -11
- package/dist/models/currency/index.d.ts +0 -4
- package/dist/models/phone-number/index.d.ts +0 -6
- package/dist/models/phone-number/mno/index.d.ts +0 -6
- package/dist/models/phone-number/mno/ke/mobile-number.ke-mnos.d.ts +0 -22
- package/dist/models/phone-number/mno/ke/mobile-number.ke.d.ts +0 -45
- package/dist/models/phone-number/mno/mno.types.d.ts +0 -63
- package/dist/models/phone-number/mno/mno.utils.d.ts +0 -40
- package/dist/models/phone-number/mno/tz/mobile-number.tz-mnos.d.ts +0 -48
- package/dist/models/phone-number/mno/tz/mobile-number.tz.d.ts +0 -44
- package/dist/models/phone-number/phone-number.d.ts +0 -135
- package/dist/models/phone-number/phone-number.factory.d.ts +0 -52
- package/dist/models/phone-number/phone-number.service.d.ts +0 -36
- package/dist/models/phone-number/phone-number.types.d.ts +0 -115
- package/dist/models/phone-number/phone-number.utils.d.ts +0 -67
- package/dist/reports/index.d.ts +0 -1
- package/dist/services/index.d.ts +0 -2
- package/dist/services/logger.d.ts +0 -2
- package/dist/utils/text.d.ts +0 -103
- /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,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,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,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[];
|