@temboplus/afloat 0.1.77-beta.9 → 0.1.79
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 +42 -246
- package/esm/mod.d.ts +8 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +7 -0
- package/esm/package.json +3 -0
- package/{dist/lib/error/error.api.d.ts → esm/src/errors/api_error.d.ts} +1 -0
- package/esm/src/errors/api_error.d.ts.map +1 -0
- package/esm/src/errors/api_error.js +90 -0
- package/esm/src/errors/index.d.ts +3 -0
- package/esm/src/errors/index.d.ts.map +1 -0
- package/esm/src/errors/index.js +2 -0
- package/{dist/lib/error/error.permission.d.ts → esm/src/errors/permission_error.d.ts} +2 -1
- package/esm/src/errors/permission_error.d.ts.map +1 -0
- package/esm/src/errors/permission_error.js +70 -0
- package/{dist/modules/team-member/team-member.contract.d.ts → esm/src/features/admin/contract.d.ts} +158 -233
- package/esm/src/features/admin/contract.d.ts.map +1 -0
- package/esm/src/features/admin/contract.js +210 -0
- package/esm/src/features/admin/index.d.ts +4 -0
- package/esm/src/features/admin/index.d.ts.map +1 -0
- package/esm/src/features/admin/index.js +3 -0
- package/esm/src/features/admin/repository.d.ts +114 -0
- package/esm/src/features/admin/repository.d.ts.map +1 -0
- package/esm/src/features/admin/repository.js +248 -0
- package/esm/src/features/admin/schemas.d.ts +146 -0
- package/esm/src/features/admin/schemas.d.ts.map +1 -0
- package/esm/src/features/admin/schemas.js +206 -0
- package/esm/src/features/auth/access/contract.d.ts +14 -0
- package/esm/src/features/auth/access/contract.d.ts.map +1 -0
- package/esm/src/features/auth/access/contract.js +14 -0
- package/esm/src/features/auth/access/repository.d.ts +11 -0
- package/esm/src/features/auth/access/repository.d.ts.map +1 -0
- package/esm/src/features/auth/access/repository.js +25 -0
- package/{dist/modules/auth/auth.contract.d.ts → esm/src/features/auth/contract.d.ts} +19 -16
- package/esm/src/features/auth/contract.d.ts.map +1 -0
- package/esm/src/features/auth/contract.js +43 -0
- package/esm/src/features/auth/identity/contract.d.ts +23 -0
- package/esm/src/features/auth/identity/contract.d.ts.map +1 -0
- package/esm/src/features/auth/identity/contract.js +17 -0
- package/esm/src/features/auth/identity/repository.d.ts +22 -0
- package/esm/src/features/auth/identity/repository.d.ts.map +1 -0
- package/esm/src/features/auth/identity/repository.js +30 -0
- package/esm/src/features/auth/index.d.ts +6 -0
- package/esm/src/features/auth/index.d.ts.map +1 -0
- package/esm/src/features/auth/index.js +5 -0
- package/esm/src/features/auth/manager.d.ts +105 -0
- package/esm/src/features/auth/manager.d.ts.map +1 -0
- package/esm/src/features/auth/manager.js +181 -0
- package/{dist/modules/profile/profile.api-contract.d.ts → esm/src/features/auth/profile/contract.d.ts} +6 -8
- package/esm/src/features/auth/profile/contract.d.ts.map +1 -0
- package/esm/src/features/auth/profile/contract.js +14 -0
- package/esm/src/features/auth/profile/repository.d.ts +11 -0
- package/esm/src/features/auth/profile/repository.d.ts.map +1 -0
- package/esm/src/features/auth/profile/repository.js +25 -0
- package/esm/src/features/auth/repository.d.ts +30 -0
- package/esm/src/features/auth/repository.d.ts.map +1 -0
- package/esm/src/features/auth/repository.js +69 -0
- package/{dist/modules/auth/storage/client-store.d.ts → esm/src/features/auth/storage/client_store.d.ts} +2 -1
- package/esm/src/features/auth/storage/client_store.d.ts.map +1 -0
- package/esm/src/features/auth/storage/client_store.js +46 -0
- package/{dist/modules/auth/storage/client-token-handler.d.ts → esm/src/features/auth/storage/client_token_handler.d.ts} +1 -0
- package/esm/src/features/auth/storage/client_token_handler.d.ts.map +1 -0
- package/esm/src/features/auth/storage/client_token_handler.js +36 -0
- package/esm/src/features/auth/storage/server_store.d.ts +24 -0
- package/esm/src/features/auth/storage/server_store.d.ts.map +1 -0
- package/esm/src/features/auth/storage/server_store.js +34 -0
- package/esm/src/features/auth/storage/server_token_handler.d.ts +36 -0
- package/esm/src/features/auth/storage/server_token_handler.d.ts.map +1 -0
- package/esm/src/features/auth/storage/server_token_handler.js +115 -0
- package/{dist/modules → esm/src/features}/auth/storage/types.d.ts +2 -1
- package/esm/src/features/auth/storage/types.d.ts.map +1 -0
- package/esm/src/features/auth/storage/types.js +1 -0
- package/{dist/modules/contact/contact.api-contract.d.ts → esm/src/features/contact/contract.d.ts} +55 -88
- package/esm/src/features/contact/contract.d.ts.map +1 -0
- package/esm/src/features/contact/contract.js +49 -0
- package/esm/src/features/contact/index.d.ts +2 -0
- package/esm/src/features/contact/index.d.ts.map +1 -0
- package/esm/src/features/contact/index.js +1 -0
- package/esm/src/features/contact/repository.d.ts +58 -0
- package/esm/src/features/contact/repository.d.ts.map +1 -0
- package/esm/src/features/contact/repository.js +108 -0
- package/{dist/modules/payout/payout.api-contract.d.ts → esm/src/features/payout/contract.d.ts} +197 -340
- package/esm/src/features/payout/contract.d.ts.map +1 -0
- package/esm/src/features/payout/contract.js +75 -0
- package/esm/src/features/payout/index.d.ts +2 -0
- package/esm/src/features/payout/index.d.ts.map +1 -0
- package/esm/src/features/payout/index.js +1 -0
- package/esm/src/features/payout/repository.d.ts +67 -0
- package/esm/src/features/payout/repository.d.ts.map +1 -0
- package/esm/src/features/payout/repository.js +163 -0
- package/{dist/modules/wallet/wallet.contract.d.ts → esm/src/features/wallet/contract.d.ts} +11 -13
- package/esm/src/features/wallet/contract.d.ts.map +1 -0
- package/esm/src/features/wallet/contract.js +38 -0
- package/esm/src/features/wallet/index.d.ts +2 -0
- package/esm/src/features/wallet/index.d.ts.map +1 -0
- package/esm/src/features/wallet/index.js +1 -0
- package/esm/src/features/wallet/repository.d.ts +57 -0
- package/esm/src/features/wallet/repository.d.ts.map +1 -0
- package/esm/src/features/wallet/repository.js +93 -0
- package/esm/src/models/contact/derivatives/contact.d.ts +172 -0
- package/esm/src/models/contact/derivatives/contact.d.ts.map +1 -0
- package/esm/src/models/contact/derivatives/contact.js +266 -0
- package/esm/src/models/contact/derivatives/contact_info.d.ts +188 -0
- package/esm/src/models/contact/derivatives/contact_info.d.ts.map +1 -0
- package/esm/src/models/contact/derivatives/contact_info.js +255 -0
- package/esm/src/models/contact/index.d.ts +5 -0
- package/esm/src/models/contact/index.d.ts.map +1 -0
- package/esm/src/models/contact/index.js +4 -0
- package/esm/src/models/contact/schemas.d.ts +66 -0
- package/esm/src/models/contact/schemas.d.ts.map +1 -0
- package/esm/src/models/contact/schemas.js +64 -0
- package/esm/src/models/contact/validation.d.ts +37 -0
- package/esm/src/models/contact/validation.d.ts.map +1 -0
- package/esm/src/models/contact/validation.js +146 -0
- package/esm/src/models/index.d.ts +7 -0
- package/esm/src/models/index.d.ts.map +1 -0
- package/esm/src/models/index.js +6 -0
- package/esm/src/models/payout/api.d.ts +29 -0
- package/esm/src/models/payout/api.d.ts.map +1 -0
- package/esm/src/models/payout/api.js +1 -0
- package/esm/src/models/payout/channel.d.ts +58 -0
- package/esm/src/models/payout/channel.d.ts.map +1 -0
- package/esm/src/models/payout/channel.js +53 -0
- package/esm/src/models/payout/derivatives/payout.d.ts +158 -0
- package/esm/src/models/payout/derivatives/payout.d.ts.map +1 -0
- package/esm/src/models/payout/derivatives/payout.js +271 -0
- package/esm/src/models/payout/index.d.ts +7 -0
- package/esm/src/models/payout/index.d.ts.map +1 -0
- package/esm/src/models/payout/index.js +6 -0
- package/esm/src/models/payout/narration.d.ts +164 -0
- package/esm/src/models/payout/narration.d.ts.map +1 -0
- package/esm/src/models/payout/narration.js +308 -0
- package/esm/src/models/payout/schemas.d.ts +156 -0
- package/esm/src/models/payout/schemas.d.ts.map +1 -0
- package/esm/src/models/payout/schemas.js +105 -0
- package/esm/src/models/payout/status.d.ts +33 -0
- package/esm/src/models/payout/status.d.ts.map +1 -0
- package/esm/src/models/payout/status.js +34 -0
- package/{dist/modules/login/permission.type.d.ts → esm/src/models/permission.d.ts} +9 -8
- package/esm/src/models/permission.d.ts.map +1 -0
- package/esm/src/models/permission.js +50 -0
- package/esm/src/models/role.d.ts +21 -0
- package/esm/src/models/role.d.ts.map +1 -0
- package/esm/src/models/role.js +73 -0
- package/esm/src/models/user/authenticated-user.d.ts +77 -0
- package/esm/src/models/user/authenticated-user.d.ts.map +1 -0
- package/esm/src/models/user/authenticated-user.js +226 -0
- package/esm/src/models/user/index.d.ts +4 -0
- package/esm/src/models/user/index.d.ts.map +1 -0
- package/esm/src/models/user/index.js +3 -0
- package/esm/src/models/user/managed-user.d.ts +108 -0
- package/esm/src/models/user/managed-user.d.ts.map +1 -0
- package/esm/src/models/user/managed-user.js +255 -0
- package/{dist/modules/profile/profile.model.d.ts → esm/src/models/user/profile.d.ts} +52 -81
- package/esm/src/models/user/profile.d.ts.map +1 -0
- package/esm/src/models/user/profile.js +334 -0
- package/esm/src/models/wallet/index.d.ts +4 -0
- package/esm/src/models/wallet/index.d.ts.map +1 -0
- package/esm/src/models/wallet/index.js +3 -0
- package/esm/src/models/wallet/schemas.d.ts +95 -0
- package/esm/src/models/wallet/schemas.d.ts.map +1 -0
- package/esm/src/models/wallet/schemas.js +35 -0
- package/esm/src/models/wallet/statement_entry.d.ts +160 -0
- package/esm/src/models/wallet/statement_entry.d.ts.map +1 -0
- package/esm/src/models/wallet/statement_entry.js +255 -0
- package/{dist/modules/wallet/wallet.model.d.ts → esm/src/models/wallet/wallet.d.ts} +37 -31
- package/esm/src/models/wallet/wallet.d.ts.map +1 -0
- package/esm/src/models/wallet/wallet.js +279 -0
- package/esm/src/shared/base_repository.d.ts +80 -0
- package/esm/src/shared/base_repository.d.ts.map +1 -0
- package/esm/src/shared/base_repository.js +153 -0
- package/esm/src/shared/common_responses.d.ts +13 -0
- package/esm/src/shared/common_responses.d.ts.map +1 -0
- package/esm/src/shared/common_responses.js +10 -0
- package/esm/src/shared/index.d.ts +3 -0
- package/esm/src/shared/index.d.ts.map +1 -0
- package/esm/src/shared/index.js +2 -0
- package/esm/src/shared/token_required_repository.d.ts +78 -0
- package/esm/src/shared/token_required_repository.d.ts.map +1 -0
- package/esm/src/shared/token_required_repository.js +128 -0
- package/package.json +23 -49
- package/script/mod.d.ts +8 -0
- package/script/mod.d.ts.map +1 -0
- package/script/mod.js +23 -0
- package/script/npm/src/mod.d.ts +8 -0
- package/script/npm/src/mod.d.ts.map +1 -0
- package/script/npm/src/mod.js +23 -0
- package/script/npm/src/src/errors/api_error.d.ts +63 -0
- package/script/npm/src/src/errors/api_error.d.ts.map +1 -0
- package/script/npm/src/src/errors/api_error.js +94 -0
- package/script/npm/src/src/errors/index.d.ts +3 -0
- package/script/npm/src/src/errors/index.d.ts.map +1 -0
- package/script/npm/src/src/errors/index.js +18 -0
- package/script/npm/src/src/errors/permission_error.d.ts +48 -0
- package/script/npm/src/src/errors/permission_error.d.ts.map +1 -0
- package/script/npm/src/src/errors/permission_error.js +74 -0
- package/script/npm/src/src/features/admin/contract.d.ts +842 -0
- package/script/npm/src/src/features/admin/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/admin/contract.js +213 -0
- package/script/npm/src/src/features/admin/index.d.ts +4 -0
- package/script/npm/src/src/features/admin/index.d.ts.map +1 -0
- package/script/npm/src/src/features/admin/index.js +19 -0
- package/script/npm/src/src/features/admin/repository.d.ts +114 -0
- package/script/npm/src/src/features/admin/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/admin/repository.js +252 -0
- package/script/npm/src/src/features/admin/schemas.d.ts +146 -0
- package/script/npm/src/src/features/admin/schemas.d.ts.map +1 -0
- package/script/npm/src/src/features/admin/schemas.js +209 -0
- package/script/npm/src/src/features/auth/access/contract.d.ts +14 -0
- package/script/npm/src/src/features/auth/access/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/access/contract.js +17 -0
- package/script/npm/src/src/features/auth/access/repository.d.ts +11 -0
- package/script/npm/src/src/features/auth/access/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/access/repository.js +29 -0
- package/script/npm/src/src/features/auth/contract.d.ts +112 -0
- package/script/npm/src/src/features/auth/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/contract.js +46 -0
- package/script/npm/src/src/features/auth/identity/contract.d.ts +23 -0
- package/script/npm/src/src/features/auth/identity/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/identity/contract.js +20 -0
- package/script/npm/src/src/features/auth/identity/repository.d.ts +22 -0
- package/script/npm/src/src/features/auth/identity/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/identity/repository.js +34 -0
- package/script/npm/src/src/features/auth/index.d.ts +6 -0
- package/script/npm/src/src/features/auth/index.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/index.js +21 -0
- package/script/npm/src/src/features/auth/manager.d.ts +105 -0
- package/script/npm/src/src/features/auth/manager.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/manager.js +185 -0
- package/script/npm/src/src/features/auth/profile/contract.d.ts +37 -0
- package/script/npm/src/src/features/auth/profile/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/profile/contract.js +17 -0
- package/script/npm/src/src/features/auth/profile/repository.d.ts +11 -0
- package/script/npm/src/src/features/auth/profile/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/profile/repository.js +29 -0
- package/script/npm/src/src/features/auth/repository.d.ts +30 -0
- package/script/npm/src/src/features/auth/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/repository.js +73 -0
- package/script/npm/src/src/features/auth/storage/client_store.d.ts +30 -0
- package/script/npm/src/src/features/auth/storage/client_store.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/storage/client_store.js +51 -0
- package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts +32 -0
- package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/storage/client_token_handler.js +40 -0
- package/script/npm/src/src/features/auth/storage/server_store.d.ts +24 -0
- package/script/npm/src/src/features/auth/storage/server_store.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/storage/server_store.js +38 -0
- package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts +36 -0
- package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/storage/server_token_handler.js +119 -0
- package/script/npm/src/src/features/auth/storage/types.d.ts +42 -0
- package/script/npm/src/src/features/auth/storage/types.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/storage/types.js +2 -0
- package/script/npm/src/src/features/contact/contract.d.ts +170 -0
- package/script/npm/src/src/features/contact/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/contact/contract.js +52 -0
- package/script/npm/src/src/features/contact/index.d.ts +2 -0
- package/script/npm/src/src/features/contact/index.d.ts.map +1 -0
- package/script/npm/src/src/features/contact/index.js +17 -0
- package/script/npm/src/src/features/contact/repository.d.ts +58 -0
- package/script/npm/src/src/features/contact/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/contact/repository.js +112 -0
- package/script/npm/src/src/features/payout/contract.d.ts +623 -0
- package/script/npm/src/src/features/payout/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/payout/contract.js +78 -0
- package/script/npm/src/src/features/payout/index.d.ts +2 -0
- package/script/npm/src/src/features/payout/index.d.ts.map +1 -0
- package/script/npm/src/src/features/payout/index.js +17 -0
- package/script/npm/src/src/features/payout/repository.d.ts +67 -0
- package/script/npm/src/src/features/payout/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/payout/repository.js +167 -0
- package/script/npm/src/src/features/wallet/contract.d.ts +137 -0
- package/script/npm/src/src/features/wallet/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/wallet/contract.js +41 -0
- package/script/npm/src/src/features/wallet/index.d.ts +2 -0
- package/script/npm/src/src/features/wallet/index.d.ts.map +1 -0
- package/script/npm/src/src/features/wallet/index.js +17 -0
- package/script/npm/src/src/features/wallet/repository.d.ts +57 -0
- package/script/npm/src/src/features/wallet/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/wallet/repository.js +97 -0
- package/script/npm/src/src/models/contact/derivatives/contact.d.ts +172 -0
- package/script/npm/src/src/models/contact/derivatives/contact.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/derivatives/contact.js +270 -0
- package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts +188 -0
- package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/derivatives/contact_info.js +260 -0
- package/script/npm/src/src/models/contact/index.d.ts +5 -0
- package/script/npm/src/src/models/contact/index.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/index.js +20 -0
- package/script/npm/src/src/models/contact/schemas.d.ts +66 -0
- package/script/npm/src/src/models/contact/schemas.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/schemas.js +67 -0
- package/script/npm/src/src/models/contact/validation.d.ts +37 -0
- package/script/npm/src/src/models/contact/validation.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/validation.js +153 -0
- package/script/npm/src/src/models/index.d.ts +7 -0
- package/script/npm/src/src/models/index.d.ts.map +1 -0
- package/script/npm/src/src/models/index.js +22 -0
- package/script/npm/src/src/models/payout/api.d.ts +29 -0
- package/script/npm/src/src/models/payout/api.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/api.js +2 -0
- package/script/npm/src/src/models/payout/channel.d.ts +58 -0
- package/script/npm/src/src/models/payout/channel.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/channel.js +56 -0
- package/script/npm/src/src/models/payout/derivatives/payout.d.ts +158 -0
- package/script/npm/src/src/models/payout/derivatives/payout.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/derivatives/payout.js +275 -0
- package/script/npm/src/src/models/payout/index.d.ts +7 -0
- package/script/npm/src/src/models/payout/index.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/index.js +22 -0
- package/script/npm/src/src/models/payout/narration.d.ts +164 -0
- package/script/npm/src/src/models/payout/narration.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/narration.js +312 -0
- package/script/npm/src/src/models/payout/schemas.d.ts +156 -0
- package/script/npm/src/src/models/payout/schemas.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/schemas.js +108 -0
- package/script/npm/src/src/models/payout/status.d.ts +33 -0
- package/script/npm/src/src/models/payout/status.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/status.js +37 -0
- package/script/npm/src/src/models/permission.d.ts +55 -0
- package/script/npm/src/src/models/permission.d.ts.map +1 -0
- package/script/npm/src/src/models/permission.js +53 -0
- package/script/npm/src/src/models/role.d.ts +21 -0
- package/script/npm/src/src/models/role.d.ts.map +1 -0
- package/script/npm/src/src/models/role.js +77 -0
- package/script/npm/src/src/models/user/authenticated-user.d.ts +77 -0
- package/script/npm/src/src/models/user/authenticated-user.d.ts.map +1 -0
- package/script/npm/src/src/models/user/authenticated-user.js +230 -0
- package/script/npm/src/src/models/user/index.d.ts +4 -0
- package/script/npm/src/src/models/user/index.d.ts.map +1 -0
- package/script/npm/src/src/models/user/index.js +19 -0
- package/script/npm/src/src/models/user/managed-user.d.ts +108 -0
- package/script/npm/src/src/models/user/managed-user.d.ts.map +1 -0
- package/script/npm/src/src/models/user/managed-user.js +260 -0
- package/script/npm/src/src/models/user/profile.d.ts +161 -0
- package/script/npm/src/src/models/user/profile.d.ts.map +1 -0
- package/script/npm/src/src/models/user/profile.js +338 -0
- package/script/npm/src/src/models/wallet/index.d.ts +4 -0
- package/script/npm/src/src/models/wallet/index.d.ts.map +1 -0
- package/script/npm/src/src/models/wallet/index.js +19 -0
- package/script/npm/src/src/models/wallet/schemas.d.ts +95 -0
- package/script/npm/src/src/models/wallet/schemas.d.ts.map +1 -0
- package/script/npm/src/src/models/wallet/schemas.js +38 -0
- package/script/npm/src/src/models/wallet/statement_entry.d.ts +160 -0
- package/script/npm/src/src/models/wallet/statement_entry.d.ts.map +1 -0
- package/script/npm/src/src/models/wallet/statement_entry.js +259 -0
- package/script/npm/src/src/models/wallet/wallet.d.ts +147 -0
- package/script/npm/src/src/models/wallet/wallet.d.ts.map +1 -0
- package/script/npm/src/src/models/wallet/wallet.js +283 -0
- package/script/npm/src/src/shared/base_repository.d.ts +80 -0
- package/script/npm/src/src/shared/base_repository.d.ts.map +1 -0
- package/script/npm/src/src/shared/base_repository.js +157 -0
- package/script/npm/src/src/shared/common_responses.d.ts +13 -0
- package/script/npm/src/src/shared/common_responses.d.ts.map +1 -0
- package/script/npm/src/src/shared/common_responses.js +13 -0
- package/script/npm/src/src/shared/index.d.ts +3 -0
- package/script/npm/src/src/shared/index.d.ts.map +1 -0
- package/script/npm/src/src/shared/index.js +18 -0
- package/script/npm/src/src/shared/token_required_repository.d.ts +78 -0
- package/script/npm/src/src/shared/token_required_repository.d.ts.map +1 -0
- package/script/npm/src/src/shared/token_required_repository.js +132 -0
- package/script/package.json +3 -0
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.esm.js +0 -2
- package/dist/index.esm.js.map +0 -1
- package/dist/lib/api/base-repository.d.ts +0 -175
- package/dist/lib/api/index.d.ts +0 -1
- package/dist/lib/error/error.utils.d.ts +0 -22
- package/dist/lib/error/index.d.ts +0 -3
- package/dist/lib/query/index.d.ts +0 -4
- package/dist/lib/query/pagination/pagination.d.ts +0 -73
- package/dist/lib/query/pagination/pagination.schemas.d.ts +0 -83
- package/dist/lib/query/query.builder.d.ts +0 -71
- package/dist/lib/query/query.types.d.ts +0 -36
- package/dist/modules/auth/auth.manager.d.ts +0 -249
- package/dist/modules/auth/auth.repository.d.ts +0 -83
- package/dist/modules/auth/auth.store.d.ts +0 -139
- package/dist/modules/auth/company-membership.model.d.ts +0 -171
- package/dist/modules/auth/index.d.ts +0 -4
- package/dist/modules/auth/user.model.d.ts +0 -363
- package/dist/modules/contact/contact-info.model.d.ts +0 -485
- package/dist/modules/contact/contact-input-handler.d.ts +0 -16
- package/dist/modules/contact/contact.dtos.d.ts +0 -84
- package/dist/modules/contact/contact.model.d.ts +0 -441
- package/dist/modules/contact/contact.repository.d.ts +0 -116
- package/dist/modules/contact/index.d.ts +0 -4
- package/dist/modules/login/index.d.ts +0 -4
- package/dist/modules/login/login.api-contract.d.ts +0 -51
- package/dist/modules/login/login.dtos.d.ts +0 -85
- package/dist/modules/login/login.model.d.ts +0 -168
- package/dist/modules/login/login.repository.d.ts +0 -58
- package/dist/modules/payout/index.d.ts +0 -5
- package/dist/modules/payout/payout-channel-handler.d.ts +0 -82
- package/dist/modules/payout/payout.dtos.d.ts +0 -605
- package/dist/modules/payout/payout.model.d.ts +0 -379
- package/dist/modules/payout/payout.query.d.ts +0 -133
- package/dist/modules/payout/payout.repository.d.ts +0 -181
- package/dist/modules/profile/index.d.ts +0 -3
- package/dist/modules/profile/profile.dtos.d.ts +0 -80
- package/dist/modules/profile/profile.repository.d.ts +0 -56
- package/dist/modules/team-member/index.d.ts +0 -4
- package/dist/modules/team-member/role.model.d.ts +0 -61
- package/dist/modules/team-member/team-member.dtos.d.ts +0 -261
- package/dist/modules/team-member/team-member.model.d.ts +0 -237
- package/dist/modules/team-member/team-member.repository.d.ts +0 -179
- package/dist/modules/wallet/index.d.ts +0 -7
- package/dist/modules/wallet/narration.model.d.ts +0 -225
- package/dist/modules/wallet/statement-entry.model.d.ts +0 -299
- package/dist/modules/wallet/wallet-manager.session.d.ts +0 -143
- package/dist/modules/wallet/wallet.dtos.d.ts +0 -204
- package/dist/modules/wallet/wallet.query.d.ts +0 -95
- package/dist/modules/wallet/wallet.repository.d.ts +0 -205
- package/dist/modules/wallet/wallet.utils.d.ts +0 -17
|
@@ -1,485 +0,0 @@
|
|
|
1
|
-
import { ContactType, ContactDTO } from "@/modules/contact/contact.dtos.js";
|
|
2
|
-
import { PayoutDTO } from "@/modules/payout/payout.dtos.js";
|
|
3
|
-
import { Bank, ISO2CountryCode, PhoneNumber } from "@temboplus/frontend-core";
|
|
4
|
-
import type { BankSwiftCode, MNOId } from "@temboplus/frontend-core";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
export declare const MobileContactInfoJSONSchema: z.ZodObject<{
|
|
7
|
-
type: z.ZodLiteral<"Mobile">;
|
|
8
|
-
name: z.ZodString;
|
|
9
|
-
phoneNumber: z.ZodString;
|
|
10
|
-
mnoId: z.ZodString;
|
|
11
|
-
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
type: "Mobile";
|
|
14
|
-
name: string;
|
|
15
|
-
version: string;
|
|
16
|
-
phoneNumber: string;
|
|
17
|
-
mnoId: string;
|
|
18
|
-
}, {
|
|
19
|
-
type: "Mobile";
|
|
20
|
-
name: string;
|
|
21
|
-
phoneNumber: string;
|
|
22
|
-
mnoId: string;
|
|
23
|
-
version?: string | undefined;
|
|
24
|
-
}>;
|
|
25
|
-
export declare const BankContactInfoJSONSchema: z.ZodObject<{
|
|
26
|
-
type: z.ZodLiteral<"Bank">;
|
|
27
|
-
accName: z.ZodString;
|
|
28
|
-
swiftCode: z.ZodString;
|
|
29
|
-
countryCode: z.ZodString;
|
|
30
|
-
accNo: z.ZodString;
|
|
31
|
-
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
32
|
-
}, "strip", z.ZodTypeAny, {
|
|
33
|
-
type: "Bank";
|
|
34
|
-
version: string;
|
|
35
|
-
countryCode: string;
|
|
36
|
-
accName: string;
|
|
37
|
-
swiftCode: string;
|
|
38
|
-
accNo: string;
|
|
39
|
-
}, {
|
|
40
|
-
type: "Bank";
|
|
41
|
-
countryCode: string;
|
|
42
|
-
accName: string;
|
|
43
|
-
swiftCode: string;
|
|
44
|
-
accNo: string;
|
|
45
|
-
version?: string | undefined;
|
|
46
|
-
}>;
|
|
47
|
-
export declare const ContactInfoJSONSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
48
|
-
type: z.ZodLiteral<"Mobile">;
|
|
49
|
-
name: z.ZodString;
|
|
50
|
-
phoneNumber: z.ZodString;
|
|
51
|
-
mnoId: z.ZodString;
|
|
52
|
-
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
53
|
-
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
type: "Mobile";
|
|
55
|
-
name: string;
|
|
56
|
-
version: string;
|
|
57
|
-
phoneNumber: string;
|
|
58
|
-
mnoId: string;
|
|
59
|
-
}, {
|
|
60
|
-
type: "Mobile";
|
|
61
|
-
name: string;
|
|
62
|
-
phoneNumber: string;
|
|
63
|
-
mnoId: string;
|
|
64
|
-
version?: string | undefined;
|
|
65
|
-
}>, z.ZodObject<{
|
|
66
|
-
type: z.ZodLiteral<"Bank">;
|
|
67
|
-
accName: z.ZodString;
|
|
68
|
-
swiftCode: z.ZodString;
|
|
69
|
-
countryCode: z.ZodString;
|
|
70
|
-
accNo: z.ZodString;
|
|
71
|
-
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
72
|
-
}, "strip", z.ZodTypeAny, {
|
|
73
|
-
type: "Bank";
|
|
74
|
-
version: string;
|
|
75
|
-
countryCode: string;
|
|
76
|
-
accName: string;
|
|
77
|
-
swiftCode: string;
|
|
78
|
-
accNo: string;
|
|
79
|
-
}, {
|
|
80
|
-
type: "Bank";
|
|
81
|
-
countryCode: string;
|
|
82
|
-
accName: string;
|
|
83
|
-
swiftCode: string;
|
|
84
|
-
accNo: string;
|
|
85
|
-
version?: string | undefined;
|
|
86
|
-
}>]>;
|
|
87
|
-
export type MobileContactInfoJSON = z.infer<typeof MobileContactInfoJSONSchema>;
|
|
88
|
-
export type BankContactInfoJSON = z.infer<typeof BankContactInfoJSONSchema>;
|
|
89
|
-
export type ContactInfoJSON = z.infer<typeof ContactInfoJSONSchema>;
|
|
90
|
-
/**
|
|
91
|
-
* Abstract base class that provides a common interface for different types of contact information.
|
|
92
|
-
* This class defines the structure and validation requirements for both mobile and bank contacts.
|
|
93
|
-
*
|
|
94
|
-
* Serves as the foundation for type-safe contact handling throughout the application,
|
|
95
|
-
* ensuring consistent behavior between mobile money and bank transfer contacts.
|
|
96
|
-
*
|
|
97
|
-
* **Country Code Handling:**
|
|
98
|
-
* The country code is always derived from the underlying domain objects (PhoneNumber or Bank)
|
|
99
|
-
* rather than being passed as a separate parameter, ensuring consistency and single source of truth.
|
|
100
|
-
*
|
|
101
|
-
* @abstract
|
|
102
|
-
* @class BaseContactInfo
|
|
103
|
-
*
|
|
104
|
-
* @property {ContactType} type - The type of contact (either "Mobile" or "Bank")
|
|
105
|
-
* @property {ISO2CountryCode} countryCode - The ISO2 country code derived from PhoneNumber or Bank
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* ```typescript
|
|
109
|
-
* // Cannot instantiate directly - use concrete implementations
|
|
110
|
-
* const mobileContact = MobileContactInfo.from({ name: "John Doe", phoneNumber });
|
|
111
|
-
* const bankContact = BankContactInfo.from({ accName: "Jane Smith", bank, accNo: "123456789" });
|
|
112
|
-
*
|
|
113
|
-
* // Polymorphic usage
|
|
114
|
-
* function processContact(contact: BaseContactInfo) {
|
|
115
|
-
* console.log(`Processing ${contact.type} contact: ${contact.displayName}`);
|
|
116
|
-
* console.log(`Channel: ${contact.channelDisplayName}`);
|
|
117
|
-
* console.log(`Country: ${contact.countryCode}`); // Always available
|
|
118
|
-
* }
|
|
119
|
-
* ```
|
|
120
|
-
*/
|
|
121
|
-
declare abstract class BaseContactInfo {
|
|
122
|
-
readonly type: ContactType;
|
|
123
|
-
readonly countryCode: ISO2CountryCode;
|
|
124
|
-
/**
|
|
125
|
-
* Creates a new instance of BaseContactInfo.
|
|
126
|
-
* Protected constructor ensures only subclasses can instantiate.
|
|
127
|
-
*
|
|
128
|
-
* @protected
|
|
129
|
-
* @param {ContactType} type - The type of contact to create ("Mobile" or "Bank")
|
|
130
|
-
* @param {ISO2CountryCode} countryCode - The ISO2 country code derived from domain objects
|
|
131
|
-
*/
|
|
132
|
-
constructor(type: ContactType, countryCode: ISO2CountryCode);
|
|
133
|
-
/**
|
|
134
|
-
* Gets the typed channel identifier for the contact.
|
|
135
|
-
* Returns MNO ID for mobile contacts, SWIFT code for bank contacts.
|
|
136
|
-
*
|
|
137
|
-
* @abstract
|
|
138
|
-
* @returns {MNOId | BankSwiftCode} The typed channel identifier
|
|
139
|
-
*
|
|
140
|
-
* @example
|
|
141
|
-
* ```typescript
|
|
142
|
-
* const mobileChannel: MNOId = mobileContact.channelId; // "VODACOM", "SAFARICOM", etc.
|
|
143
|
-
* const bankChannel: BankSwiftCode = bankContact.channelId; // "CORUTZTZ", "KCBLKENX", etc.
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
abstract get channelId(): MNOId | BankSwiftCode;
|
|
147
|
-
/**
|
|
148
|
-
* Gets the human-readable channel name for display purposes.
|
|
149
|
-
* Returns mobile money service name for mobile contacts, bank short name for bank contacts.
|
|
150
|
-
*
|
|
151
|
-
* @abstract
|
|
152
|
-
* @returns {string} The display-friendly channel name
|
|
153
|
-
*
|
|
154
|
-
* @example
|
|
155
|
-
* ```typescript
|
|
156
|
-
* console.log(mobileContact.channelName); // "M-Pesa", "Airtel Money", etc.
|
|
157
|
-
* console.log(bankContact.channelName); // "CRDB", "KCB", etc.
|
|
158
|
-
* ```
|
|
159
|
-
*/
|
|
160
|
-
abstract get channelName(): string;
|
|
161
|
-
/**
|
|
162
|
-
* Gets the primary display name for the contact.
|
|
163
|
-
*
|
|
164
|
-
* @abstract
|
|
165
|
-
* @returns {string} The contact's display name (personal name for mobile, account name for bank)
|
|
166
|
-
*/
|
|
167
|
-
abstract get accountName(): string;
|
|
168
|
-
/**
|
|
169
|
-
* Gets the primary account/identification number for the contact.
|
|
170
|
-
*
|
|
171
|
-
* @abstract
|
|
172
|
-
* @returns {string} The contact's number (phone number for mobile, account number for bank)
|
|
173
|
-
*/
|
|
174
|
-
abstract get accountNumber(): string;
|
|
175
|
-
/**
|
|
176
|
-
* Gets the localized label for the display name field.
|
|
177
|
-
*
|
|
178
|
-
* @abstract
|
|
179
|
-
* @returns {string} The appropriate label for the display name based on contact type
|
|
180
|
-
*/
|
|
181
|
-
abstract get accountNameLabel(): string;
|
|
182
|
-
/**
|
|
183
|
-
* Gets the localized label for the account number field.
|
|
184
|
-
*
|
|
185
|
-
* @abstract
|
|
186
|
-
* @returns {string} The appropriate label for the account number based on contact type
|
|
187
|
-
*/
|
|
188
|
-
abstract get accountNumberLabel(): string;
|
|
189
|
-
/**
|
|
190
|
-
* Gets the localized label for the channel field.
|
|
191
|
-
*
|
|
192
|
-
* @abstract
|
|
193
|
-
* @returns {string} The appropriate label for the channel based on contact type
|
|
194
|
-
*/
|
|
195
|
-
abstract get channelLabel(): string;
|
|
196
|
-
/**
|
|
197
|
-
* Validates that all contact information is consistent and correct.
|
|
198
|
-
*
|
|
199
|
-
* @abstract
|
|
200
|
-
* @returns {boolean} True if the contact information is valid
|
|
201
|
-
*/
|
|
202
|
-
abstract validate(): boolean;
|
|
203
|
-
/**
|
|
204
|
-
* Serializes the ContactInfo instance to a JSON-compatible object
|
|
205
|
-
*/
|
|
206
|
-
abstract toJSON(): ContactInfoJSON;
|
|
207
|
-
/**
|
|
208
|
-
* Converts the ContactInfo instance to a JSON string.
|
|
209
|
-
*/
|
|
210
|
-
toJSONString(): string;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Implementation of BaseContactInfo for mobile phone contacts.
|
|
214
|
-
* Handles storage, validation, and display of contact details specific to mobile money services.
|
|
215
|
-
*
|
|
216
|
-
* This class properly delegates MNO-related logic to country-specific implementations,
|
|
217
|
-
* supporting both countries with Mobile Number Portability (MNP) and those without.
|
|
218
|
-
* The country code is always derived from the PhoneNumber object, ensuring consistency.
|
|
219
|
-
*
|
|
220
|
-
* **Key Features:**
|
|
221
|
-
* - Automatic MNO detection for countries without MNP (e.g., Tanzania)
|
|
222
|
-
* - Explicit MNO requirement for countries with MNP (e.g., Kenya)
|
|
223
|
-
* - Country-specific validation through MNOUtils delegation
|
|
224
|
-
* - Comprehensive error handling with structured context
|
|
225
|
-
* - Country code derived from PhoneNumber (single source of truth)
|
|
226
|
-
*
|
|
227
|
-
* **MNP Handling:**
|
|
228
|
-
* - **Tanzania (no MNP)**: MNO is always auto-detected from phone number prefix, ignoring any provided MNO
|
|
229
|
-
* - **Kenya (has MNP)**: MNO must be explicitly provided as numbers can be ported
|
|
230
|
-
*
|
|
231
|
-
* @extends BaseContactInfo
|
|
232
|
-
* @class MobileContactInfo
|
|
233
|
-
*
|
|
234
|
-
* @property {string} name - The contact's personal name
|
|
235
|
-
* @property {PhoneNumber} phoneNumber - The validated phone number object
|
|
236
|
-
* @property {MNOId} mnoId - The mobile network operator identifier (always available after construction)
|
|
237
|
-
*
|
|
238
|
-
* @example
|
|
239
|
-
* ```typescript
|
|
240
|
-
* // Preferred: Use static factory method
|
|
241
|
-
* const tzContact = MobileContactInfo.from({
|
|
242
|
-
* name: "John Doe",
|
|
243
|
-
* phoneNumber: tzPhoneNumber
|
|
244
|
-
* });
|
|
245
|
-
* console.log(tzContact?.channelName); // "M-Pesa" (Vodacom's service)
|
|
246
|
-
*
|
|
247
|
-
* // From JSON
|
|
248
|
-
* const jsonContact = MobileContactInfo.fromJSON(jsonString);
|
|
249
|
-
* ```
|
|
250
|
-
*/
|
|
251
|
-
export declare class MobileContactInfo extends BaseContactInfo {
|
|
252
|
-
readonly name: string;
|
|
253
|
-
readonly phoneNumber: PhoneNumber;
|
|
254
|
-
readonly mnoId: MNOId;
|
|
255
|
-
/**
|
|
256
|
-
* Creates a new mobile contact with comprehensive validation.
|
|
257
|
-
*
|
|
258
|
-
* **Validation Process:**
|
|
259
|
-
* 1. Validates name is non-empty
|
|
260
|
-
* 2. Validates phone number structure
|
|
261
|
-
* 3. Extracts country code from PhoneNumber object
|
|
262
|
-
* 4. Handles MNO validation based on country MNP status
|
|
263
|
-
*
|
|
264
|
-
* @deprecated Use {@link MobileContactInfo.from} static factory method instead
|
|
265
|
-
* @param {string} name - The contact's personal name (required, non-empty)
|
|
266
|
-
* @param {PhoneNumber} phoneNumber - The validated phone number object (contains country code)
|
|
267
|
-
* @param {MNOId} [mnoId] - MNO ID. Required for MNP countries (KE), ignored for non-MNP countries (TZ)
|
|
268
|
-
*
|
|
269
|
-
* @throws {ContactInfoError} When any validation fails
|
|
270
|
-
*/
|
|
271
|
-
constructor(name: string, phoneNumber: PhoneNumber, mnoId?: MNOId);
|
|
272
|
-
/**
|
|
273
|
-
* Creates a MobileContactInfo instance from data object.
|
|
274
|
-
* This is the preferred method for creating instances.
|
|
275
|
-
*
|
|
276
|
-
* @static
|
|
277
|
-
* @param {Object} data - The mobile contact data
|
|
278
|
-
* @param {string} data.name - The contact's personal name
|
|
279
|
-
* @param {PhoneNumber} data.phoneNumber - The validated phone number object
|
|
280
|
-
* @param {MNOId} [data.mnoId] - MNO ID (required for MNP countries)
|
|
281
|
-
*
|
|
282
|
-
* @returns {MobileContactInfo | undefined} New instance if successful, undefined if validation fails
|
|
283
|
-
*
|
|
284
|
-
* @example
|
|
285
|
-
* ```typescript
|
|
286
|
-
* const contact = MobileContactInfo.from({
|
|
287
|
-
* name: "John Doe",
|
|
288
|
-
* phoneNumber: tzPhone,
|
|
289
|
-
* mnoId: TZMNOId.VODACOM // Optional for TZ, required for KE
|
|
290
|
-
* });
|
|
291
|
-
* ```
|
|
292
|
-
*/
|
|
293
|
-
static from(data: {
|
|
294
|
-
name: string;
|
|
295
|
-
phoneNumber: PhoneNumber;
|
|
296
|
-
mnoId?: MNOId;
|
|
297
|
-
}): MobileContactInfo | undefined;
|
|
298
|
-
/**
|
|
299
|
-
* Creates a MobileContactInfo instance from a ContactDTO object.
|
|
300
|
-
* Handles validation and MNO extraction from the DTO's channel field.
|
|
301
|
-
*
|
|
302
|
-
* @static
|
|
303
|
-
* @param {ContactDTO} info - The contact data transfer object
|
|
304
|
-
* @returns {MobileContactInfo | undefined} New instance if successful, undefined if validation fails
|
|
305
|
-
*
|
|
306
|
-
* @example
|
|
307
|
-
* ```typescript
|
|
308
|
-
* const contactDTO = {
|
|
309
|
-
* type: "Mobile",
|
|
310
|
-
* accountNo: "+255712345678",
|
|
311
|
-
* displayName: "John Doe",
|
|
312
|
-
* channel: "VODACOM"
|
|
313
|
-
* };
|
|
314
|
-
*
|
|
315
|
-
* const contact = MobileContactInfo.fromContactDTO(contactDTO);
|
|
316
|
-
* ```
|
|
317
|
-
*/
|
|
318
|
-
static fromContactDTO(info: ContactDTO): MobileContactInfo | undefined;
|
|
319
|
-
/**
|
|
320
|
-
* Creates a MobileContactInfo instance from a PayoutDTO object.
|
|
321
|
-
* Extracts mobile contact information from payout data structure.
|
|
322
|
-
*
|
|
323
|
-
* @static
|
|
324
|
-
* @param {PayoutDTO} info - The payout data transfer object
|
|
325
|
-
* @returns {MobileContactInfo | undefined} New instance if successful, undefined if parsing fails
|
|
326
|
-
*
|
|
327
|
-
* @example
|
|
328
|
-
* ```typescript
|
|
329
|
-
* const payoutDTO = {
|
|
330
|
-
* msisdn: "+255712345678",
|
|
331
|
-
* countryCode: "TZ",
|
|
332
|
-
* payeeName: "John Doe",
|
|
333
|
-
* channel: "VODACOM"
|
|
334
|
-
* };
|
|
335
|
-
*
|
|
336
|
-
* const contact = MobileContactInfo.fromPayoutDTO(payoutDTO);
|
|
337
|
-
* ```
|
|
338
|
-
*/
|
|
339
|
-
static fromPayoutDTO(info: PayoutDTO): MobileContactInfo | undefined;
|
|
340
|
-
/**
|
|
341
|
-
* Type guard to validate if an unknown object is a valid MobileContactInfo instance.
|
|
342
|
-
*
|
|
343
|
-
* @static
|
|
344
|
-
* @param {unknown} obj - The object to validate
|
|
345
|
-
* @returns {obj is MobileContactInfo} Type predicate indicating validity
|
|
346
|
-
*
|
|
347
|
-
* @example
|
|
348
|
-
* ```typescript
|
|
349
|
-
* if (MobileContactInfo.is(unknownData)) {
|
|
350
|
-
* console.log(unknownData.name); // Type-safe access
|
|
351
|
-
* }
|
|
352
|
-
* ```
|
|
353
|
-
*/
|
|
354
|
-
static is(obj: unknown): obj is MobileContactInfo;
|
|
355
|
-
/**
|
|
356
|
-
* Validates that all contact information is consistent and correct.
|
|
357
|
-
*
|
|
358
|
-
* @returns {boolean} True if all validations pass, false otherwise
|
|
359
|
-
*/
|
|
360
|
-
validate(): boolean;
|
|
361
|
-
/**
|
|
362
|
-
* Provides detailed validation results with specific error and warning information.
|
|
363
|
-
*
|
|
364
|
-
* @returns {Object} Detailed validation results
|
|
365
|
-
*/
|
|
366
|
-
getValidationDetails(): {
|
|
367
|
-
isValid: boolean;
|
|
368
|
-
errors: string[];
|
|
369
|
-
warnings: string[];
|
|
370
|
-
};
|
|
371
|
-
get accountName(): string;
|
|
372
|
-
get accountNumber(): string;
|
|
373
|
-
get accountNameLabel(): string;
|
|
374
|
-
get accountNumberLabel(): string;
|
|
375
|
-
get channelLabel(): string;
|
|
376
|
-
get channelId(): MNOId;
|
|
377
|
-
get channelName(): string;
|
|
378
|
-
toJSON(): MobileContactInfoJSON;
|
|
379
|
-
static fromJSON(json: MobileContactInfoJSON | string): MobileContactInfo | undefined;
|
|
380
|
-
static fromJSONString(jsonString: string): MobileContactInfo | undefined;
|
|
381
|
-
static isMobileContactInfoJSON(obj: unknown): obj is MobileContactInfoJSON;
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* Implementation of BaseContactInfo for bank account contacts.
|
|
385
|
-
* Handles storage, validation, and display of contact details specific to bank transfers.
|
|
386
|
-
*
|
|
387
|
-
* @extends BaseContactInfo
|
|
388
|
-
* @class BankContactInfo
|
|
389
|
-
*
|
|
390
|
-
* @example
|
|
391
|
-
* ```typescript
|
|
392
|
-
* const bank = Bank.from("CORUTZTZ", "TZ");
|
|
393
|
-
* const contact = BankContactInfo.from({
|
|
394
|
-
* accName: "John Doe",
|
|
395
|
-
* bank,
|
|
396
|
-
* accNo: "0150123456789"
|
|
397
|
-
* });
|
|
398
|
-
* ```
|
|
399
|
-
*/
|
|
400
|
-
export declare class BankContactInfo extends BaseContactInfo {
|
|
401
|
-
readonly accName: string;
|
|
402
|
-
readonly bank: Bank;
|
|
403
|
-
readonly accNo: string;
|
|
404
|
-
/**
|
|
405
|
-
* Creates a new bank contact with comprehensive validation.
|
|
406
|
-
*
|
|
407
|
-
* @deprecated Use {@link BankContactInfo.from} static factory method instead
|
|
408
|
-
* @param {string} accName - The bank account holder's name
|
|
409
|
-
* @param {Bank} bank - The bank institution object
|
|
410
|
-
* @param {string} accNo - The bank account number
|
|
411
|
-
*
|
|
412
|
-
* @throws {ContactInfoError} When validation fails
|
|
413
|
-
*/
|
|
414
|
-
constructor(accName: string, bank: Bank, accNo: string);
|
|
415
|
-
/**
|
|
416
|
-
* Creates a BankContactInfo instance from data object.
|
|
417
|
-
* This is the preferred method for creating instances.
|
|
418
|
-
*
|
|
419
|
-
* @static
|
|
420
|
-
* @param {Object} data - The bank contact data
|
|
421
|
-
* @param {string} data.accName - The account holder's name
|
|
422
|
-
* @param {Bank} data.bank - The bank institution object
|
|
423
|
-
* @param {string} data.accNo - The bank account number
|
|
424
|
-
*
|
|
425
|
-
* @returns {BankContactInfo | undefined} New instance if successful, undefined if validation fails
|
|
426
|
-
*
|
|
427
|
-
* @example
|
|
428
|
-
* ```typescript
|
|
429
|
-
* const bank = Bank.from("CORUTZTZ", "TZ");
|
|
430
|
-
* const contact = BankContactInfo.from({
|
|
431
|
-
* accName: "John Doe",
|
|
432
|
-
* bank,
|
|
433
|
-
* accNo: "0150123456789"
|
|
434
|
-
* });
|
|
435
|
-
* ```
|
|
436
|
-
*/
|
|
437
|
-
static from(data: {
|
|
438
|
-
accName: string;
|
|
439
|
-
bank: Bank;
|
|
440
|
-
accNo: string;
|
|
441
|
-
}): BankContactInfo | undefined;
|
|
442
|
-
/**
|
|
443
|
-
* Creates a BankContactInfo instance from a ContactDTO object.
|
|
444
|
-
*
|
|
445
|
-
* @static
|
|
446
|
-
* @param {ContactDTO} info - The contact data transfer object
|
|
447
|
-
* @returns {BankContactInfo | undefined} New instance if successful, undefined if validation fails
|
|
448
|
-
*/
|
|
449
|
-
static fromContactDTO(info: ContactDTO): BankContactInfo | undefined;
|
|
450
|
-
/**
|
|
451
|
-
* Creates a BankContactInfo instance from a PayoutDTO object.
|
|
452
|
-
*
|
|
453
|
-
* @static
|
|
454
|
-
* @param {PayoutDTO} info - The payout data transfer object
|
|
455
|
-
* @returns {BankContactInfo | undefined} New instance if successful, undefined if parsing fails
|
|
456
|
-
*/
|
|
457
|
-
static fromPayoutDTO(info: PayoutDTO): BankContactInfo | undefined;
|
|
458
|
-
/**
|
|
459
|
-
* Type guard to validate if an unknown object is a valid BankContactInfo instance.
|
|
460
|
-
*
|
|
461
|
-
* @static
|
|
462
|
-
* @param {unknown} obj - The object to validate
|
|
463
|
-
* @returns {obj is BankContactInfo} Type predicate indicating validity
|
|
464
|
-
*/
|
|
465
|
-
static is(obj: unknown): obj is BankContactInfo;
|
|
466
|
-
validate(): boolean;
|
|
467
|
-
get accountName(): string;
|
|
468
|
-
get accountNumber(): string;
|
|
469
|
-
get accountNameLabel(): string;
|
|
470
|
-
get accountNumberLabel(): string;
|
|
471
|
-
get channelLabel(): string;
|
|
472
|
-
get channelId(): BankSwiftCode;
|
|
473
|
-
get channelName(): string;
|
|
474
|
-
toJSON(): BankContactInfoJSON;
|
|
475
|
-
static fromJSON(json: BankContactInfoJSON | string): BankContactInfo | undefined;
|
|
476
|
-
static fromJSONString(jsonString: string): BankContactInfo | undefined;
|
|
477
|
-
static isBankContactInfoJSON(obj: unknown): obj is BankContactInfoJSON;
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* Union type representing either a mobile or bank contact.
|
|
481
|
-
*
|
|
482
|
-
* @typedef {MobileContactInfo | BankContactInfo} ContactInfo
|
|
483
|
-
*/
|
|
484
|
-
export type ContactInfo = MobileContactInfo | BankContactInfo;
|
|
485
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ContactInfo } from "@/modules/contact/contact-info.model.js";
|
|
2
|
-
import { ContactInputDTO } from "./contact.dtos.js";
|
|
3
|
-
/**
|
|
4
|
-
* Factory for resolving and validating a raw `ContactInput` into a typed and valid version.
|
|
5
|
-
*/
|
|
6
|
-
export declare class ValidatedContactInputFactory {
|
|
7
|
-
private handlers;
|
|
8
|
-
/**
|
|
9
|
-
* Resolves a raw contact input into a valid and strongly-typed `ContactInput`.
|
|
10
|
-
*
|
|
11
|
-
* @param {ContactInputDTO} data - The unvalidated input object
|
|
12
|
-
* @returns {ContactInputDTO} - A valid and converted input ready for use
|
|
13
|
-
* @throws {Error} - If the input cannot be handled by any handler
|
|
14
|
-
*/
|
|
15
|
-
resolve(data: ContactInfo): ContactInputDTO;
|
|
16
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
* Schema for contact channel types.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* Currently supports two channel types:
|
|
7
|
-
* - "Bank": For traditional banking channels
|
|
8
|
-
* - "Mobile": For mobile money channels
|
|
9
|
-
*
|
|
10
|
-
* @see {@link ContactType} for the inferred type
|
|
11
|
-
*/
|
|
12
|
-
export declare enum ContactType {
|
|
13
|
-
Bank = "Bank",
|
|
14
|
-
Mobile = "Mobile"
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Type representing user-provided contact information.
|
|
18
|
-
* Used for creating or updating contacts.
|
|
19
|
-
*
|
|
20
|
-
* @see {@link contactInputSchema} for validation rules
|
|
21
|
-
* @see {@link ContactDTOSchemas} for all available schemas
|
|
22
|
-
*/
|
|
23
|
-
export type ContactInputDTO = z.infer<typeof ContactDTOSchemas.contactInputDTO>;
|
|
24
|
-
/**
|
|
25
|
-
* Type representing a complete contact record.
|
|
26
|
-
* Includes both user-provided and system-generated fields.
|
|
27
|
-
*
|
|
28
|
-
* @see {@link contactSchema} for validation rules
|
|
29
|
-
*/
|
|
30
|
-
export type ContactDTO = z.infer<typeof ContactDTOSchemas.contactDTO>;
|
|
31
|
-
/**
|
|
32
|
-
* Collection of all contact-related schemas.
|
|
33
|
-
*/
|
|
34
|
-
export declare const ContactDTOSchemas: {
|
|
35
|
-
/** Schema for complete contact records */
|
|
36
|
-
contactDTO: z.ZodObject<{
|
|
37
|
-
id: z.ZodString;
|
|
38
|
-
profileId: z.ZodString;
|
|
39
|
-
createdAt: z.ZodString;
|
|
40
|
-
updatedAt: z.ZodString;
|
|
41
|
-
} & {
|
|
42
|
-
displayName: z.ZodString;
|
|
43
|
-
accountNo: z.ZodString;
|
|
44
|
-
channel: z.ZodString;
|
|
45
|
-
type: z.ZodNativeEnum<typeof ContactType>;
|
|
46
|
-
}, "strip", z.ZodTypeAny, {
|
|
47
|
-
type: ContactType;
|
|
48
|
-
id: string;
|
|
49
|
-
displayName: string;
|
|
50
|
-
accountNo: string;
|
|
51
|
-
profileId: string;
|
|
52
|
-
createdAt: string;
|
|
53
|
-
updatedAt: string;
|
|
54
|
-
channel: string;
|
|
55
|
-
}, {
|
|
56
|
-
type: ContactType;
|
|
57
|
-
id: string;
|
|
58
|
-
displayName: string;
|
|
59
|
-
accountNo: string;
|
|
60
|
-
profileId: string;
|
|
61
|
-
createdAt: string;
|
|
62
|
-
updatedAt: string;
|
|
63
|
-
channel: string;
|
|
64
|
-
}>;
|
|
65
|
-
/** Schema for contact input validation */
|
|
66
|
-
contactInputDTO: z.ZodObject<{
|
|
67
|
-
displayName: z.ZodString;
|
|
68
|
-
accountNo: z.ZodString;
|
|
69
|
-
channel: z.ZodString;
|
|
70
|
-
type: z.ZodNativeEnum<typeof ContactType>;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
type: ContactType;
|
|
73
|
-
displayName: string;
|
|
74
|
-
accountNo: string;
|
|
75
|
-
channel: string;
|
|
76
|
-
}, {
|
|
77
|
-
type: ContactType;
|
|
78
|
-
displayName: string;
|
|
79
|
-
accountNo: string;
|
|
80
|
-
channel: string;
|
|
81
|
-
}>;
|
|
82
|
-
/** Schema for contact channel types */
|
|
83
|
-
contactType: z.ZodNativeEnum<typeof ContactType>;
|
|
84
|
-
};
|