@temboplus/afloat 0.1.61 → 0.1.63
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/{esm/src/features/admin/contract.d.ts → dist/features/admin/admin.contract.d.ts} +41 -77
- package/{script/npm/src/src/features/admin/schemas.d.ts → dist/features/admin/admin.dtos.d.ts} +8 -9
- package/dist/features/admin/admin.repository.d.ts +179 -0
- package/dist/features/admin/index.d.ts +2 -0
- package/{esm/src/features/auth/access/contract.d.ts → dist/features/auth/access/access.api-contract.d.ts} +0 -1
- package/dist/features/auth/access/access.repository.d.ts +55 -0
- package/{esm/src/features/auth/contract.d.ts → dist/features/auth/auth.contract.d.ts} +12 -8
- package/dist/features/auth/auth.manager.d.ts +249 -0
- package/dist/features/auth/auth.repository.d.ts +66 -0
- package/dist/features/auth/auth.store.d.ts +139 -0
- package/{script/npm/src/src/features/auth/identity/contract.d.ts → dist/features/auth/identity/identity.api-contract.d.ts} +0 -1
- package/dist/features/auth/identity/identity.repository.d.ts +58 -0
- package/dist/features/auth/index.d.ts +5 -0
- package/{script/npm/src/src/features/auth/profile/contract.d.ts → dist/features/auth/profile/profile.api-contract.d.ts} +8 -6
- package/dist/features/auth/profile/profile.dtos.d.ts +80 -0
- package/dist/features/auth/profile/profile.repository.d.ts +56 -0
- package/{script/npm/src/src/features/auth/storage/client_store.d.ts → dist/features/auth/storage/client-store.d.ts} +2 -3
- package/{esm/src/features/auth/storage/client_token_handler.d.ts → dist/features/auth/storage/client-token-handler.d.ts} +1 -2
- package/{script/npm/src/src → dist}/features/auth/storage/types.d.ts +1 -2
- package/dist/features/contact/contact-input-handler.d.ts +16 -0
- package/{esm/src/features/contact/contract.d.ts → dist/features/contact/contact.api-contract.d.ts} +101 -45
- package/dist/features/contact/contact.dtos.d.ts +90 -0
- package/dist/features/contact/contact.repository.d.ts +116 -0
- package/dist/features/contact/index.d.ts +2 -0
- package/dist/features/payout/index.d.ts +3 -0
- package/dist/features/payout/payout-channel-handler.d.ts +108 -0
- package/{esm/src/features/payout/contract.d.ts → dist/features/payout/payout.api-contract.d.ts} +351 -187
- package/dist/features/payout/payout.dtos.d.ts +365 -0
- package/dist/features/payout/payout.repository.d.ts +193 -0
- package/dist/features/wallet/index.d.ts +4 -0
- package/dist/features/wallet/wallet-manager.session.d.ts +143 -0
- package/{script/npm/src/src/features/wallet/contract.d.ts → dist/features/wallet/wallet.contract.d.ts} +9 -7
- package/dist/features/wallet/wallet.dtos.d.ts +204 -0
- package/dist/features/wallet/wallet.repository.d.ts +173 -0
- package/dist/features/wallet/wallet.utils.d.ts +17 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/{esm/src/shared/base_repository.d.ts → dist/lib/api/base-repository.d.ts} +137 -42
- package/{script/npm/src/src/shared/common_responses.d.ts → dist/lib/api/common-responses.d.ts} +0 -1
- package/dist/lib/api/index.d.ts +2 -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/models/contact-info.model.d.ts +817 -0
- package/{script/npm/src/src/models/contact/derivatives/contact.d.ts → dist/models/contact.model.d.ts} +23 -16
- package/dist/models/index.d.ts +11 -0
- package/{esm/src/models/user/managed-user.d.ts → dist/models/managed-user.model.d.ts} +3 -3
- package/dist/models/narration.model.d.ts +184 -0
- package/{script/npm/src/src/models/payout/derivatives/payout.d.ts → dist/models/payout.model.d.ts} +14 -16
- package/{esm/src → dist}/models/permission.d.ts +1 -2
- package/{script/npm/src/src/models/user/profile.d.ts → dist/models/profile.model.d.ts} +37 -43
- package/{script/npm/src/src/models/role.d.ts → dist/models/role.model.d.ts} +2 -10
- package/dist/models/statement-entry.model.d.ts +248 -0
- package/dist/models/user.model.d.ts +65 -0
- package/{script/npm/src/src/models/wallet/wallet.d.ts → dist/models/wallet.model.d.ts} +3 -46
- package/package.json +47 -24
- 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.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.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.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 -163
- 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 -265
- 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.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 +0 -147
- 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.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.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.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.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.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 -167
- 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.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.map +0 -1
- package/script/npm/src/src/models/payout/derivatives/payout.js +0 -269
- 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.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.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.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
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type ContactInfo } from "./
|
|
1
|
+
import { type ContactDTO, ContactType } from "../features/contact/contact.dtos";
|
|
2
|
+
import { type ContactInfo } from "./contact-info.model";
|
|
3
|
+
import { Country, ISO2CountryCode } from "@temboplus/frontend-core";
|
|
3
4
|
/**
|
|
4
5
|
* Contact class that wraps the Zod schema and provides additional functionality
|
|
5
6
|
*/
|
|
@@ -46,14 +47,6 @@ export declare class Contact {
|
|
|
46
47
|
* For bank contacts, constructs from SWIFT code and account number
|
|
47
48
|
*/
|
|
48
49
|
get info(): ContactInfo | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* Payment channel for the contact
|
|
51
|
-
*
|
|
52
|
-
* @returns {string} Channel information:
|
|
53
|
-
* - For valid contacts, returns formatted channel from ContactInfo
|
|
54
|
-
* - For invalid contacts, falls back to account number
|
|
55
|
-
*/
|
|
56
|
-
get channel(): string;
|
|
57
50
|
/**
|
|
58
51
|
* Account number for the contact
|
|
59
52
|
*
|
|
@@ -94,21 +87,36 @@ export declare class Contact {
|
|
|
94
87
|
* - "Display Name" as fallback
|
|
95
88
|
*/
|
|
96
89
|
get accNameLabel(): string;
|
|
90
|
+
/**
|
|
91
|
+
* Country code associated with this contact
|
|
92
|
+
*
|
|
93
|
+
* @returns {string} Two-letter ISO country code
|
|
94
|
+
* @throws an error if the country code is not a valid ISO-2 country code
|
|
95
|
+
*/
|
|
96
|
+
get countryCode(): ISO2CountryCode;
|
|
97
|
+
get channelName(): string;
|
|
98
|
+
/**
|
|
99
|
+
* Country object associated with this contact
|
|
100
|
+
*
|
|
101
|
+
* @returns {Country} Country instance representing the contact's country
|
|
102
|
+
* @throws
|
|
103
|
+
*/
|
|
104
|
+
get country(): Country;
|
|
97
105
|
/**
|
|
98
106
|
* Creates a Contact instance from raw data
|
|
99
107
|
* @throws {ZodError} if validation fails
|
|
100
108
|
*/
|
|
101
|
-
static create(data:
|
|
109
|
+
static create(data: ContactDTO): Contact;
|
|
102
110
|
/**
|
|
103
111
|
* Creates multiple Contact instances from an array of raw data
|
|
104
112
|
* @throws {ZodError} if validation fails for any item
|
|
105
113
|
*/
|
|
106
|
-
static createMany(dataArray:
|
|
114
|
+
static createMany(dataArray: ContactDTO[]): Contact[];
|
|
107
115
|
/**
|
|
108
116
|
* Creates a Contact instance from raw data without throwing
|
|
109
117
|
* @returns {Contact | null} Contact instance or null if validation fails
|
|
110
118
|
*/
|
|
111
|
-
static createSafe(data:
|
|
119
|
+
static createSafe(data: ContactDTO): Contact | null;
|
|
112
120
|
/**
|
|
113
121
|
* Checks if an unknown value contains valid data to construct a Contact instance.
|
|
114
122
|
* This is useful when validating raw data structures before instantiation.
|
|
@@ -129,7 +137,7 @@ export declare class Contact {
|
|
|
129
137
|
* @throws {never} This method never throws errors
|
|
130
138
|
*
|
|
131
139
|
* @remarks
|
|
132
|
-
* This method performs strict validation against the {@link
|
|
140
|
+
* This method performs strict validation against the {@link ContactDTO} schema.
|
|
133
141
|
*/
|
|
134
142
|
static canConstruct(obj: unknown): obj is Contact;
|
|
135
143
|
/**
|
|
@@ -167,6 +175,5 @@ export declare class Contact {
|
|
|
167
175
|
/**
|
|
168
176
|
* Converts Payout instance to a plain object
|
|
169
177
|
*/
|
|
170
|
-
toJSON():
|
|
178
|
+
toJSON(): ContactDTO;
|
|
171
179
|
}
|
|
172
|
-
//# sourceMappingURL=contact.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./contact-info.model";
|
|
2
|
+
export * from "./contact.model";
|
|
3
|
+
export * from "./payout.model";
|
|
4
|
+
export * from "./profile.model";
|
|
5
|
+
export * from "./user.model";
|
|
6
|
+
export * from "./wallet.model";
|
|
7
|
+
export * from "./statement-entry.model";
|
|
8
|
+
export * from "./permission";
|
|
9
|
+
export * from "./managed-user.model";
|
|
10
|
+
export * from "./role.model";
|
|
11
|
+
export * from "./narration.model";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RoleDTO } from "@/features/admin/admin.dtos";
|
|
2
|
+
import { Role } from "./role.model";
|
|
2
3
|
export interface UserEntityData {
|
|
3
4
|
id: string;
|
|
4
5
|
name: string;
|
|
@@ -50,7 +51,7 @@ export interface ManagedUserData {
|
|
|
50
51
|
resetPassword: boolean;
|
|
51
52
|
isActive: boolean;
|
|
52
53
|
isArchived: boolean;
|
|
53
|
-
role?:
|
|
54
|
+
role?: RoleDTO;
|
|
54
55
|
createdAt: string;
|
|
55
56
|
updatedAt: string;
|
|
56
57
|
}
|
|
@@ -105,4 +106,3 @@ export declare class ManagedUser extends UserEntity {
|
|
|
105
106
|
static createMany(dataArray: any[]): ManagedUser[];
|
|
106
107
|
toJSON(): any;
|
|
107
108
|
}
|
|
108
|
-
//# sourceMappingURL=managed-user.d.ts.map
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { BankContactInfo, ContactInfo, MobileContactInfo } from "./contact-info.model";
|
|
2
|
+
/** Prefix for Ecobank mobile transfer narrations */
|
|
3
|
+
export declare const ECOBANK_PREFIX = "MOBILE TRANSFER ";
|
|
4
|
+
/** V2 format prefix for payout narrations using payout IDs */
|
|
5
|
+
export declare const NARR_V2_PREFIX: string;
|
|
6
|
+
/** V1 format prefix for bank payout narrations */
|
|
7
|
+
export declare const BANK_NARR_PREFIX: string;
|
|
8
|
+
/** Legacy format prefix for bank payout narrations */
|
|
9
|
+
export declare const LEGACY_BANK_NARR_PREFIX: string;
|
|
10
|
+
/** V1 format prefix for mobile money payout narrations */
|
|
11
|
+
export declare const MOBILE_NARR_PREFIX: string;
|
|
12
|
+
/** Legacy format prefix for mobile money payout narrations */
|
|
13
|
+
export declare const LEGACY_MOBILE_NARR_PREFIX: string;
|
|
14
|
+
/**
|
|
15
|
+
* Interface for the JSON representation of Narration
|
|
16
|
+
*/
|
|
17
|
+
export interface NarrationJson {
|
|
18
|
+
text: string;
|
|
19
|
+
version?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Handles payout narration generation and parsing for the Afloat platform.
|
|
23
|
+
*
|
|
24
|
+
* This class provides functionality to:
|
|
25
|
+
* - Generate standardized payout narrations using transaction IDs (V2 format)
|
|
26
|
+
* - Parse legacy narrations to extract contact information (deprecated)
|
|
27
|
+
* - Format narration text for different display contexts
|
|
28
|
+
* - Handle V2 (payout ID), V1, and legacy narration formats for backward compatibility
|
|
29
|
+
* - Serialize/deserialize to/from JSON format
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* // Generate V2 narration using payout ID (recommended)
|
|
34
|
+
* const narration = Narration.generateDefaultPayoutNarration("AF-2024-001234");
|
|
35
|
+
* // Result: "TEMBO-DISB #AF-2024-001234"
|
|
36
|
+
*
|
|
37
|
+
* // Create from existing text and serialize
|
|
38
|
+
* const existingNarration = new Narration("TEMBO-DISB #AF-2024-001234");
|
|
39
|
+
* const json = existingNarration.toJson();
|
|
40
|
+
* const restored = Narration.fromJson(json);
|
|
41
|
+
*
|
|
42
|
+
* // Extract payout ID from V2 narration
|
|
43
|
+
* const payoutId = existingNarration.getPayoutId(); // Returns: "AF-2024-001234"
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare class Narration {
|
|
47
|
+
/** The raw narration text */
|
|
48
|
+
text: string;
|
|
49
|
+
/**
|
|
50
|
+
* Creates a new Narration instance.
|
|
51
|
+
*
|
|
52
|
+
* @param text - The narration text to wrap
|
|
53
|
+
*/
|
|
54
|
+
constructor(text: string);
|
|
55
|
+
/**
|
|
56
|
+
* Generates the default payout narration using the payout ID (V2 format).
|
|
57
|
+
* This is the standard method for creating payout narrations in the Afloat platform.
|
|
58
|
+
* Format: "TEMBO-DISB #{PAYOUT_ID}"
|
|
59
|
+
*
|
|
60
|
+
* Note: Only the prefix is uppercased, the payout ID preserves its original case.
|
|
61
|
+
*
|
|
62
|
+
* @param payoutId - Unique payout identifier (case will be preserved)
|
|
63
|
+
* @returns Formatted payout narration with uppercased prefix and original-case ID
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```typescript
|
|
67
|
+
* const narration = Narration.generateDefaultPayoutNarration("AF-2024-001234");
|
|
68
|
+
* // Returns: "TEMBO-DISB #AF-2024-001234"
|
|
69
|
+
*
|
|
70
|
+
* const narration = Narration.generateDefaultPayoutNarration("tx-a1b2c3d4");
|
|
71
|
+
* // Returns: "TEMBO-DISB #tx-a1b2c3d4"
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
static generateDefaultPayoutNarration(payoutId: string): string;
|
|
75
|
+
/**
|
|
76
|
+
* Extracts the payout ID from a V2 format narration.
|
|
77
|
+
* Only works for V2 format narrations that use the "TEMBO-DISB #{PAYOUT_ID}" structure.
|
|
78
|
+
* Returns undefined for V1 and legacy formats.
|
|
79
|
+
*
|
|
80
|
+
* @returns The payout ID if the narration is V2 format, undefined otherwise
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* // V2 format (works)
|
|
85
|
+
* const v2Narration = new Narration("TEMBO-DISB #AF-2024-001234");
|
|
86
|
+
* const payoutId = v2Narration.getPayoutId(); // Returns: "AF-2024-001234"
|
|
87
|
+
*
|
|
88
|
+
* // V1 format (does not work - returns undefined)
|
|
89
|
+
* const v1Narration = new Narration("PAYOUT TO BANK CRDB 1234567890 Jane Smith");
|
|
90
|
+
* const payoutId = v1Narration.getPayoutId(); // Returns: undefined
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
getPayoutId(): string | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Contact extraction from narrations is deprecated and should only be used for legacy/V1 format support.
|
|
96
|
+
* V2 narrations use payout IDs and do not contain contact information.
|
|
97
|
+
*
|
|
98
|
+
* Extracts contact information from legacy narration text.
|
|
99
|
+
* Only works for V1 and legacy formats - V2 format uses payout IDs instead.
|
|
100
|
+
*
|
|
101
|
+
* @returns Parsed ContactInfo (BankContactInfo or MobileContactInfo) if successful, undefined otherwise
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* // V1 format (works)
|
|
106
|
+
* const v1Narration = new Narration("PAYOUT TO BANK CRDB 1234567890 Jane Smith");
|
|
107
|
+
* const v1Contact = v1Narration.getContactDetails();
|
|
108
|
+
*
|
|
109
|
+
* // V2 format (does not work - returns undefined)
|
|
110
|
+
* const v2Narration = new Narration("TEMBO-DISB #AF-2024-001234");
|
|
111
|
+
* const v2Contact = v2Narration.getContactDetails(); // Returns undefined
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
getContactDetails: () => ContactInfo | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* @deprecated Contact extraction from narrations is deprecated and should only be used for legacy/V1 format support.
|
|
117
|
+
* V2 narrations use payout IDs and do not contain contact information.
|
|
118
|
+
*
|
|
119
|
+
* Extracts bank contact information from legacy narration text.
|
|
120
|
+
* Only works for V1 and legacy formats. V2 format uses payout IDs and will return undefined.
|
|
121
|
+
*
|
|
122
|
+
* V1 format: "PAYOUT TO BANK {bank_name} {account_number} {account_name}"
|
|
123
|
+
* Legacy format: "TO_BANK => {json_object}"
|
|
124
|
+
*
|
|
125
|
+
* @returns BankContactInfo if parsing is successful, undefined otherwise
|
|
126
|
+
*/
|
|
127
|
+
getBankContactDetails: () => BankContactInfo | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* Serializes the Narration instance to a JSON-compatible object.
|
|
130
|
+
*
|
|
131
|
+
* @returns {NarrationJson} A plain object containing the narration data
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```typescript
|
|
135
|
+
* const narration = new Narration("TEMBO-DISB #AF-2024-001234");
|
|
136
|
+
* const json = narration.toJson();
|
|
137
|
+
* // Returns: { text: "TEMBO-DISB #AF-2024-001234", version: "2.0" }
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
toJson(): NarrationJson;
|
|
141
|
+
/**
|
|
142
|
+
* Creates a Narration instance from a JSON-compatible object.
|
|
143
|
+
*
|
|
144
|
+
* @param {NarrationJson | string} json - Either a NarrationJson object or a JSON string
|
|
145
|
+
* @returns {Narration | undefined} A Narration instance if valid, undefined otherwise
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* // From object
|
|
150
|
+
* const narration = Narration.fromJson({ text: "TEMBO-DISB #AF-2024-001234" });
|
|
151
|
+
*
|
|
152
|
+
* // From JSON string
|
|
153
|
+
* const narration = Narration.fromJson('{"text":"TEMBO-DISB #AF-2024-001234"}');
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
static fromJson(json: NarrationJson | string): Narration | undefined;
|
|
157
|
+
/**
|
|
158
|
+
* Type guard to check if an object is a valid NarrationJson
|
|
159
|
+
*
|
|
160
|
+
* @param obj - The object to validate
|
|
161
|
+
* @returns True if the object conforms to NarrationJson structure
|
|
162
|
+
*/
|
|
163
|
+
static isNarrationJson(obj: unknown): obj is NarrationJson;
|
|
164
|
+
/**
|
|
165
|
+
* Type guard to check if an unknown object is a valid Narration instance.
|
|
166
|
+
*
|
|
167
|
+
* @param obj - The object to check
|
|
168
|
+
* @returns Type predicate indicating if the object is a Narration instance
|
|
169
|
+
*/
|
|
170
|
+
static is(obj: unknown): obj is Narration;
|
|
171
|
+
/**
|
|
172
|
+
* @deprecated Contact extraction from narrations is deprecated and should only be used for legacy/V1 format support.
|
|
173
|
+
* V2 narrations use payout IDs and do not contain contact information.
|
|
174
|
+
*
|
|
175
|
+
* Extracts mobile contact information from legacy narration text.
|
|
176
|
+
* Only works for V1 and legacy formats. V2 format uses payout IDs and will return undefined.
|
|
177
|
+
*
|
|
178
|
+
* V1 format: "PAYOUT TO MOBILE {phone_number} {name}"
|
|
179
|
+
* Legacy format: "TO_MOMO => {json_object}"
|
|
180
|
+
*
|
|
181
|
+
* @returns MobileContactInfo if parsing is successful, undefined otherwise
|
|
182
|
+
*/
|
|
183
|
+
getMobileContactDetails: () => MobileContactInfo | undefined;
|
|
184
|
+
}
|
package/{script/npm/src/src/models/payout/derivatives/payout.d.ts → dist/models/payout.model.d.ts}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Amount } from "@temboplus/frontend-core";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { type PAYOUT_APPROVAL_STATUS, PAYOUT_STATUS } from "../status.js";
|
|
2
|
+
import { PayoutApprovalStatus, PayoutAuthorizer, PayoutDTO, PayoutStatus } from "../features/payout/payout.dtos";
|
|
3
|
+
import { ContactInfo } from "./contact-info.model";
|
|
5
4
|
/**
|
|
6
5
|
* Payout class that wraps the Zod schema and provides additional functionality
|
|
7
6
|
*/
|
|
@@ -29,7 +28,7 @@ export declare class Payout {
|
|
|
29
28
|
/** Description of the payout purpose */
|
|
30
29
|
get description(): string;
|
|
31
30
|
/** Optional additional notes about the payout */
|
|
32
|
-
get notes(): string | undefined;
|
|
31
|
+
get notes(): string | undefined | null;
|
|
33
32
|
/**
|
|
34
33
|
* Current status of the payout
|
|
35
34
|
* Derived from both approval status and transaction status:
|
|
@@ -42,23 +41,23 @@ export declare class Payout {
|
|
|
42
41
|
* @returns {PAYOUT_STATUS} Current status of the payout
|
|
43
42
|
* @see {@link PAYOUT_STATUS} for all possible status values
|
|
44
43
|
*/
|
|
45
|
-
get status():
|
|
44
|
+
get status(): PayoutStatus;
|
|
46
45
|
/** Status message providing details about current state */
|
|
47
46
|
get statusMessage(): string;
|
|
48
47
|
/** Optional reference ID from payment partner */
|
|
49
|
-
get partnerReference(): string | undefined;
|
|
48
|
+
get partnerReference(): string | undefined | null;
|
|
50
49
|
/** Timestamp when payout was created */
|
|
51
50
|
get createdAt(): Date;
|
|
52
51
|
/** Timestamp when payout was last updated */
|
|
53
52
|
get updatedAt(): Date;
|
|
54
53
|
/** Timestamp when payout was last updated */
|
|
55
|
-
get actionedAt(): Date | undefined;
|
|
54
|
+
get actionedAt(): Date | undefined | null;
|
|
56
55
|
/** Current approval status of the payout */
|
|
57
|
-
get approvalStatus():
|
|
56
|
+
get approvalStatus(): PayoutApprovalStatus | undefined | null;
|
|
58
57
|
/** Information about who created the payout */
|
|
59
|
-
get createdBy():
|
|
58
|
+
get createdBy(): PayoutAuthorizer | undefined | null;
|
|
60
59
|
/** Information about who last actioned the payout */
|
|
61
|
-
get actionedBy():
|
|
60
|
+
get actionedBy(): PayoutAuthorizer | undefined | null;
|
|
62
61
|
/**
|
|
63
62
|
* Constructs contact information based on payout channel
|
|
64
63
|
*
|
|
@@ -71,7 +70,7 @@ export declare class Payout {
|
|
|
71
70
|
* For bank payouts, expects msisdn in format "SWIFTCODE:ACCOUNTNUMBER"
|
|
72
71
|
*
|
|
73
72
|
* @example
|
|
74
|
-
*
|
|
73
|
+
* ``
|
|
75
74
|
* // Mobile payout
|
|
76
75
|
* payout.contactInfo // Returns MobileContactInfo with phone details
|
|
77
76
|
*
|
|
@@ -84,17 +83,17 @@ export declare class Payout {
|
|
|
84
83
|
* Creates a Payout instance from raw data
|
|
85
84
|
* @throws {ZodError} if validation fails
|
|
86
85
|
*/
|
|
87
|
-
static create(data:
|
|
86
|
+
static create(data: PayoutDTO): Payout;
|
|
88
87
|
/**
|
|
89
88
|
* Creates multiple Payout instances from an array of raw data
|
|
90
89
|
* @throws {ZodError} if validation fails for any item
|
|
91
90
|
*/
|
|
92
|
-
static createMany(dataArray:
|
|
91
|
+
static createMany(dataArray: PayoutDTO[]): Payout[];
|
|
93
92
|
/**
|
|
94
93
|
* Creates a Payout instance from raw data without throwing
|
|
95
94
|
* @returns {Payout | null} Payout instance or null if validation fails
|
|
96
95
|
*/
|
|
97
|
-
static createSafe(data:
|
|
96
|
+
static createSafe(data: PayoutDTO): Payout | null;
|
|
98
97
|
/**
|
|
99
98
|
* Checks if an unknown value contains valid data to construct a Payout instance.
|
|
100
99
|
* This is useful when validating raw data structures before instantiation.
|
|
@@ -153,6 +152,5 @@ export declare class Payout {
|
|
|
153
152
|
/**
|
|
154
153
|
* Converts Payout instance to a plain object
|
|
155
154
|
*/
|
|
156
|
-
toJSON():
|
|
155
|
+
toJSON(): PayoutDTO;
|
|
157
156
|
}
|
|
158
|
-
//# sourceMappingURL=payout.d.ts.map
|
|
@@ -51,5 +51,4 @@ export declare const Permissions: {
|
|
|
51
51
|
/**
|
|
52
52
|
* Permission Type
|
|
53
53
|
*/
|
|
54
|
-
export type Permission = typeof Permissions.Profile[keyof typeof Permissions.Profile] | typeof Permissions.Contact[keyof typeof Permissions.Contact] | typeof Permissions.Payment[keyof typeof Permissions.Payment] | typeof Permissions.Payout[keyof typeof Permissions.Payout] | typeof Permissions.Transfer[keyof typeof Permissions.Transfer] | typeof Permissions.UserManagement[keyof typeof Permissions.UserManagement] | typeof Permissions.Role[keyof typeof Permissions.Role] | typeof Permissions.Wallet[keyof typeof Permissions.Wallet];
|
|
55
|
-
//# sourceMappingURL=permission.d.ts.map
|
|
54
|
+
export type Permission = (typeof Permissions.Profile)[keyof typeof Permissions.Profile] | (typeof Permissions.Contact)[keyof typeof Permissions.Contact] | (typeof Permissions.Payment)[keyof typeof Permissions.Payment] | (typeof Permissions.Payout)[keyof typeof Permissions.Payout] | (typeof Permissions.Transfer)[keyof typeof Permissions.Transfer] | (typeof Permissions.UserManagement)[keyof typeof Permissions.UserManagement] | (typeof Permissions.Role)[keyof typeof Permissions.Role] | (typeof Permissions.Wallet)[keyof typeof Permissions.Wallet];
|
|
@@ -1,38 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PhoneNumber } from "@temboplus/frontend-core";
|
|
3
|
-
/**
|
|
4
|
-
* Type definition for profile schema using Zod.
|
|
5
|
-
* This type helper ensures type safety when implementing the actual schema.
|
|
6
|
-
*/
|
|
7
|
-
type ProfileZodSchemaType = z.ZodObject<{
|
|
8
|
-
id: z.ZodString;
|
|
9
|
-
firstName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
10
|
-
lastName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
11
|
-
displayName: z.ZodString;
|
|
12
|
-
phone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
13
|
-
accountNo: z.ZodString;
|
|
14
|
-
email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
15
|
-
}>;
|
|
16
|
-
/**
|
|
17
|
-
* Zod schema for validating user profile data.
|
|
18
|
-
* Defines validation rules and constraints for each profile field.
|
|
19
|
-
*
|
|
20
|
-
* @const {ProfileType}
|
|
21
|
-
*
|
|
22
|
-
* @property {string} id - Unique identifier for the profile
|
|
23
|
-
* @property {string | null | undefined} firstName - User's first name, can be null or undefined
|
|
24
|
-
* @property {string | null | undefined} lastName - User's last name, can be null or undefined
|
|
25
|
-
* @property {string} displayName - User's display name
|
|
26
|
-
* @property {string | null | undefined} phone - User's contact phone number, can be null or undefined
|
|
27
|
-
* @property {string} accountNo - User's account number
|
|
28
|
-
* @property {string | null | undefined} email - User's email address, can be null or undefined
|
|
29
|
-
*/
|
|
30
|
-
export declare const profileSchema: ProfileZodSchemaType;
|
|
31
|
-
/**
|
|
32
|
-
* TypeScript type representing a validated user profile.
|
|
33
|
-
* Use this type for profile instances that have been validated against the schema.
|
|
34
|
-
*/
|
|
35
|
-
export type ProfileType = z.infer<typeof profileSchema>;
|
|
1
|
+
import { ProfileDTO } from "@/features/auth/profile/profile.dtos";
|
|
36
2
|
/**
|
|
37
3
|
* Represents a user profile in the system.
|
|
38
4
|
*
|
|
@@ -48,16 +14,45 @@ export declare class Profile {
|
|
|
48
14
|
private _lastName?;
|
|
49
15
|
/** User's display name, can be used for presentation */
|
|
50
16
|
private _displayName;
|
|
51
|
-
/** User's phone number
|
|
17
|
+
/** User's phone number */
|
|
52
18
|
private _phone?;
|
|
53
19
|
/** User's account number */
|
|
54
20
|
private _accountNo;
|
|
55
21
|
/** User's email address */
|
|
56
22
|
private _email?;
|
|
23
|
+
/** Auto-approval setting */
|
|
24
|
+
private _autoApprove?;
|
|
57
25
|
/**
|
|
58
26
|
* Gets the profile schema used for validation.
|
|
59
27
|
*/
|
|
60
|
-
static get schema():
|
|
28
|
+
static get schema(): import("zod").ZodObject<{
|
|
29
|
+
id: import("zod").ZodString;
|
|
30
|
+
firstName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
31
|
+
lastName: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
32
|
+
displayName: import("zod").ZodString;
|
|
33
|
+
phone: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
34
|
+
accountNo: import("zod").ZodString;
|
|
35
|
+
email: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
36
|
+
autoApprove: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
|
|
37
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
38
|
+
id: string;
|
|
39
|
+
displayName: string;
|
|
40
|
+
accountNo: string;
|
|
41
|
+
firstName?: string | null | undefined;
|
|
42
|
+
lastName?: string | null | undefined;
|
|
43
|
+
phone?: string | null | undefined;
|
|
44
|
+
email?: string | null | undefined;
|
|
45
|
+
autoApprove?: boolean | null | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
id: string;
|
|
48
|
+
displayName: string;
|
|
49
|
+
accountNo: string;
|
|
50
|
+
firstName?: string | null | undefined;
|
|
51
|
+
lastName?: string | null | undefined;
|
|
52
|
+
phone?: string | null | undefined;
|
|
53
|
+
email?: string | null | undefined;
|
|
54
|
+
autoApprove?: boolean | null | undefined;
|
|
55
|
+
}>;
|
|
61
56
|
/**
|
|
62
57
|
* Creates a new Profile instance with the provided data.
|
|
63
58
|
*
|
|
@@ -79,6 +74,7 @@ export declare class Profile {
|
|
|
79
74
|
phone?: string | null;
|
|
80
75
|
accountNo: string;
|
|
81
76
|
email?: string | null;
|
|
77
|
+
autoApprove?: boolean | null;
|
|
82
78
|
}): Profile | undefined;
|
|
83
79
|
/**
|
|
84
80
|
* Gets the profile's unique identifier.
|
|
@@ -99,7 +95,7 @@ export declare class Profile {
|
|
|
99
95
|
/**
|
|
100
96
|
* Gets the user's phone number object.
|
|
101
97
|
*/
|
|
102
|
-
get phone():
|
|
98
|
+
get phone(): string | null | undefined;
|
|
103
99
|
/**
|
|
104
100
|
* Gets the user's account number.
|
|
105
101
|
*/
|
|
@@ -109,9 +105,9 @@ export declare class Profile {
|
|
|
109
105
|
*/
|
|
110
106
|
get email(): string | null | undefined;
|
|
111
107
|
/**
|
|
112
|
-
* Gets the
|
|
108
|
+
* Gets the auto-approval setting.
|
|
113
109
|
*/
|
|
114
|
-
get
|
|
110
|
+
get autoApprove(): boolean | null | undefined;
|
|
115
111
|
/**
|
|
116
112
|
* Gets the user's name for display purposes.
|
|
117
113
|
* Returns the display name if it exists, otherwise returns the first and last name combined.
|
|
@@ -122,7 +118,7 @@ export declare class Profile {
|
|
|
122
118
|
*
|
|
123
119
|
* @returns A plain object matching the ProfileType interface
|
|
124
120
|
*/
|
|
125
|
-
toObject():
|
|
121
|
+
toObject(): ProfileDTO;
|
|
126
122
|
/**
|
|
127
123
|
* Converts the profile to a JSON string.
|
|
128
124
|
*
|
|
@@ -157,5 +153,3 @@ export declare class Profile {
|
|
|
157
153
|
*/
|
|
158
154
|
static is(obj: unknown): obj is Profile;
|
|
159
155
|
}
|
|
160
|
-
export {};
|
|
161
|
-
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
access: string[];
|
|
6
|
-
createdAt: string;
|
|
7
|
-
updatedAt: string;
|
|
8
|
-
}
|
|
1
|
+
import { RoleDTO } from "@/features/admin/admin.dtos";
|
|
9
2
|
export declare class Role {
|
|
10
3
|
readonly id: string;
|
|
11
4
|
readonly name: string;
|
|
@@ -13,9 +6,8 @@ export declare class Role {
|
|
|
13
6
|
readonly permissions: ReadonlySet<string>;
|
|
14
7
|
readonly createdAt: Date;
|
|
15
8
|
readonly updatedAt: Date;
|
|
16
|
-
constructor(data:
|
|
9
|
+
constructor(data: RoleDTO);
|
|
17
10
|
hasPermission(permission: string): boolean;
|
|
18
11
|
static from(data: any): Role | undefined;
|
|
19
12
|
toJSON(): any;
|
|
20
13
|
}
|
|
21
|
-
//# sourceMappingURL=role.d.ts.map
|