@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,95 +0,0 @@
|
|
|
1
|
-
import { QueryBuilder } from "@/lib/query/index.js";
|
|
2
|
-
import { WalletQueryDTO } from "./wallet.dtos.js";
|
|
3
|
-
/**
|
|
4
|
-
* Wallet-specific query builder that extends the base QueryBuilder
|
|
5
|
-
* and handles all possible input conversions (DTOs, URL params, etc.)
|
|
6
|
-
*/
|
|
7
|
-
export declare class WalletQuery extends QueryBuilder {
|
|
8
|
-
/**
|
|
9
|
-
* Create empty wallet query with defaults
|
|
10
|
-
*/
|
|
11
|
-
static create(): WalletQuery;
|
|
12
|
-
/**
|
|
13
|
-
* Create from typed DTO/filters object
|
|
14
|
-
*/
|
|
15
|
-
static fromFilters(filters: WalletQueryDTO): WalletQuery;
|
|
16
|
-
/**
|
|
17
|
-
* Create from URL search parameters (strings)
|
|
18
|
-
*/
|
|
19
|
-
static fromUrlParams(params: Record<string, string>): WalletQuery;
|
|
20
|
-
/**
|
|
21
|
-
* Create from URLSearchParams object
|
|
22
|
-
*/
|
|
23
|
-
static fromSearchParams(searchParams: URLSearchParams): WalletQuery;
|
|
24
|
-
/**
|
|
25
|
-
* Create from Next.js Request object
|
|
26
|
-
*/
|
|
27
|
-
static fromRequest(request: Request): WalletQuery;
|
|
28
|
-
/**
|
|
29
|
-
* Create from any supported input type
|
|
30
|
-
*/
|
|
31
|
-
static from(input: QueryBuilder | WalletQueryDTO | Record<string, string> | URLSearchParams | null | undefined): WalletQuery;
|
|
32
|
-
/**
|
|
33
|
-
* Type guard for string records
|
|
34
|
-
*/
|
|
35
|
-
private static isStringRecord;
|
|
36
|
-
whereId(id: string): this;
|
|
37
|
-
whereProfileId(profileId: string): this;
|
|
38
|
-
whereAccountNo(accountNo: string): this;
|
|
39
|
-
whereAccountName(accountName: string): this;
|
|
40
|
-
whereChannel(channel: string): this;
|
|
41
|
-
whereCountryCode(countryCode: string): this;
|
|
42
|
-
whereCurrencyCode(currencyCode: string): this;
|
|
43
|
-
/**
|
|
44
|
-
* Apply all filters from WalletQueryDTO object
|
|
45
|
-
*/
|
|
46
|
-
private applyFilters;
|
|
47
|
-
/**
|
|
48
|
-
* Convert to WalletQueryDTO
|
|
49
|
-
*/
|
|
50
|
-
toFilters(): WalletQueryDTO;
|
|
51
|
-
/**
|
|
52
|
-
* Convert to URL-safe string parameters
|
|
53
|
-
*/
|
|
54
|
-
toUrlParams(): Record<string, string>;
|
|
55
|
-
/**
|
|
56
|
-
* Convert to URLSearchParams
|
|
57
|
-
*/
|
|
58
|
-
toSearchParams(): URLSearchParams;
|
|
59
|
-
/**
|
|
60
|
-
* Convert to query string
|
|
61
|
-
*/
|
|
62
|
-
toQueryString(): string;
|
|
63
|
-
/**
|
|
64
|
-
* Create new instance with wallet ID filter
|
|
65
|
-
*/
|
|
66
|
-
withId(id: string): WalletQuery;
|
|
67
|
-
/**
|
|
68
|
-
* Create new instance with profile ID filter
|
|
69
|
-
*/
|
|
70
|
-
withProfileId(profileId: string): WalletQuery;
|
|
71
|
-
/**
|
|
72
|
-
* Create new instance with account number filter
|
|
73
|
-
*/
|
|
74
|
-
withAccountNo(accountNo: string): WalletQuery;
|
|
75
|
-
/**
|
|
76
|
-
* Create new instance with country code filter
|
|
77
|
-
*/
|
|
78
|
-
withCountryCode(countryCode: string): WalletQuery;
|
|
79
|
-
/**
|
|
80
|
-
* Create new instance with currency code filter
|
|
81
|
-
*/
|
|
82
|
-
withCurrencyCode(currencyCode: string): WalletQuery;
|
|
83
|
-
/**
|
|
84
|
-
* Check if any filters are applied
|
|
85
|
-
*/
|
|
86
|
-
hasFilters(): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Get human-readable filter descriptions
|
|
89
|
-
*/
|
|
90
|
-
getActiveFilters(): string[];
|
|
91
|
-
/**
|
|
92
|
-
* Extract filter values from QueryBuilder options
|
|
93
|
-
*/
|
|
94
|
-
private extractFilterValues;
|
|
95
|
-
}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { Amount } from "@temboplus/frontend-core";
|
|
2
|
-
import { WalletStatementEntry } from "./statement-entry.model.js";
|
|
3
|
-
import { Wallet } from "./wallet.model.js";
|
|
4
|
-
import { contract } from "./wallet.contract.js";
|
|
5
|
-
import { BaseRepository } from "@/lib/api/base-repository.js";
|
|
6
|
-
import { WalletQuery } from "./wallet.query.js";
|
|
7
|
-
import { WalletQueryDTO } from "./wallet.dtos.js";
|
|
8
|
-
/**
|
|
9
|
-
* Flexible query input type - supports the class, filters interface, URL params, etc.
|
|
10
|
-
*/
|
|
11
|
-
export type WalletQueryInput = WalletQuery | WalletQueryDTO | Record<string, string> | URLSearchParams | null | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Repository class for managing wallet operations including balance checking,
|
|
14
|
-
* statement generation, and wallet information retrieval.
|
|
15
|
-
*
|
|
16
|
-
* This repository handles pure API communication without permission checking.
|
|
17
|
-
* Permission validation should be handled at the service layer or route handlers.
|
|
18
|
-
*
|
|
19
|
-
* @extends {BaseRepository<typeof contract>}
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```typescript
|
|
23
|
-
* // Direct token usage
|
|
24
|
-
* const repo = new WalletRepository({ token: userToken });
|
|
25
|
-
* const balance = await repo.getBalance({ wallet });
|
|
26
|
-
*
|
|
27
|
-
* // Service locator usage
|
|
28
|
-
* const repo = new WalletRepository();
|
|
29
|
-
* const wallets = await repo.getWallets();
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export declare class WalletRepository extends BaseRepository<typeof contract> {
|
|
33
|
-
/**
|
|
34
|
-
* Creates an instance of WalletRepository initialized with the wallet contract.
|
|
35
|
-
*
|
|
36
|
-
* @param options - Optional configuration
|
|
37
|
-
* @param options.root - Custom API root URL
|
|
38
|
-
* @param options.token - Authentication token for API calls
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```typescript
|
|
42
|
-
* const repo = new WalletRepository({
|
|
43
|
-
* token: "user-auth-token",
|
|
44
|
-
* root: "base-api-url"
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
constructor(options?: {
|
|
49
|
-
root?: string;
|
|
50
|
-
token?: string;
|
|
51
|
-
});
|
|
52
|
-
/**
|
|
53
|
-
* Retrieves the current available balance for a specific wallet.
|
|
54
|
-
*
|
|
55
|
-
* Supports two input methods:
|
|
56
|
-
* 1. Direct wallet object (preferred for performance)
|
|
57
|
-
* 2. Account number lookup (requires additional API call to fetch wallet details)
|
|
58
|
-
*
|
|
59
|
-
* @param props - The request properties (must provide either wallet or accountNo)
|
|
60
|
-
* @param props.wallet - The wallet object for which to retrieve the balance (preferred method)
|
|
61
|
-
* @param props.accountNo - Alternative: account number to lookup wallet and fetch balance
|
|
62
|
-
* @returns Promise that resolves to the available balance as an Amount object
|
|
63
|
-
* @throws {Error} If neither wallet nor accountNo is provided
|
|
64
|
-
* @throws {Error} If accountNo is provided but no matching wallet is found
|
|
65
|
-
* @throws {Error} If the balance fetch operation fails due to network or server errors
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```typescript
|
|
69
|
-
* // Method 1: Using wallet object (recommended - faster)
|
|
70
|
-
* try {
|
|
71
|
-
* const wallet = await repo.getWallets().then(w => w[0]);
|
|
72
|
-
* const balance = await repo.getBalance({ wallet });
|
|
73
|
-
* console.log(`Available balance: ${balance.label}`);
|
|
74
|
-
* } catch (error) {
|
|
75
|
-
* console.error('Failed to fetch balance:', error.message);
|
|
76
|
-
* }
|
|
77
|
-
*
|
|
78
|
-
* // Method 2: Using account number (requires wallet lookup)
|
|
79
|
-
* try {
|
|
80
|
-
* const balance = await repo.getBalance({ accountNo: '123456789' });
|
|
81
|
-
* console.log(`Available balance: ${balance.label}`);
|
|
82
|
-
* } catch (error) {
|
|
83
|
-
* console.error('Failed to fetch balance:', error.message);
|
|
84
|
-
* }
|
|
85
|
-
* ```
|
|
86
|
-
*/
|
|
87
|
-
getBalance(props: {
|
|
88
|
-
wallet?: Wallet;
|
|
89
|
-
accountNo?: string;
|
|
90
|
-
}): Promise<Amount>;
|
|
91
|
-
/**
|
|
92
|
-
* Retrieves all wallets associated with the authenticated user.
|
|
93
|
-
*
|
|
94
|
-
* Supports flexible filtering through WalletQuery or plain filter objects.
|
|
95
|
-
*
|
|
96
|
-
* @param query - Optional query parameters for filtering wallets
|
|
97
|
-
* @returns Promise that resolves to an array of validated Wallet instances
|
|
98
|
-
* @throws {Error} If the wallet fetch operation fails or data is invalid
|
|
99
|
-
*
|
|
100
|
-
* @example
|
|
101
|
-
* ```typescript
|
|
102
|
-
* // Get all wallets
|
|
103
|
-
* const allWallets = await repo.getWallets();
|
|
104
|
-
*
|
|
105
|
-
* // Get specific wallet by account number
|
|
106
|
-
* const specificWallet = await repo.getWallets({ accountNo: '123456789' });
|
|
107
|
-
*
|
|
108
|
-
* // Get wallets with multiple filters using WalletQuery
|
|
109
|
-
* const query = WalletQuery.create()
|
|
110
|
-
* .whereCountryCode('TZ')
|
|
111
|
-
* .whereCurrencyCode('TZS');
|
|
112
|
-
* const tzWallets = await repo.getWallets(query);
|
|
113
|
-
*
|
|
114
|
-
* // Get wallets with filters object
|
|
115
|
-
* const usdWallets = await repo.getWallets({ currencyCode: 'USD' });
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
getWallets(query?: WalletQueryInput): Promise<Wallet[]>;
|
|
119
|
-
/**
|
|
120
|
-
* Retrieves a single wallet by its ID.
|
|
121
|
-
*
|
|
122
|
-
* Since the API doesn't have a dedicated /id endpoint, this method queries
|
|
123
|
-
* the list endpoint with the ID filter and returns the first result.
|
|
124
|
-
*
|
|
125
|
-
* @param id - The unique identifier of the wallet to retrieve
|
|
126
|
-
* @returns Promise that resolves to the wallet if found, undefined otherwise
|
|
127
|
-
* @throws {Error} If the fetch operation fails
|
|
128
|
-
*
|
|
129
|
-
* @example
|
|
130
|
-
* ```typescript
|
|
131
|
-
* const wallet = await repo.getByID("wallet-id");
|
|
132
|
-
* if (wallet) {
|
|
133
|
-
* console.log(`Wallet: ${wallet.accountName}`);
|
|
134
|
-
* } else {
|
|
135
|
-
* console.log('Wallet not found');
|
|
136
|
-
* }
|
|
137
|
-
* ```
|
|
138
|
-
*/
|
|
139
|
-
getByID(id: string): Promise<Wallet | undefined>;
|
|
140
|
-
/**
|
|
141
|
-
* Retrieves wallet statement entries for a specified date range.
|
|
142
|
-
*
|
|
143
|
-
* Supports two input methods:
|
|
144
|
-
* 1. Direct wallet object (preferred for performance and currency context)
|
|
145
|
-
* 2. Account number lookup (requires additional API call to determine currency)
|
|
146
|
-
*
|
|
147
|
-
* If no date range is provided, defaults to the current month.
|
|
148
|
-
* Returns statement entries with enhanced narration objects containing payout detection
|
|
149
|
-
* and parsing capabilities.
|
|
150
|
-
*
|
|
151
|
-
* @param props - The statement request properties
|
|
152
|
-
* @param props.wallet - The wallet to get statement for (preferred method)
|
|
153
|
-
* @param props.accountNo - Alternative: account number to lookup wallet and fetch statement
|
|
154
|
-
* @param props.range - Optional date range (defaults to current month)
|
|
155
|
-
* @param props.range.startDate - Start date for statement period
|
|
156
|
-
* @param props.range.endDate - End date for statement period
|
|
157
|
-
* @returns Promise that resolves to an array of validated WalletStatementEntry instances with Narration objects
|
|
158
|
-
* @throws {Error} If neither wallet nor accountNo is provided
|
|
159
|
-
* @throws {Error} If accountNo is provided but no matching wallet is found
|
|
160
|
-
* @throws {Error} If the statement fetch operation fails or data is invalid
|
|
161
|
-
*
|
|
162
|
-
* @example
|
|
163
|
-
* ```typescript
|
|
164
|
-
* // Method 1: Using wallet object (recommended)
|
|
165
|
-
* const wallet = await repo.getWallets().then(w => w[0]);
|
|
166
|
-
* const currentMonthEntries = await repo.getStatement({ wallet });
|
|
167
|
-
*
|
|
168
|
-
* // Method 2: Using account number
|
|
169
|
-
* const entriesForAccount = await repo.getStatement({
|
|
170
|
-
* accountNo: '123456789'
|
|
171
|
-
* });
|
|
172
|
-
*
|
|
173
|
-
* // Custom date range with wallet
|
|
174
|
-
* const customRangeEntries = await repo.getStatement({
|
|
175
|
-
* wallet,
|
|
176
|
-
* range: {
|
|
177
|
-
* startDate: new Date('2024-01-01'),
|
|
178
|
-
* endDate: new Date('2024-01-31')
|
|
179
|
-
* }
|
|
180
|
-
* });
|
|
181
|
-
*
|
|
182
|
-
* // Process payout transactions
|
|
183
|
-
* const payoutEntries = currentMonthEntries.filter(entry => entry.isPayout);
|
|
184
|
-
* payoutEntries.forEach(entry => {
|
|
185
|
-
* console.log(`Payout ID: ${entry.payoutId}, Amount: ${entry.amountDebited.label}`);
|
|
186
|
-
* });
|
|
187
|
-
* ```
|
|
188
|
-
*/
|
|
189
|
-
getStatement(props: {
|
|
190
|
-
range?: {
|
|
191
|
-
startDate: Date;
|
|
192
|
-
endDate: Date;
|
|
193
|
-
};
|
|
194
|
-
wallet?: Wallet;
|
|
195
|
-
accountNo?: string;
|
|
196
|
-
}): Promise<WalletStatementEntry[]>;
|
|
197
|
-
/**
|
|
198
|
-
* Check if a wallet exists with the given query
|
|
199
|
-
*/
|
|
200
|
-
exists(query?: WalletQueryInput): Promise<boolean>;
|
|
201
|
-
/**
|
|
202
|
-
* Get count of wallets matching a query
|
|
203
|
-
*/
|
|
204
|
-
count(query?: WalletQueryInput): Promise<number>;
|
|
205
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CountryCode } from "@temboplus/frontend-core";
|
|
2
|
-
import { Wallet } from "./wallet.model.js";
|
|
3
|
-
export declare const WalletUtils: {
|
|
4
|
-
/**
|
|
5
|
-
* Gets unique countries from a list of wallets
|
|
6
|
-
* @param wallets Array of wallets
|
|
7
|
-
* @returns Array of unique country codes
|
|
8
|
-
*/
|
|
9
|
-
getUniqueCountries(wallets: Wallet[]): CountryCode[];
|
|
10
|
-
/**
|
|
11
|
-
* Gets wallets for a specific country
|
|
12
|
-
* @param wallets Array of wallets
|
|
13
|
-
* @param countryCode Country code to filter by
|
|
14
|
-
* @returns Array of wallets for the specified country
|
|
15
|
-
*/
|
|
16
|
-
getWalletsByCountry(wallets: Wallet[], countryCode: CountryCode): Wallet[];
|
|
17
|
-
};
|