@temboplus/frontend-core 0.2.20-beta.2 → 0.2.21
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 -161
- 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,44 +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 Tanzanian (TZ) **mobile** phone number.
|
|
8
|
-
* Extends the generic PhoneNumber class and provides TZ-specific behavior.
|
|
9
|
-
*/
|
|
10
|
-
export declare class TZMobileNumber extends PhoneNumber implements PhoneNumberContract {
|
|
11
|
-
readonly countryCode: ISO2CountryCode;
|
|
12
|
-
/**
|
|
13
|
-
* Protected constructor. Use static `from` method for instantiation.
|
|
14
|
-
* Calls the base class constructor.
|
|
15
|
-
*/
|
|
16
|
-
protected constructor(parsedInfo: ParsedPhoneNumber, service: PhoneNumberService);
|
|
17
|
-
/**
|
|
18
|
-
* Validates the structure for a Tanzanian **mobile** phone number.
|
|
19
|
-
* Checks base validity AND ensures the prefix belongs to a known TZ MNO.
|
|
20
|
-
* @returns {boolean} True if the number is a valid TZ mobile number.
|
|
21
|
-
*/
|
|
22
|
-
validate(): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Gets associated Tanzanian mobile operator information based on the number's prefix.
|
|
25
|
-
* Overrides the base implementation.
|
|
26
|
-
* @returns {MNOInfo | undefined} Operator details or undefined.
|
|
27
|
-
*/
|
|
28
|
-
getOperatorInfo(): MNOInfo | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Gets the specific type for this class, overriding the base method.
|
|
31
|
-
* @returns {PhoneNumberType} Always returns MOBILE.
|
|
32
|
-
*/
|
|
33
|
-
getNumberType(): PhoneNumberType;
|
|
34
|
-
/**
|
|
35
|
-
* Attempts to create a `TZMobileNumber` instance from a given string input.
|
|
36
|
-
* Performs TZ-specific parsing and validation FIRST, then uses the core
|
|
37
|
-
* service for final validation and object creation.
|
|
38
|
-
*
|
|
39
|
-
* @param input - The input phone number string.
|
|
40
|
-
* @param options - Parsing options (optional).
|
|
41
|
-
* @returns {TZMobileNumber | undefined} An instance if valid, otherwise undefined.
|
|
42
|
-
*/
|
|
43
|
-
static from(input: string | null | undefined, options?: PhoneNumberParseOptions): TZMobileNumber | undefined;
|
|
44
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { ISO2CountryCode } from "@models/country/country.types.js";
|
|
2
|
-
import type { PhoneNumber as LibPhoneNumberInstance } from "libphonenumber-js";
|
|
3
|
-
import { MNOInfo } from "./mno/mno.types.js";
|
|
4
|
-
import { PhoneNumberService, ParsedPhoneNumber } from "./phone-number.service.js";
|
|
5
|
-
import { PhoneNumberContract, PhoneNumberFormat, PhoneNumberType, PhoneNumberParseOptions } from "./phone-number.types.js";
|
|
6
|
-
import { z } from "zod";
|
|
7
|
-
/**
|
|
8
|
-
* Zod schema for PhoneNumber JSON serialization
|
|
9
|
-
* This schema validates the JSON representation of a PhoneNumber instance
|
|
10
|
-
*
|
|
11
|
-
* E.164 format validation rules:
|
|
12
|
-
* - Starts with '+'
|
|
13
|
-
* - Followed by country code (1-3 digits, first digit 1-9)
|
|
14
|
-
* - Total length: 8-16 characters (including '+')
|
|
15
|
-
* - Contains only digits after '+'
|
|
16
|
-
*/
|
|
17
|
-
export declare const PhoneNumberJSONSchema: z.ZodObject<{
|
|
18
|
-
/** The phone number in E.164 format */
|
|
19
|
-
e164Format: z.ZodString;
|
|
20
|
-
/** Version for future compatibility */
|
|
21
|
-
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
22
|
-
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
version: string;
|
|
24
|
-
e164Format: string;
|
|
25
|
-
}, {
|
|
26
|
-
e164Format: string;
|
|
27
|
-
version?: string | undefined;
|
|
28
|
-
}>;
|
|
29
|
-
/**
|
|
30
|
-
* Infer the PhoneNumberJSON type from the schema
|
|
31
|
-
*/
|
|
32
|
-
export type PhoneNumberJSON = z.infer<typeof PhoneNumberJSONSchema>;
|
|
33
|
-
/**
|
|
34
|
-
* Represents a generic international phone number, validated using libphonenumber-js
|
|
35
|
-
* via the PhoneNumberService. Implements the common PhoneNumberContract interface.
|
|
36
|
-
* This class is intended to be extended by country-specific classes.
|
|
37
|
-
*/
|
|
38
|
-
export declare class PhoneNumber implements PhoneNumberContract {
|
|
39
|
-
readonly countryCode: ISO2CountryCode;
|
|
40
|
-
readonly compactNumber: string;
|
|
41
|
-
readonly e164Format: string;
|
|
42
|
-
protected readonly _service: PhoneNumberService;
|
|
43
|
-
protected readonly _parsedInfo: ParsedPhoneNumber;
|
|
44
|
-
/**
|
|
45
|
-
* Protected constructor. Should be called by subclasses via super()
|
|
46
|
-
* or by static factory methods (`from`).
|
|
47
|
-
* @param parsedInfo - The result from PhoneNumberService.parse().
|
|
48
|
-
* @param service - An instance of PhoneNumberService.
|
|
49
|
-
*/
|
|
50
|
-
protected constructor(parsedInfo: ParsedPhoneNumber, service: PhoneNumberService);
|
|
51
|
-
/**
|
|
52
|
-
* Validates the phone number using the underlying library via the service.
|
|
53
|
-
* Subclasses can override this to add more specific validation.
|
|
54
|
-
* @returns {boolean} True if the number is considered valid by the core library.
|
|
55
|
-
*/
|
|
56
|
-
validate(): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Formats the phone number according to the specified format using the service.
|
|
59
|
-
* Subclasses can override this if country-specific formatting differs from the library's output.
|
|
60
|
-
* @param {PhoneNumberFormat} format - The desired output format.
|
|
61
|
-
* @returns {string} The formatted phone number string.
|
|
62
|
-
*/
|
|
63
|
-
getWithFormat(format: PhoneNumberFormat): string;
|
|
64
|
-
/**
|
|
65
|
-
* Gets the type of the phone number (e.g., MOBILE, FIXED_LINE) using the service.
|
|
66
|
-
* Subclasses might override this for specific known types (e.g., always MOBILE).
|
|
67
|
-
* @returns {PhoneNumberType | undefined} The determined type or undefined.
|
|
68
|
-
*/
|
|
69
|
-
getNumberType(): PhoneNumberType | undefined;
|
|
70
|
-
/**
|
|
71
|
-
* Gets associated mobile operator information.
|
|
72
|
-
* Base implementation returns undefined. Subclasses override this for specific countries.
|
|
73
|
-
* @returns {MNOInfo | undefined} Always returns undefined in the base class.
|
|
74
|
-
*/
|
|
75
|
-
getOperatorInfo(): MNOInfo | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* Gets a human-readable label, typically the international format.
|
|
78
|
-
* @returns {string} A display label for the phone number.
|
|
79
|
-
*/
|
|
80
|
-
get label(): string;
|
|
81
|
-
/**
|
|
82
|
-
* Underlying instance from libphonenumber-js, exposed for potential advanced use.
|
|
83
|
-
* Use with caution, prefer methods defined in PhoneNumberContract.
|
|
84
|
-
*/
|
|
85
|
-
get underlyingInstance(): LibPhoneNumberInstance;
|
|
86
|
-
/**
|
|
87
|
-
* Creates a generic PhoneNumber instance from an input string.
|
|
88
|
-
* Uses PhoneNumberService for parsing and validation.
|
|
89
|
-
* Use PhoneNumberFactory.create() for potentially getting country-specific instances.
|
|
90
|
-
*
|
|
91
|
-
* @param input - Phone number string.
|
|
92
|
-
* @param options - Parsing options like defaultCountry.
|
|
93
|
-
* @returns {PhoneNumber | undefined} Instance if valid and parsable, undefined otherwise.
|
|
94
|
-
*/
|
|
95
|
-
static from(input: string, options?: PhoneNumberParseOptions): PhoneNumber | undefined;
|
|
96
|
-
/**
|
|
97
|
-
* Checks if a string can potentially be parsed and validated as a phone number
|
|
98
|
-
* using the generic 'from' method.
|
|
99
|
-
*/
|
|
100
|
-
static canConstruct(input?: string | null, options?: PhoneNumberParseOptions): boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Robust type guard checking structure and validatability.
|
|
103
|
-
*/
|
|
104
|
-
static is(obj: unknown): obj is PhoneNumberContract;
|
|
105
|
-
/**
|
|
106
|
-
* Serializes the PhoneNumber instance to a JSON-compatible object
|
|
107
|
-
*
|
|
108
|
-
* This method creates a minimal object representation. Only the E.164 format
|
|
109
|
-
* is stored as everything else (country code, compact number, number type,
|
|
110
|
-
* and MNO info) can be reconstructed from it.
|
|
111
|
-
*/
|
|
112
|
-
toJSON(): PhoneNumberJSON;
|
|
113
|
-
/**
|
|
114
|
-
* Serializes the PhoneNumber instance to a JSON string
|
|
115
|
-
*/
|
|
116
|
-
toJSONString(): string;
|
|
117
|
-
/**
|
|
118
|
-
* Creates a PhoneNumber instance from a JSON-compatible object or string
|
|
119
|
-
*
|
|
120
|
-
* This static method reconstructs a PhoneNumber instance from data that was
|
|
121
|
-
* previously serialized using toJSON(). It uses PhoneNumberFactory to get
|
|
122
|
-
* the appropriate instance (generic or country-specific like TZMobileNumber).
|
|
123
|
-
* All properties including country code, compact number, MNO info, and number
|
|
124
|
-
* type are automatically reconstructed from the E.164 format.
|
|
125
|
-
*/
|
|
126
|
-
static fromJSON(json: PhoneNumberJSON | string): PhoneNumber | undefined;
|
|
127
|
-
/**
|
|
128
|
-
* Creates a PhoneNumber instance from a JSON string
|
|
129
|
-
*/
|
|
130
|
-
static fromJSONString(jsonString: string): PhoneNumber | undefined;
|
|
131
|
-
/**
|
|
132
|
-
* Type guard to check if an object is a valid PhoneNumberJSON using Zod validation
|
|
133
|
-
*/
|
|
134
|
-
static isPhoneNumberJSON(obj: unknown): obj is PhoneNumberJSON;
|
|
135
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { MNOInfo } from "./mno/mno.types.js";
|
|
2
|
-
import { PhoneNumberParseOptions, PhoneNumberContract } from "./phone-number.types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Factory class for creating phone number objects that conform to PhoneNumberContract.
|
|
5
|
-
* It attempts to use country-specific implementations (like TZMobileNumber, KEMobileNumber)
|
|
6
|
-
* when available and appropriate, otherwise falls back to the generic PhoneNumber class.
|
|
7
|
-
*
|
|
8
|
-
* Also provides validation methods related to specific use cases like payouts.
|
|
9
|
-
*/
|
|
10
|
-
export declare class PhoneNumberFactory {
|
|
11
|
-
/**
|
|
12
|
-
* Creates an appropriate phone number instance (generic or country-specific)
|
|
13
|
-
* based on the input string and options.
|
|
14
|
-
*
|
|
15
|
-
* @param {string} numberToParse The raw phone number string.
|
|
16
|
-
* @param {PhoneNumberParseOptions} [options] Optional parsing options (e.g., defaultCountry).
|
|
17
|
-
* @returns {PhoneNumberContract | undefined} An instance conforming to PhoneNumberContract
|
|
18
|
-
* if the input is valid, otherwise undefined.
|
|
19
|
-
*/
|
|
20
|
-
static create(numberToParse: string, options?: PhoneNumberParseOptions): PhoneNumberContract | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Convenience method to check if an input string can be constructed into
|
|
23
|
-
* ANY valid phone number object via the factory.
|
|
24
|
-
* @param {string | null | undefined} input The raw phone number string.
|
|
25
|
-
* @param {PhoneNumberParseOptions} [options] Optional parsing options.
|
|
26
|
-
* @returns {boolean} True if a valid phone number object can be created.
|
|
27
|
-
*/
|
|
28
|
-
static canCreate(input: string | null | undefined, options?: PhoneNumberParseOptions): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Checks if a phone number (provided as a string or a PhoneNumberContract object)
|
|
31
|
-
* represents a valid number that can be successfully processed by the specific
|
|
32
|
-
* country implementation (TZMobileNumber or KEMobileNumber) required for payouts,
|
|
33
|
-
* and is of type MOBILE.
|
|
34
|
-
*
|
|
35
|
-
* @param input The raw phone number string OR an existing PhoneNumberContract object.
|
|
36
|
-
* @returns True if the number is valid for payout, false otherwise.
|
|
37
|
-
*/
|
|
38
|
-
static checkPayoutEligibility(input: string | PhoneNumberContract): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Retrieves the Mobile Network Operator (MNO) information for a given phone number.
|
|
41
|
-
* This function first checks if the number is eligible for payout (i.e., a valid
|
|
42
|
-
* mobile number in a supported country). If it is, and the country is Tanzania (TZ),
|
|
43
|
-
* it attempts to parse the number using the Tanzania-specific number class
|
|
44
|
-
* (`TZMobileNumber`) to extract operator details. For other supported countries
|
|
45
|
-
* or if the parsing fails for Tanzania, it returns undefined.
|
|
46
|
-
*
|
|
47
|
-
* @param {string | PhoneNumberContract} input The raw phone number string OR an existing PhoneNumberContract object.
|
|
48
|
-
* @returns {MNOInfo | undefined} An object containing MNO information if the number
|
|
49
|
-
* is a valid Tanzanian mobile number and the operator can be identified; otherwise, undefined.
|
|
50
|
-
*/
|
|
51
|
-
static getMNO(input: string | PhoneNumberContract): MNOInfo | undefined;
|
|
52
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { type NumberType, type PhoneNumber as LibPhoneNumber } from "libphonenumber-js/max";
|
|
2
|
-
import { PhoneNumberFormat } from "./phone-number.types.js";
|
|
3
|
-
import { ISO2CountryCode } from "@models/country/country.types.js";
|
|
4
|
-
export interface ParsedPhoneNumber {
|
|
5
|
-
libInstance: LibPhoneNumber;
|
|
6
|
-
countryCode: ISO2CountryCode | undefined;
|
|
7
|
-
compactNumber: string;
|
|
8
|
-
e164Format: string;
|
|
9
|
-
isValid: boolean;
|
|
10
|
-
numberType: NumberType | undefined;
|
|
11
|
-
}
|
|
12
|
-
export declare class PhoneNumberService {
|
|
13
|
-
private static instance;
|
|
14
|
-
private constructor();
|
|
15
|
-
static getInstance(): PhoneNumberService;
|
|
16
|
-
/**
|
|
17
|
-
* Parses a phone number string using libphonenumber-js.
|
|
18
|
-
* @param numberToParse The raw phone number string.
|
|
19
|
-
* @param defaultCountry Optional default country code.
|
|
20
|
-
* @returns A ParsedPhoneNumber object if successful, otherwise undefined.
|
|
21
|
-
*/
|
|
22
|
-
parse(numberToParse: string, defaultCountry?: ISO2CountryCode): ParsedPhoneNumber | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Validates a previously parsed LibPhoneNumber instance.
|
|
25
|
-
* @param libInstance The LibPhoneNumber instance from libphonenumber-js.
|
|
26
|
-
* @returns True if the number is considered valid by the library.
|
|
27
|
-
*/
|
|
28
|
-
isValid(libInstance: LibPhoneNumber | undefined): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Formats a previously parsed LibPhoneNumber instance.
|
|
31
|
-
* @param libInstance The LibPhoneNumber instance from libphonenumber-js.
|
|
32
|
-
* @param formatType Our local PhoneNumberFormat enum value.
|
|
33
|
-
* @returns The formatted string, or the E.164 format as fallback.
|
|
34
|
-
*/
|
|
35
|
-
format(libInstance: LibPhoneNumber | undefined, formatType: PhoneNumberFormat): string;
|
|
36
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { ISO2CountryCode } from "@models/country/country.types.js";
|
|
2
|
-
import { MNOInfo } from "./mno/mno.types.js";
|
|
3
|
-
/**
|
|
4
|
-
* Enumeration for various phone number formats used for display and processing.
|
|
5
|
-
*/
|
|
6
|
-
export declare enum PhoneNumberFormat {
|
|
7
|
-
/**
|
|
8
|
-
* International format, typically used for display.
|
|
9
|
-
* Includes '+' and country code, may include spacing for readability.
|
|
10
|
-
* (e.g., +1 202 555 0123)
|
|
11
|
-
* Note: Exact spacing might vary based on library implementation or locale.
|
|
12
|
-
*/
|
|
13
|
-
INTERNATIONAL = "INTERNATIONAL",
|
|
14
|
-
/**
|
|
15
|
-
* National format, typically including national prefix (like '0') and local spacing.
|
|
16
|
-
* Formatting varies significantly by country.
|
|
17
|
-
* (e.g., 0712 345 678 for TZ, (213) 373-4253 for US)
|
|
18
|
-
*/
|
|
19
|
-
NATIONAL = "NATIONAL",
|
|
20
|
-
/**
|
|
21
|
-
* Compact national format (National Significant Number).
|
|
22
|
-
* Typically digits only, without country code or national prefix '0'.
|
|
23
|
-
* (e.g., 712345678 for TZ, 2133734253 for US)
|
|
24
|
-
*/
|
|
25
|
-
COMPACT = "COMPACT",
|
|
26
|
-
/**
|
|
27
|
-
* RFC3966 URI format for telephone numbers.
|
|
28
|
-
* (e.g., tel:+1-202-555-0123 or tel:+255712345678)
|
|
29
|
-
*/
|
|
30
|
-
RFC3966 = "RFC3966",
|
|
31
|
-
/**
|
|
32
|
-
* Strict E.164 format. Includes '+' and country code, followed only by digits
|
|
33
|
-
* with no spacing or formatting characters. Globally unique.
|
|
34
|
-
* (e.g., +12025550123, +255712345678)
|
|
35
|
-
*/
|
|
36
|
-
E164 = "E164",
|
|
37
|
-
/**
|
|
38
|
-
* International numeric format without the '+' prefix.
|
|
39
|
-
* Includes country code followed by the National Significant Number (NSN),
|
|
40
|
-
* digits only, with no formatting characters or separators.
|
|
41
|
-
* Commonly used in storage, logging, or systems where '+' is unnecessary or undesirable.
|
|
42
|
-
* (e.g., 12025550123, 255712345678)
|
|
43
|
-
*/
|
|
44
|
-
INTERNATIONAL_NUMERIC = "INTERNATIONAL_NUMERIC"
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Represents the type of a phone number, mimicking the classification
|
|
48
|
-
* used by the underlying libphonenumber-js library.
|
|
49
|
-
*/
|
|
50
|
-
export declare enum PhoneNumberType {
|
|
51
|
-
FIXED_LINE = "FIXED_LINE",
|
|
52
|
-
MOBILE = "MOBILE",
|
|
53
|
-
FIXED_LINE_OR_MOBILE = "FIXED_LINE_OR_MOBILE",// Indicates ambiguity between fixed line and mobile
|
|
54
|
-
TOLL_FREE = "TOLL_FREE",
|
|
55
|
-
PREMIUM_RATE = "PREMIUM_RATE",
|
|
56
|
-
SHARED_COST = "SHARED_COST",
|
|
57
|
-
VOIP = "VOIP",// Voice over IP
|
|
58
|
-
PERSONAL_NUMBER = "PERSONAL_NUMBER",
|
|
59
|
-
PAGER = "PAGER",
|
|
60
|
-
UAN = "UAN",// Universal Access Number
|
|
61
|
-
VOICEMAIL = "VOICEMAIL",
|
|
62
|
-
UNKNOWN = "UNKNOWN"
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Options for parsing phone numbers
|
|
66
|
-
*/
|
|
67
|
-
export interface PhoneNumberParseOptions {
|
|
68
|
-
/**
|
|
69
|
-
* Default country ISO code to use when parsing a non-international number,
|
|
70
|
-
* or when a dial code is shared by multiple countries.
|
|
71
|
-
*/
|
|
72
|
-
defaultCountry?: ISO2CountryCode;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Interface defining the common contract for all phone number objects
|
|
76
|
-
* within the system (e.g., used by TemboPlus).
|
|
77
|
-
*/
|
|
78
|
-
export interface PhoneNumberContract {
|
|
79
|
-
/** The phone number in E.164 format (e.g., +255712345678) */
|
|
80
|
-
readonly e164Format: string;
|
|
81
|
-
/** The national significant number (e.g., 712345678 for TZ) */
|
|
82
|
-
readonly compactNumber: string;
|
|
83
|
-
/** The ISO 3166-1 alpha-2 country code (e.g., "TZ", "KE") */
|
|
84
|
-
readonly countryCode: ISO2CountryCode;
|
|
85
|
-
/**
|
|
86
|
-
* Validates the phone number structure against rules for its country
|
|
87
|
-
* using the underlying phone number library.
|
|
88
|
-
* @returns {boolean} True if the number structure is valid for the country.
|
|
89
|
-
*/
|
|
90
|
-
validate(): boolean;
|
|
91
|
-
/**
|
|
92
|
-
* Formats the number into different standard styles using the underlying library.
|
|
93
|
-
* @param {PhoneNumberFormat} format - The desired output format.
|
|
94
|
-
* @returns {string} The formatted phone number string.
|
|
95
|
-
*/
|
|
96
|
-
getWithFormat(format: PhoneNumberFormat): string;
|
|
97
|
-
/**
|
|
98
|
-
* Gets associated mobile operator information, if available and implemented
|
|
99
|
-
* for the specific country. Returns undefined if not applicable or not found.
|
|
100
|
-
* @returns {MNOInfo | undefined} Operator details or undefined.
|
|
101
|
-
*/
|
|
102
|
-
getOperatorInfo(): MNOInfo | undefined;
|
|
103
|
-
/**
|
|
104
|
-
* Gets a human-readable label, typically the international format.
|
|
105
|
-
* @returns {string} A display label for the phone number.
|
|
106
|
-
*/
|
|
107
|
-
get label(): string;
|
|
108
|
-
/**
|
|
109
|
-
* Gets the type of the phone number (e.g., MOBILE, FIXED_LINE) as determined
|
|
110
|
-
* by the underlying phone number library.
|
|
111
|
-
* Requires library metadata that includes number types (e.g., libphonenumber-js/max).
|
|
112
|
-
* @returns {PhoneNumberType | undefined} The determined type or undefined if unknown/invalid.
|
|
113
|
-
*/
|
|
114
|
-
getNumberType(): PhoneNumberType | undefined;
|
|
115
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { CountryCode } from "@models/country/country.types.js";
|
|
2
|
-
export declare const phoneLogger: import("pino").Logger<never, boolean>;
|
|
3
|
-
export declare const PhoneNumberUtils: {
|
|
4
|
-
/**
|
|
5
|
-
* Removes all whitespace characters from the given string.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} input - The input string.
|
|
8
|
-
* @returns {string} String with whitespace removed.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* removeSpaces(" 0712 345 678 ") // "0712345678"
|
|
12
|
-
* removeSpaces(" +255 712 345 678") // "+255712345678"
|
|
13
|
-
*/
|
|
14
|
-
removeSpaces: (input: string) => string;
|
|
15
|
-
/**
|
|
16
|
-
* Strips all formatting characters used to enhance readability in phone numbers.
|
|
17
|
-
* Preserves only digits and an optional leading '+' if present.
|
|
18
|
-
*
|
|
19
|
-
* Characters removed include:
|
|
20
|
-
* - Whitespace: space, tab, non-breaking space
|
|
21
|
-
* - Hyphens, dots, slashes: `-`, `.`, `/`
|
|
22
|
-
* - Brackets: `(`, `)`
|
|
23
|
-
* - URI prefix: `tel:`
|
|
24
|
-
* - Extensions like `ext.`, `x`, or `#` and following digits
|
|
25
|
-
*
|
|
26
|
-
* @param {string} input - The phone number string to strip.
|
|
27
|
-
* @returns {string} A cleaned string with only digits and optional '+' prefix.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* stripFormattingCharacters("tel:+255 (712) 345-678") // "+255712345678"
|
|
31
|
-
* stripFormattingCharacters("0712-345-678 x99") // "0712345678"
|
|
32
|
-
* stripFormattingCharacters("(+255) 712/345.678 ext. 9") // "+255712345678"
|
|
33
|
-
* stripFormattingCharacters("712abc345678") // "712abc345678"
|
|
34
|
-
*/
|
|
35
|
-
stripFormattingCharacters: (input: string) => string;
|
|
36
|
-
/**
|
|
37
|
-
* Normalizes a phone number string by:
|
|
38
|
-
* - Removing all special characters and spaces
|
|
39
|
-
* - Preserving only digits and a leading '+'
|
|
40
|
-
* - Ensuring the result starts with a '+' wherever appropriate
|
|
41
|
-
* - Handling national numbers when default country is provided
|
|
42
|
-
* - Removing leading '0' when it's a national number prefix
|
|
43
|
-
*
|
|
44
|
-
* @param {string} input - The phone number string to normalize
|
|
45
|
-
* @param {CountryCode} [defaultCountry] - Optional default country code
|
|
46
|
-
* @returns {string} The normalized phone number string
|
|
47
|
-
* @throws {Error} If invalid country code provided
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* normalizePhoneNumber("+255 (712) 345-678") // "+255712345678"
|
|
51
|
-
* normalizePhoneNumber("0712 345 678", "TZ") // "+255712345678"
|
|
52
|
-
* normalizePhoneNumber("255712345678") // "255712345678"
|
|
53
|
-
*/
|
|
54
|
-
normalizePhoneNumber: (input: string, defaultCountry?: CountryCode) => string;
|
|
55
|
-
/**
|
|
56
|
-
* Checks if a string contains only digits or a `+` prefix followed by digits.
|
|
57
|
-
*
|
|
58
|
-
* @param {string} input - The input string.
|
|
59
|
-
* @returns {boolean} True if valid format, false otherwise.
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* isOnlyDigitsOrPlus("+255712345678") // true
|
|
63
|
-
* isOnlyDigitsOrPlus("0712345678") // true
|
|
64
|
-
* isOnlyDigitsOrPlus("+255-712-345-678") // false
|
|
65
|
-
*/
|
|
66
|
-
isOnlyDigitsOrPlus: (input: string) => boolean;
|
|
67
|
-
};
|
package/dist/reports/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./report-manager.js";
|
package/dist/services/index.d.ts
DELETED
package/dist/utils/text.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
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 MNO 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 {};
|
|
File without changes
|