@temboplus/afloat 0.1.81 → 0.2.0-beta.2
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/README.md +246 -42
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/lib/api/base-repository.d.ts +177 -0
- package/dist/lib/api/index.d.ts +1 -0
- package/{esm/src/errors/api_error.d.ts → dist/lib/error/error.api.d.ts} +0 -1
- package/{script/npm/src/src/errors/permission_error.d.ts → dist/lib/error/error.permission.d.ts} +1 -2
- package/dist/lib/error/error.utils.d.ts +22 -0
- package/dist/lib/error/index.d.ts +3 -0
- package/dist/lib/query/index.d.ts +4 -0
- package/dist/lib/query/pagination/pagination.d.ts +73 -0
- package/dist/lib/query/pagination/pagination.schemas.d.ts +83 -0
- package/dist/lib/query/query.builder.d.ts +75 -0
- package/dist/lib/query/query.types.d.ts +36 -0
- package/{esm/src/features/auth/contract.d.ts → dist/modules/auth/auth.contract.d.ts} +16 -19
- package/dist/modules/auth/auth.repository.d.ts +83 -0
- package/dist/modules/auth/company-membership.model.d.ts +171 -0
- package/dist/modules/auth/index.d.ts +3 -0
- package/dist/modules/auth/user.model.d.ts +363 -0
- package/dist/modules/beneficiary/beneficiary-info.model.d.ts +178 -0
- package/dist/modules/beneficiary/beneficiary-input-handler.d.ts +16 -0
- package/dist/modules/beneficiary/beneficiary.api-contract.d.ts +203 -0
- package/dist/modules/beneficiary/beneficiary.dtos.d.ts +84 -0
- package/dist/modules/beneficiary/beneficiary.model.d.ts +441 -0
- package/dist/modules/beneficiary/beneficiary.repository.d.ts +116 -0
- package/dist/modules/beneficiary/index.d.ts +6 -0
- package/dist/modules/login/index.d.ts +4 -0
- package/dist/modules/login/login.api-contract.d.ts +51 -0
- package/dist/modules/login/login.dtos.d.ts +85 -0
- package/dist/modules/login/login.model.d.ts +168 -0
- package/dist/modules/login/login.repository.d.ts +58 -0
- package/{esm/src/models/permission.d.ts → dist/modules/login/permission.type.d.ts} +9 -10
- package/dist/modules/payout/index.d.ts +5 -0
- package/dist/modules/payout/payout-channel-handler.d.ts +82 -0
- package/{esm/src/features/payout/contract.d.ts → dist/modules/payout/payout.api-contract.d.ts} +350 -207
- package/dist/modules/payout/payout.dtos.d.ts +607 -0
- package/dist/modules/payout/payout.model.d.ts +383 -0
- package/dist/modules/payout/payout.query.d.ts +134 -0
- package/dist/modules/payout/payout.repository.d.ts +204 -0
- package/dist/modules/profile/index.d.ts +3 -0
- package/{script/npm/src/src/features/auth/profile/contract.d.ts → dist/modules/profile/profile.api-contract.d.ts} +8 -6
- package/dist/modules/profile/profile.dtos.d.ts +80 -0
- package/{script/npm/src/src/models/user/profile.d.ts → dist/modules/profile/profile.model.d.ts} +81 -52
- package/dist/modules/profile/profile.repository.d.ts +56 -0
- package/dist/modules/team-member/index.d.ts +4 -0
- package/dist/modules/team-member/role.model.d.ts +61 -0
- package/{esm/src/features/admin/contract.d.ts → dist/modules/team-member/team-member.contract.d.ts} +229 -154
- package/dist/modules/team-member/team-member.dtos.d.ts +261 -0
- package/dist/modules/team-member/team-member.model.d.ts +237 -0
- package/dist/modules/team-member/team-member.repository.d.ts +179 -0
- package/dist/modules/wallet/index.d.ts +6 -0
- package/dist/modules/wallet/narration.model.d.ts +225 -0
- package/dist/modules/wallet/statement-entry.model.d.ts +299 -0
- package/{script/npm/src/src/features/wallet/contract.d.ts → dist/modules/wallet/wallet.contract.d.ts} +17 -15
- package/dist/modules/wallet/wallet.dtos.d.ts +204 -0
- package/{esm/src/models/wallet/wallet.d.ts → dist/modules/wallet/wallet.model.d.ts} +34 -40
- package/dist/modules/wallet/wallet.query.d.ts +95 -0
- package/dist/modules/wallet/wallet.repository.d.ts +205 -0
- package/dist/modules/wallet/wallet.utils.d.ts +17 -0
- package/package.json +49 -23
- package/LICENSE +0 -7
- package/esm/mod.d.ts +0 -8
- package/esm/mod.d.ts.map +0 -1
- package/esm/mod.js +0 -7
- package/esm/package.json +0 -3
- package/esm/src/errors/api_error.d.ts.map +0 -1
- package/esm/src/errors/api_error.js +0 -90
- package/esm/src/errors/index.d.ts +0 -3
- package/esm/src/errors/index.d.ts.map +0 -1
- package/esm/src/errors/index.js +0 -2
- package/esm/src/errors/permission_error.d.ts +0 -48
- package/esm/src/errors/permission_error.d.ts.map +0 -1
- package/esm/src/errors/permission_error.js +0 -70
- package/esm/src/features/admin/contract.d.ts.map +0 -1
- package/esm/src/features/admin/contract.js +0 -210
- package/esm/src/features/admin/index.d.ts +0 -4
- package/esm/src/features/admin/index.d.ts.map +0 -1
- package/esm/src/features/admin/index.js +0 -3
- package/esm/src/features/admin/repository.d.ts +0 -114
- package/esm/src/features/admin/repository.d.ts.map +0 -1
- package/esm/src/features/admin/repository.js +0 -248
- package/esm/src/features/admin/schemas.d.ts +0 -146
- package/esm/src/features/admin/schemas.d.ts.map +0 -1
- package/esm/src/features/admin/schemas.js +0 -206
- package/esm/src/features/auth/access/contract.d.ts +0 -14
- package/esm/src/features/auth/access/contract.d.ts.map +0 -1
- package/esm/src/features/auth/access/contract.js +0 -14
- package/esm/src/features/auth/access/repository.d.ts +0 -11
- package/esm/src/features/auth/access/repository.d.ts.map +0 -1
- package/esm/src/features/auth/access/repository.js +0 -25
- package/esm/src/features/auth/contract.d.ts.map +0 -1
- package/esm/src/features/auth/contract.js +0 -43
- package/esm/src/features/auth/identity/contract.d.ts +0 -23
- package/esm/src/features/auth/identity/contract.d.ts.map +0 -1
- package/esm/src/features/auth/identity/contract.js +0 -17
- package/esm/src/features/auth/identity/repository.d.ts +0 -22
- package/esm/src/features/auth/identity/repository.d.ts.map +0 -1
- package/esm/src/features/auth/identity/repository.js +0 -30
- package/esm/src/features/auth/index.d.ts +0 -6
- package/esm/src/features/auth/index.d.ts.map +0 -1
- package/esm/src/features/auth/index.js +0 -5
- package/esm/src/features/auth/manager.d.ts +0 -105
- package/esm/src/features/auth/manager.d.ts.map +0 -1
- package/esm/src/features/auth/manager.js +0 -181
- package/esm/src/features/auth/profile/contract.d.ts +0 -37
- package/esm/src/features/auth/profile/contract.d.ts.map +0 -1
- package/esm/src/features/auth/profile/contract.js +0 -14
- package/esm/src/features/auth/profile/repository.d.ts +0 -11
- package/esm/src/features/auth/profile/repository.d.ts.map +0 -1
- package/esm/src/features/auth/profile/repository.js +0 -25
- package/esm/src/features/auth/repository.d.ts +0 -30
- package/esm/src/features/auth/repository.d.ts.map +0 -1
- package/esm/src/features/auth/repository.js +0 -69
- package/esm/src/features/auth/storage/client_store.d.ts +0 -30
- package/esm/src/features/auth/storage/client_store.d.ts.map +0 -1
- package/esm/src/features/auth/storage/client_store.js +0 -46
- package/esm/src/features/auth/storage/client_token_handler.d.ts +0 -32
- package/esm/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
- package/esm/src/features/auth/storage/client_token_handler.js +0 -36
- package/esm/src/features/auth/storage/server_store.d.ts +0 -24
- package/esm/src/features/auth/storage/server_store.d.ts.map +0 -1
- package/esm/src/features/auth/storage/server_store.js +0 -34
- package/esm/src/features/auth/storage/server_token_handler.d.ts +0 -36
- package/esm/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
- package/esm/src/features/auth/storage/server_token_handler.js +0 -115
- package/esm/src/features/auth/storage/types.d.ts +0 -42
- package/esm/src/features/auth/storage/types.d.ts.map +0 -1
- package/esm/src/features/auth/storage/types.js +0 -1
- package/esm/src/features/contact/contract.d.ts +0 -170
- package/esm/src/features/contact/contract.d.ts.map +0 -1
- package/esm/src/features/contact/contract.js +0 -49
- package/esm/src/features/contact/index.d.ts +0 -2
- package/esm/src/features/contact/index.d.ts.map +0 -1
- package/esm/src/features/contact/index.js +0 -1
- package/esm/src/features/contact/repository.d.ts +0 -58
- package/esm/src/features/contact/repository.d.ts.map +0 -1
- package/esm/src/features/contact/repository.js +0 -108
- package/esm/src/features/payout/contract.d.ts.map +0 -1
- package/esm/src/features/payout/contract.js +0 -75
- package/esm/src/features/payout/index.d.ts +0 -2
- package/esm/src/features/payout/index.d.ts.map +0 -1
- package/esm/src/features/payout/index.js +0 -1
- package/esm/src/features/payout/repository.d.ts +0 -67
- package/esm/src/features/payout/repository.d.ts.map +0 -1
- package/esm/src/features/payout/repository.js +0 -179
- package/esm/src/features/wallet/contract.d.ts +0 -137
- package/esm/src/features/wallet/contract.d.ts.map +0 -1
- package/esm/src/features/wallet/contract.js +0 -38
- package/esm/src/features/wallet/index.d.ts +0 -2
- package/esm/src/features/wallet/index.d.ts.map +0 -1
- package/esm/src/features/wallet/index.js +0 -1
- package/esm/src/features/wallet/repository.d.ts +0 -57
- package/esm/src/features/wallet/repository.d.ts.map +0 -1
- package/esm/src/features/wallet/repository.js +0 -93
- package/esm/src/models/contact/derivatives/contact.d.ts +0 -172
- package/esm/src/models/contact/derivatives/contact.d.ts.map +0 -1
- package/esm/src/models/contact/derivatives/contact.js +0 -266
- package/esm/src/models/contact/derivatives/contact_info.d.ts +0 -188
- package/esm/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
- package/esm/src/models/contact/derivatives/contact_info.js +0 -255
- package/esm/src/models/contact/index.d.ts +0 -5
- package/esm/src/models/contact/index.d.ts.map +0 -1
- package/esm/src/models/contact/index.js +0 -4
- package/esm/src/models/contact/schemas.d.ts +0 -66
- package/esm/src/models/contact/schemas.d.ts.map +0 -1
- package/esm/src/models/contact/schemas.js +0 -64
- package/esm/src/models/contact/validation.d.ts +0 -37
- package/esm/src/models/contact/validation.d.ts.map +0 -1
- package/esm/src/models/contact/validation.js +0 -146
- package/esm/src/models/index.d.ts +0 -7
- package/esm/src/models/index.d.ts.map +0 -1
- package/esm/src/models/index.js +0 -6
- package/esm/src/models/payout/api.d.ts +0 -29
- package/esm/src/models/payout/api.d.ts.map +0 -1
- package/esm/src/models/payout/api.js +0 -1
- package/esm/src/models/payout/channel.d.ts +0 -58
- package/esm/src/models/payout/channel.d.ts.map +0 -1
- package/esm/src/models/payout/channel.js +0 -53
- package/esm/src/models/payout/derivatives/payout.d.ts +0 -158
- package/esm/src/models/payout/derivatives/payout.d.ts.map +0 -1
- package/esm/src/models/payout/derivatives/payout.js +0 -271
- package/esm/src/models/payout/index.d.ts +0 -7
- package/esm/src/models/payout/index.d.ts.map +0 -1
- package/esm/src/models/payout/index.js +0 -6
- package/esm/src/models/payout/narration.d.ts +0 -164
- package/esm/src/models/payout/narration.d.ts.map +0 -1
- package/esm/src/models/payout/narration.js +0 -308
- package/esm/src/models/payout/schemas.d.ts +0 -156
- package/esm/src/models/payout/schemas.d.ts.map +0 -1
- package/esm/src/models/payout/schemas.js +0 -105
- package/esm/src/models/payout/status.d.ts +0 -33
- package/esm/src/models/payout/status.d.ts.map +0 -1
- package/esm/src/models/payout/status.js +0 -34
- package/esm/src/models/permission.d.ts.map +0 -1
- package/esm/src/models/permission.js +0 -50
- package/esm/src/models/role.d.ts +0 -21
- package/esm/src/models/role.d.ts.map +0 -1
- package/esm/src/models/role.js +0 -73
- package/esm/src/models/user/authenticated-user.d.ts +0 -77
- package/esm/src/models/user/authenticated-user.d.ts.map +0 -1
- package/esm/src/models/user/authenticated-user.js +0 -226
- package/esm/src/models/user/index.d.ts +0 -4
- package/esm/src/models/user/index.d.ts.map +0 -1
- package/esm/src/models/user/index.js +0 -3
- package/esm/src/models/user/managed-user.d.ts +0 -108
- package/esm/src/models/user/managed-user.d.ts.map +0 -1
- package/esm/src/models/user/managed-user.js +0 -255
- package/esm/src/models/user/profile.d.ts +0 -161
- package/esm/src/models/user/profile.d.ts.map +0 -1
- package/esm/src/models/user/profile.js +0 -334
- package/esm/src/models/wallet/index.d.ts +0 -4
- package/esm/src/models/wallet/index.d.ts.map +0 -1
- package/esm/src/models/wallet/index.js +0 -3
- package/esm/src/models/wallet/schemas.d.ts +0 -95
- package/esm/src/models/wallet/schemas.d.ts.map +0 -1
- package/esm/src/models/wallet/schemas.js +0 -35
- package/esm/src/models/wallet/statement_entry.d.ts +0 -160
- package/esm/src/models/wallet/statement_entry.d.ts.map +0 -1
- package/esm/src/models/wallet/statement_entry.js +0 -255
- package/esm/src/models/wallet/wallet.d.ts.map +0 -1
- package/esm/src/models/wallet/wallet.js +0 -279
- package/esm/src/shared/base_repository.d.ts +0 -80
- package/esm/src/shared/base_repository.d.ts.map +0 -1
- package/esm/src/shared/base_repository.js +0 -153
- package/esm/src/shared/common_responses.d.ts +0 -13
- package/esm/src/shared/common_responses.d.ts.map +0 -1
- package/esm/src/shared/common_responses.js +0 -10
- package/esm/src/shared/index.d.ts +0 -3
- package/esm/src/shared/index.d.ts.map +0 -1
- package/esm/src/shared/index.js +0 -2
- package/esm/src/shared/token_required_repository.d.ts +0 -78
- package/esm/src/shared/token_required_repository.d.ts.map +0 -1
- package/esm/src/shared/token_required_repository.js +0 -128
- package/script/mod.d.ts +0 -8
- package/script/mod.d.ts.map +0 -1
- package/script/mod.js +0 -23
- package/script/npm/src/mod.d.ts +0 -8
- package/script/npm/src/mod.d.ts.map +0 -1
- package/script/npm/src/mod.js +0 -23
- package/script/npm/src/src/errors/api_error.d.ts +0 -63
- package/script/npm/src/src/errors/api_error.d.ts.map +0 -1
- package/script/npm/src/src/errors/api_error.js +0 -94
- package/script/npm/src/src/errors/index.d.ts +0 -3
- package/script/npm/src/src/errors/index.d.ts.map +0 -1
- package/script/npm/src/src/errors/index.js +0 -18
- package/script/npm/src/src/errors/permission_error.d.ts.map +0 -1
- package/script/npm/src/src/errors/permission_error.js +0 -74
- package/script/npm/src/src/features/admin/contract.d.ts +0 -842
- package/script/npm/src/src/features/admin/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/admin/contract.js +0 -213
- package/script/npm/src/src/features/admin/index.d.ts +0 -4
- package/script/npm/src/src/features/admin/index.d.ts.map +0 -1
- package/script/npm/src/src/features/admin/index.js +0 -19
- package/script/npm/src/src/features/admin/repository.d.ts +0 -114
- package/script/npm/src/src/features/admin/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/admin/repository.js +0 -252
- package/script/npm/src/src/features/admin/schemas.d.ts +0 -146
- package/script/npm/src/src/features/admin/schemas.d.ts.map +0 -1
- package/script/npm/src/src/features/admin/schemas.js +0 -209
- package/script/npm/src/src/features/auth/access/contract.d.ts +0 -14
- package/script/npm/src/src/features/auth/access/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/access/contract.js +0 -17
- package/script/npm/src/src/features/auth/access/repository.d.ts +0 -11
- package/script/npm/src/src/features/auth/access/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/access/repository.js +0 -29
- package/script/npm/src/src/features/auth/contract.d.ts +0 -112
- package/script/npm/src/src/features/auth/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/contract.js +0 -46
- package/script/npm/src/src/features/auth/identity/contract.d.ts +0 -23
- package/script/npm/src/src/features/auth/identity/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/identity/contract.js +0 -20
- package/script/npm/src/src/features/auth/identity/repository.d.ts +0 -22
- package/script/npm/src/src/features/auth/identity/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/identity/repository.js +0 -34
- package/script/npm/src/src/features/auth/index.d.ts +0 -6
- package/script/npm/src/src/features/auth/index.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/index.js +0 -21
- package/script/npm/src/src/features/auth/manager.d.ts +0 -105
- package/script/npm/src/src/features/auth/manager.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/manager.js +0 -185
- package/script/npm/src/src/features/auth/profile/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/profile/contract.js +0 -17
- package/script/npm/src/src/features/auth/profile/repository.d.ts +0 -11
- package/script/npm/src/src/features/auth/profile/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/profile/repository.js +0 -29
- package/script/npm/src/src/features/auth/repository.d.ts +0 -30
- package/script/npm/src/src/features/auth/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/repository.js +0 -73
- package/script/npm/src/src/features/auth/storage/client_store.d.ts +0 -30
- package/script/npm/src/src/features/auth/storage/client_store.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/storage/client_store.js +0 -51
- package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts +0 -32
- package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/storage/client_token_handler.js +0 -40
- package/script/npm/src/src/features/auth/storage/server_store.d.ts +0 -24
- package/script/npm/src/src/features/auth/storage/server_store.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/storage/server_store.js +0 -38
- package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts +0 -36
- package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/storage/server_token_handler.js +0 -119
- package/script/npm/src/src/features/auth/storage/types.d.ts +0 -42
- package/script/npm/src/src/features/auth/storage/types.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/storage/types.js +0 -2
- package/script/npm/src/src/features/contact/contract.d.ts +0 -170
- package/script/npm/src/src/features/contact/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/contact/contract.js +0 -52
- package/script/npm/src/src/features/contact/index.d.ts +0 -2
- package/script/npm/src/src/features/contact/index.d.ts.map +0 -1
- package/script/npm/src/src/features/contact/index.js +0 -17
- package/script/npm/src/src/features/contact/repository.d.ts +0 -58
- package/script/npm/src/src/features/contact/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/contact/repository.js +0 -112
- package/script/npm/src/src/features/payout/contract.d.ts +0 -623
- package/script/npm/src/src/features/payout/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/payout/contract.js +0 -78
- package/script/npm/src/src/features/payout/index.d.ts +0 -2
- package/script/npm/src/src/features/payout/index.d.ts.map +0 -1
- package/script/npm/src/src/features/payout/index.js +0 -17
- package/script/npm/src/src/features/payout/repository.d.ts +0 -67
- package/script/npm/src/src/features/payout/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/payout/repository.js +0 -183
- package/script/npm/src/src/features/wallet/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/wallet/contract.js +0 -41
- package/script/npm/src/src/features/wallet/index.d.ts +0 -2
- package/script/npm/src/src/features/wallet/index.d.ts.map +0 -1
- package/script/npm/src/src/features/wallet/index.js +0 -17
- package/script/npm/src/src/features/wallet/repository.d.ts +0 -57
- package/script/npm/src/src/features/wallet/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/wallet/repository.js +0 -97
- package/script/npm/src/src/models/contact/derivatives/contact.d.ts +0 -172
- package/script/npm/src/src/models/contact/derivatives/contact.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact.js +0 -270
- package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts +0 -188
- package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact_info.js +0 -260
- package/script/npm/src/src/models/contact/index.d.ts +0 -5
- package/script/npm/src/src/models/contact/index.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/index.js +0 -20
- package/script/npm/src/src/models/contact/schemas.d.ts +0 -66
- package/script/npm/src/src/models/contact/schemas.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/schemas.js +0 -67
- package/script/npm/src/src/models/contact/validation.d.ts +0 -37
- package/script/npm/src/src/models/contact/validation.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/validation.js +0 -153
- package/script/npm/src/src/models/index.d.ts +0 -7
- package/script/npm/src/src/models/index.d.ts.map +0 -1
- package/script/npm/src/src/models/index.js +0 -22
- package/script/npm/src/src/models/payout/api.d.ts +0 -29
- package/script/npm/src/src/models/payout/api.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/api.js +0 -2
- package/script/npm/src/src/models/payout/channel.d.ts +0 -58
- package/script/npm/src/src/models/payout/channel.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/channel.js +0 -56
- package/script/npm/src/src/models/payout/derivatives/payout.d.ts +0 -158
- package/script/npm/src/src/models/payout/derivatives/payout.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/derivatives/payout.js +0 -275
- package/script/npm/src/src/models/payout/index.d.ts +0 -7
- package/script/npm/src/src/models/payout/index.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/index.js +0 -22
- package/script/npm/src/src/models/payout/narration.d.ts +0 -164
- package/script/npm/src/src/models/payout/narration.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/narration.js +0 -312
- package/script/npm/src/src/models/payout/schemas.d.ts +0 -156
- package/script/npm/src/src/models/payout/schemas.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/schemas.js +0 -108
- package/script/npm/src/src/models/payout/status.d.ts +0 -33
- package/script/npm/src/src/models/payout/status.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/status.js +0 -37
- package/script/npm/src/src/models/permission.d.ts +0 -55
- package/script/npm/src/src/models/permission.d.ts.map +0 -1
- package/script/npm/src/src/models/permission.js +0 -53
- package/script/npm/src/src/models/role.d.ts +0 -21
- package/script/npm/src/src/models/role.d.ts.map +0 -1
- package/script/npm/src/src/models/role.js +0 -77
- package/script/npm/src/src/models/user/authenticated-user.d.ts +0 -77
- package/script/npm/src/src/models/user/authenticated-user.d.ts.map +0 -1
- package/script/npm/src/src/models/user/authenticated-user.js +0 -230
- package/script/npm/src/src/models/user/index.d.ts +0 -4
- package/script/npm/src/src/models/user/index.d.ts.map +0 -1
- package/script/npm/src/src/models/user/index.js +0 -19
- package/script/npm/src/src/models/user/managed-user.d.ts +0 -108
- package/script/npm/src/src/models/user/managed-user.d.ts.map +0 -1
- package/script/npm/src/src/models/user/managed-user.js +0 -260
- package/script/npm/src/src/models/user/profile.d.ts.map +0 -1
- package/script/npm/src/src/models/user/profile.js +0 -338
- package/script/npm/src/src/models/wallet/index.d.ts +0 -4
- package/script/npm/src/src/models/wallet/index.d.ts.map +0 -1
- package/script/npm/src/src/models/wallet/index.js +0 -19
- package/script/npm/src/src/models/wallet/schemas.d.ts +0 -95
- package/script/npm/src/src/models/wallet/schemas.d.ts.map +0 -1
- package/script/npm/src/src/models/wallet/schemas.js +0 -38
- package/script/npm/src/src/models/wallet/statement_entry.d.ts +0 -160
- package/script/npm/src/src/models/wallet/statement_entry.d.ts.map +0 -1
- package/script/npm/src/src/models/wallet/statement_entry.js +0 -259
- package/script/npm/src/src/models/wallet/wallet.d.ts +0 -147
- package/script/npm/src/src/models/wallet/wallet.d.ts.map +0 -1
- package/script/npm/src/src/models/wallet/wallet.js +0 -283
- package/script/npm/src/src/shared/base_repository.d.ts +0 -80
- package/script/npm/src/src/shared/base_repository.d.ts.map +0 -1
- package/script/npm/src/src/shared/base_repository.js +0 -157
- package/script/npm/src/src/shared/common_responses.d.ts +0 -13
- package/script/npm/src/src/shared/common_responses.d.ts.map +0 -1
- package/script/npm/src/src/shared/common_responses.js +0 -13
- package/script/npm/src/src/shared/index.d.ts +0 -3
- package/script/npm/src/src/shared/index.d.ts.map +0 -1
- package/script/npm/src/src/shared/index.js +0 -18
- package/script/npm/src/src/shared/token_required_repository.d.ts +0 -78
- package/script/npm/src/src/shared/token_required_repository.d.ts.map +0 -1
- package/script/npm/src/src/shared/token_required_repository.js +0 -132
- package/script/package.json +0 -3
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { LogInDTO } from "./login.dtos.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* Zod schema for LogIn JSON serialization
|
|
5
|
+
* This schema validates the JSON representation of a LogIn instance
|
|
6
|
+
*/
|
|
7
|
+
export declare const LogInJSONSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
profileId: z.ZodString;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
identity: z.ZodString;
|
|
12
|
+
type: z.ZodString;
|
|
13
|
+
roleId: z.ZodString;
|
|
14
|
+
isActive: z.ZodBoolean;
|
|
15
|
+
isArchived: z.ZodBoolean;
|
|
16
|
+
resetPassword: z.ZodBoolean;
|
|
17
|
+
createdAt: z.ZodString;
|
|
18
|
+
updatedAt: z.ZodString;
|
|
19
|
+
access: z.ZodArray<z.ZodString, "many">;
|
|
20
|
+
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
type: string;
|
|
23
|
+
name: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
id: string;
|
|
26
|
+
version: string;
|
|
27
|
+
profileId: string;
|
|
28
|
+
identity: string;
|
|
29
|
+
roleId: string;
|
|
30
|
+
isActive: boolean;
|
|
31
|
+
isArchived: boolean;
|
|
32
|
+
resetPassword: boolean;
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
access: string[];
|
|
35
|
+
}, {
|
|
36
|
+
type: string;
|
|
37
|
+
name: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
id: string;
|
|
40
|
+
profileId: string;
|
|
41
|
+
identity: string;
|
|
42
|
+
roleId: string;
|
|
43
|
+
isActive: boolean;
|
|
44
|
+
isArchived: boolean;
|
|
45
|
+
resetPassword: boolean;
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
access: string[];
|
|
48
|
+
version?: string | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Infer the LogInJSON type from the schema
|
|
52
|
+
*/
|
|
53
|
+
export type LogInJSON = z.infer<typeof LogInJSONSchema>;
|
|
54
|
+
/**
|
|
55
|
+
* Represents the authenticated user's identity and account information.
|
|
56
|
+
*
|
|
57
|
+
* This class encapsulates the complete user account data returned from /login/me:
|
|
58
|
+
* - Basic identity: name, email (identity)
|
|
59
|
+
* - Account metadata: id, profileId, type, roleId
|
|
60
|
+
* - Account status: isActive, isArchived, resetPassword
|
|
61
|
+
* - Permissions: access array
|
|
62
|
+
* - Audit trail: createdAt, updatedAt
|
|
63
|
+
*/
|
|
64
|
+
export declare class LogIn {
|
|
65
|
+
private readonly _id;
|
|
66
|
+
private readonly _profileId;
|
|
67
|
+
private readonly _name;
|
|
68
|
+
private readonly _identity;
|
|
69
|
+
private readonly _type;
|
|
70
|
+
private readonly _roleId;
|
|
71
|
+
private readonly _isActive;
|
|
72
|
+
private readonly _isArchived;
|
|
73
|
+
private readonly _resetPassword;
|
|
74
|
+
private readonly _createdAt;
|
|
75
|
+
private readonly _updatedAt;
|
|
76
|
+
private readonly _access;
|
|
77
|
+
private constructor();
|
|
78
|
+
/**
|
|
79
|
+
* Creates a LogIn instance from a validated DTO.
|
|
80
|
+
*
|
|
81
|
+
* @param dto - The login data transfer object from /login/me endpoint
|
|
82
|
+
* @returns A new LogIn instance
|
|
83
|
+
* @throws {ZodError} If the DTO fails validation
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const logIn = LogIn.from({
|
|
88
|
+
* id: "n4mpb2HqHUlg",
|
|
89
|
+
* profileId: "M63ZW3q5Mg0n",
|
|
90
|
+
* name: "Admin",
|
|
91
|
+
* identity: "admin@test.temboplus.com",
|
|
92
|
+
* type: "password",
|
|
93
|
+
* roleId: "4jS7pR8E9K6W",
|
|
94
|
+
* isActive: true,
|
|
95
|
+
* isArchived: false,
|
|
96
|
+
* resetPassword: false,
|
|
97
|
+
* createdAt: "2024-04-25T11:13:00.000Z",
|
|
98
|
+
* updatedAt: "2024-04-25T11:13:00.000Z",
|
|
99
|
+
* access: ["profile.getCurrent", "profile.update", ...]
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
static from(dto: LogInDTO): LogIn;
|
|
104
|
+
/**
|
|
105
|
+
* Gets the user's unique identifier.
|
|
106
|
+
*/
|
|
107
|
+
get id(): string;
|
|
108
|
+
/**
|
|
109
|
+
* Gets the profile ID this user belongs to.
|
|
110
|
+
*/
|
|
111
|
+
get profileId(): string;
|
|
112
|
+
/**
|
|
113
|
+
* Gets the user's name.
|
|
114
|
+
*/
|
|
115
|
+
get name(): string;
|
|
116
|
+
/**
|
|
117
|
+
* Gets the user's identity (email address).
|
|
118
|
+
*/
|
|
119
|
+
get identity(): string;
|
|
120
|
+
/**
|
|
121
|
+
* Gets the user's authentication type (e.g., "password").
|
|
122
|
+
*/
|
|
123
|
+
get type(): string;
|
|
124
|
+
/**
|
|
125
|
+
* Gets the user's role ID.
|
|
126
|
+
*/
|
|
127
|
+
get roleId(): string;
|
|
128
|
+
/**
|
|
129
|
+
* Gets whether the account is active.
|
|
130
|
+
*/
|
|
131
|
+
get isActive(): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Gets whether the account is archived.
|
|
134
|
+
*/
|
|
135
|
+
get isArchived(): boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Gets whether the user must reset their password.
|
|
138
|
+
*/
|
|
139
|
+
get resetPassword(): boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Gets the account creation date.
|
|
142
|
+
*/
|
|
143
|
+
get createdAt(): Date;
|
|
144
|
+
/**
|
|
145
|
+
* Gets the last update date.
|
|
146
|
+
*/
|
|
147
|
+
get updatedAt(): Date;
|
|
148
|
+
/**
|
|
149
|
+
* Gets the user's permissions/access list.
|
|
150
|
+
*/
|
|
151
|
+
get access(): ReadonlyArray<string>;
|
|
152
|
+
/**
|
|
153
|
+
* Serializes the LogIn instance to a JSON-compatible object
|
|
154
|
+
*/
|
|
155
|
+
toJSON(): LogInJSON;
|
|
156
|
+
/**
|
|
157
|
+
* Serializes the LogIn instance to a JSON string
|
|
158
|
+
*/
|
|
159
|
+
toJSONString(): string;
|
|
160
|
+
/**
|
|
161
|
+
* Creates a LogIn instance from a JSON-compatible object or string
|
|
162
|
+
*/
|
|
163
|
+
static fromJSON(json: LogInJSON | string): LogIn | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* Type guard using Zod schema validation
|
|
166
|
+
*/
|
|
167
|
+
static isLogInJSON(obj: unknown): obj is LogInJSON;
|
|
168
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { identityContract } from "./login.api-contract.js";
|
|
2
|
+
import type { ClientInferResponseBody } from "@ts-rest/core";
|
|
3
|
+
import { BaseRepository } from "@/lib/api/base-repository.js";
|
|
4
|
+
type GetUserIdentityResponse = ClientInferResponseBody<typeof identityContract.getUserCredentials>;
|
|
5
|
+
/**
|
|
6
|
+
* Repository class for retrieving user identity-related information.
|
|
7
|
+
* Handles fetching user credentials and identity data from the API.
|
|
8
|
+
*
|
|
9
|
+
* This repository handles pure API communication without permission checking.
|
|
10
|
+
* Permission validation should be handled at the service layer or route handlers.
|
|
11
|
+
*
|
|
12
|
+
* @extends {BaseRepository<typeof identityContract>}
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const repo = new IdentityRepository({ token: userToken });
|
|
17
|
+
* const identity = await repo.getIdentity();
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class IdentityRepository extends BaseRepository<typeof identityContract> {
|
|
21
|
+
/**
|
|
22
|
+
* Creates an instance of IdentityRepository.
|
|
23
|
+
*
|
|
24
|
+
* @param options - Optional configuration
|
|
25
|
+
* @param options.token - Authentication token for API calls
|
|
26
|
+
* @param options.root - Custom API root URL
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const repo = new IdentityRepository({
|
|
31
|
+
* token: "user-auth-token",
|
|
32
|
+
* root: "base-api-url"
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
constructor(options?: {
|
|
37
|
+
token?: string;
|
|
38
|
+
root?: string;
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves the current user's login credentials and identity information.
|
|
42
|
+
*
|
|
43
|
+
* @returns Promise that resolves to the user's login credentials
|
|
44
|
+
* @throws {APIError} If the request fails or returns an unexpected status
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* try {
|
|
49
|
+
* const identity = await repo.getIdentity();
|
|
50
|
+
* console.log("User identity:", identity);
|
|
51
|
+
* } catch (error) {
|
|
52
|
+
* console.error("Failed to get user identity:", error.message);
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
getIdentity(): Promise<GetUserIdentityResponse>;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -6,7 +6,7 @@ export declare const Permissions: {
|
|
|
6
6
|
readonly ViewCurrent: "profile.getCurrent";
|
|
7
7
|
readonly Update: "profile.update";
|
|
8
8
|
};
|
|
9
|
-
readonly
|
|
9
|
+
readonly Beneficiary: {
|
|
10
10
|
readonly View: "contact.findById";
|
|
11
11
|
readonly List: "contact.findAll";
|
|
12
12
|
readonly Create: "contact.create";
|
|
@@ -38,18 +38,17 @@ export declare const Permissions: {
|
|
|
38
38
|
readonly ViewRoles: "role.findAll";
|
|
39
39
|
readonly ViewRole: "role.findById";
|
|
40
40
|
};
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
41
|
+
readonly TeamManagement: {
|
|
42
|
+
readonly ViewMembers: "login.findAll";
|
|
43
|
+
readonly ViewMember: "login.findById";
|
|
44
|
+
readonly CreateMember: "login.create";
|
|
45
|
+
readonly UpdateMember: "login.update";
|
|
46
|
+
readonly ArchiveMember: "login.archive";
|
|
47
|
+
readonly UnArchiveMember: "login.unarchive";
|
|
48
48
|
readonly ResetPassword: "login.resetPassword";
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
52
52
|
* Permission Type
|
|
53
53
|
*/
|
|
54
|
-
export type Permission = typeof Permissions.Profile[keyof typeof Permissions.Profile] | typeof Permissions.
|
|
55
|
-
//# sourceMappingURL=permission.d.ts.map
|
|
54
|
+
export type Permission = (typeof Permissions.Profile)[keyof typeof Permissions.Profile] | (typeof Permissions.Beneficiary)[keyof typeof Permissions.Beneficiary] | (typeof Permissions.Payment)[keyof typeof Permissions.Payment] | (typeof Permissions.Payout)[keyof typeof Permissions.Payout] | (typeof Permissions.Transfer)[keyof typeof Permissions.Transfer] | (typeof Permissions.TeamManagement)[keyof typeof Permissions.TeamManagement] | (typeof Permissions.Role)[keyof typeof Permissions.Role] | (typeof Permissions.Wallet)[keyof typeof Permissions.Wallet];
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Wallet } from "@/modules/wallet/wallet.model.js";
|
|
2
|
+
import { Amount, MNOId, PhoneNumber } from "@temboplus/frontend-core";
|
|
3
|
+
import { PayoutChannel, PayoutInputDTO } from "./payout.dtos.js";
|
|
4
|
+
import { BankBeneficiaryInfo, BeneficiaryInfo } from "../beneficiary/beneficiary-info.model.js";
|
|
5
|
+
/**
|
|
6
|
+
* Valid payout channel codes that can be used in the system
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* - `${countryCode}-BANK-B2C`: Code for bank transfers
|
|
10
|
+
* - `${countryCode}-${telecom}-B2C`: Pattern for mobile money transfers where the telecom company is the provider code
|
|
11
|
+
*
|
|
12
|
+
* @see {@link PayoutChannelCodeFactory} for functions to generate valid codes
|
|
13
|
+
*/
|
|
14
|
+
export type PayoutChannelCode = `${string}-BANK-B2C` | `${string}-${string}-B2C`;
|
|
15
|
+
/**
|
|
16
|
+
* Factory for creating standardized payout channel codes
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* // Create bank channel code
|
|
21
|
+
* const bankCode = PayoutChannelCodeFactory.forBank(bankContactInfo); // Returns "TZ-BANK-B2C"
|
|
22
|
+
*
|
|
23
|
+
* // Create mobile channel code
|
|
24
|
+
* const mobileCode = PayoutChannelCodeFactory.forMobile(phoneNumber); // Returns "TZ-VODACOM-B2C" for Vodacom number
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare class PayoutChannelCodeFactory {
|
|
28
|
+
/**
|
|
29
|
+
* Creates a bank transfer channel code
|
|
30
|
+
* @param contactInfo - Bank contact information
|
|
31
|
+
* @throws {Error} If country is not supported
|
|
32
|
+
*/
|
|
33
|
+
static forBank(contactInfo: BankBeneficiaryInfo, wallet: Wallet): PayoutChannelCode;
|
|
34
|
+
/**
|
|
35
|
+
* Creates a mobile money channel code based on the telecom provider
|
|
36
|
+
* @param phoneNumber - Phone number object containing telecom information
|
|
37
|
+
* @returns {PayoutChannelCode} Channel code in format "TZ-{TELECOM}-B2C"
|
|
38
|
+
* @throws {Error} If phone number is invalid or country is not supported
|
|
39
|
+
*
|
|
40
|
+
* @see {@link PhoneNumber} from "@temboplus/frontend-core" for phone number structure
|
|
41
|
+
*/
|
|
42
|
+
static forMobile(phoneNumber: PhoneNumber, mnoId: MNOId, wallet: Wallet): PayoutChannelCode;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Factory class for creating payout input DTOs based on channel and contact information
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const factory = new PayoutInputFactory();
|
|
50
|
+
* const payoutInput = factory.getPayoutInput({
|
|
51
|
+
* channel: PayoutChannel.MOBILE,
|
|
52
|
+
* receiver: mobileContactInfo,
|
|
53
|
+
* amount: new Amount(1000),
|
|
54
|
+
* notes: "Payment for services"
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare class PayoutInputFactory {
|
|
59
|
+
private readonly handlers;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a payout input DTO based on the provided parameters
|
|
62
|
+
*
|
|
63
|
+
* @param args - Configuration object containing channel, receiver, amount, and optional notes
|
|
64
|
+
* @returns {PayoutInputDTO} The configured payout input data transfer object
|
|
65
|
+
* @throws {Error} If no suitable handler is found for the specified channel and contact type
|
|
66
|
+
*/
|
|
67
|
+
getPayoutInput(args: {
|
|
68
|
+
channel: PayoutChannel;
|
|
69
|
+
receiver: BeneficiaryInfo;
|
|
70
|
+
amount: Amount;
|
|
71
|
+
notes?: string;
|
|
72
|
+
}, wallet: Wallet): PayoutInputDTO;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated Use PayoutChannelCodeFactory instead
|
|
76
|
+
* @see {@link PayoutChannelCodeFactory}
|
|
77
|
+
*/
|
|
78
|
+
export declare const createPayoutChannelCode: {
|
|
79
|
+
bank: typeof PayoutChannelCodeFactory.forBank;
|
|
80
|
+
mobile: typeof PayoutChannelCodeFactory.forMobile;
|
|
81
|
+
};
|
|
82
|
+
export {};
|