@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,225 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { BankBeneficiaryInfo, BeneficiaryInfo, MobileBeneficiaryInfo } from "../beneficiary/beneficiary-info.model.js";
|
|
3
|
+
/** Prefix for Ecobank mobile transfer narrations */
|
|
4
|
+
export declare const ECOBANK_PREFIX = "MOBILE TRANSFER ";
|
|
5
|
+
/** V2 format prefix for payout narrations using contact details */
|
|
6
|
+
export declare const NARR_V2_PREFIX: string;
|
|
7
|
+
/** V1 format prefix for bank payout narrations */
|
|
8
|
+
export declare const BANK_NARR_PREFIX: string;
|
|
9
|
+
/** Legacy format prefix for bank payout narrations */
|
|
10
|
+
export declare const LEGACY_BANK_NARR_PREFIX: string;
|
|
11
|
+
/** V1 format prefix for mobile money payout narrations */
|
|
12
|
+
export declare const MOBILE_NARR_PREFIX: string;
|
|
13
|
+
/** Legacy format prefix for mobile money payout narrations */
|
|
14
|
+
export declare const LEGACY_MOBILE_NARR_PREFIX: string;
|
|
15
|
+
/**
|
|
16
|
+
* Zod schema for Narration JSON serialization
|
|
17
|
+
*/
|
|
18
|
+
export declare const NarrationJSONSchema: z.ZodObject<{
|
|
19
|
+
text: z.ZodString;
|
|
20
|
+
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
version: string;
|
|
23
|
+
text: string;
|
|
24
|
+
}, {
|
|
25
|
+
text: string;
|
|
26
|
+
version?: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
export type NarrationJSON = z.infer<typeof NarrationJSONSchema>;
|
|
29
|
+
/**
|
|
30
|
+
* Handles payout narration generation and parsing for the Afloat platform.
|
|
31
|
+
*
|
|
32
|
+
* This class provides functionality to:
|
|
33
|
+
* - Generate standardized payout narrations using contact details (V2 format)
|
|
34
|
+
* - Parse existing narrations to extract contact information
|
|
35
|
+
* - Format narration text for different display contexts
|
|
36
|
+
* - Handle V2 (PAY format), V1, and legacy narration formats for backward compatibility
|
|
37
|
+
* - Serialize/deserialize to/from JSON format
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* // Generate V2 narration using contact info
|
|
42
|
+
* const mobileContact = new MobileContactInfo("John Doe", phoneNumber);
|
|
43
|
+
* const narration = Narration.generateDefaultPayoutNarration(mobileContact);
|
|
44
|
+
* // Result: "PAYOUT +255123456789 JOHN DOE"
|
|
45
|
+
*
|
|
46
|
+
* const bankContact = new BankContactInfo("Jane Smith", bank, "1234567890");
|
|
47
|
+
* const narration = Narration.generateDefaultPayoutNarration(bankContact);
|
|
48
|
+
* // Result: "PAYOUT CORUTZTZ 1234567890 JANE SMITH"
|
|
49
|
+
*
|
|
50
|
+
* // Extract contact details from narration
|
|
51
|
+
* const existingNarration = new Narration("PAYOUT +255123456789 JOHN DOE");
|
|
52
|
+
* const contactInfo = existingNarration.getBeneficiaryDetails();
|
|
53
|
+
* // Returns: MobileContactInfo instance
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare class Narration {
|
|
57
|
+
/** The raw narration text */
|
|
58
|
+
text: string;
|
|
59
|
+
/**
|
|
60
|
+
* Creates a new Narration instance.
|
|
61
|
+
*
|
|
62
|
+
* @param text - The narration text to wrap
|
|
63
|
+
*/
|
|
64
|
+
constructor(text: string);
|
|
65
|
+
/**
|
|
66
|
+
* Returns a medium-length version of the narration text suitable for table columns.
|
|
67
|
+
* Truncates to 47 characters + "..." if longer than 50 characters.
|
|
68
|
+
*
|
|
69
|
+
* @returns Truncated narration text for medium-width displays
|
|
70
|
+
*/
|
|
71
|
+
get mediumText(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Returns a short version of the narration text suitable for compact displays.
|
|
74
|
+
* Truncates to 32 characters + "..." if longer than 35 characters.
|
|
75
|
+
*
|
|
76
|
+
* @returns Truncated narration text for narrow displays
|
|
77
|
+
*/
|
|
78
|
+
get shortText(): string;
|
|
79
|
+
/**
|
|
80
|
+
* Generates the default payout narration based on contact information using the V2 format.
|
|
81
|
+
* Automatically determines whether to generate mobile or bank narration based on contact type.
|
|
82
|
+
*
|
|
83
|
+
* @param data - Contact information (either MobileBeneficiaryInfo or BankBeneficiaryInfo)
|
|
84
|
+
* @returns Formatted default narration string in uppercase using V2 format, or empty string if contact type is unrecognized
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* const mobileContact = new MobileBeneficiaryInfo("John Doe", phoneNumber);
|
|
89
|
+
* const narration = Narration.generateDefaultPayoutNarration(mobileContact);
|
|
90
|
+
* // Returns: "PAYOUT +255123456789 JOHN DOE"
|
|
91
|
+
*
|
|
92
|
+
* const bankContact = new BankBeneficiaryInfo("Jane Smith", bank, "1234567890");
|
|
93
|
+
* const narration = Narration.generateDefaultPayoutNarration(bankContact);
|
|
94
|
+
* // Returns: "PAYOUT CORUTZTZ 1234567890 JANE SMITH"
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
static generateDefaultPayoutNarration(data: BeneficiaryInfo): string;
|
|
98
|
+
/**
|
|
99
|
+
* Generates a V2 standardized mobile money payout narration with contact details.
|
|
100
|
+
* Format: "PAY {phone_number} {name}"
|
|
101
|
+
*
|
|
102
|
+
* @param data - Mobile contact information containing phone number and name
|
|
103
|
+
* @returns Formatted V2 mobile payout narration in uppercase
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```typescript
|
|
107
|
+
* const contact = new MobileBeneficiaryInfo("John Doe", phoneNumber);
|
|
108
|
+
* const narration = Narration.generateMobilePayoutNarrationV2(contact);
|
|
109
|
+
* // Returns: "PAYOUT +255123456789 JOHN DOE"
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
static generateMobilePayoutNarrationV2(data: MobileBeneficiaryInfo): string;
|
|
113
|
+
/**
|
|
114
|
+
* Generates a V2 standardized bank payout narration with contact details.
|
|
115
|
+
* Format: "PAY {swift_code} {account_number} {account_name}"
|
|
116
|
+
*
|
|
117
|
+
* @param data - Bank contact information containing bank details, account number, and account name
|
|
118
|
+
* @returns Formatted V2 bank payout narration in uppercase
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* const contact = new BankBeneficiaryInfo("Jane Smith", bank, "1234567890");
|
|
123
|
+
* const narration = Narration.generateBankPayoutNarrationV2(contact);
|
|
124
|
+
* // Returns: "PAYOUT CORUTZTZ 1234567890 JANE SMITH"
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
static generateBankPayoutNarrationV2(data: BankBeneficiaryInfo): string;
|
|
128
|
+
/**
|
|
129
|
+
* Extracts contact information from the narration text.
|
|
130
|
+
* Supports V2 (PAY format), V1, and legacy formats for comprehensive contact detection.
|
|
131
|
+
*
|
|
132
|
+
* @returns Parsed BeneficiaryInfo (BankBeneficiaryInfo or MobileBeneficiaryInfo) if successful, undefined otherwise
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* // V2 format
|
|
137
|
+
* const v2Narration = new Narration("PAYOUT +255123456789 JOHN DOE");
|
|
138
|
+
* const v2Contact = v2Narration.getBeneficiaryDetails();
|
|
139
|
+
* // Returns: MobileContactInfo instance
|
|
140
|
+
*
|
|
141
|
+
* // V1 format
|
|
142
|
+
* const v1Narration = new Narration("PAYOUT TO BANK CRDB 1234567890 Jane Smith");
|
|
143
|
+
* const v1Contact = v1Narration.getBeneficiaryDetails();
|
|
144
|
+
* // Returns: BankContactInfo instance
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
getBeneficiaryDetails: () => BeneficiaryInfo | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* Extracts bank contact information from the narration text.
|
|
150
|
+
* Handles V2 format (PAY with SWIFT code and details), V1 format, and legacy format.
|
|
151
|
+
* Also handles Ecobank-prefixed narrations by stripping the prefix.
|
|
152
|
+
*
|
|
153
|
+
* V2 format: "PAYOUT {swift_code} {account_number} {account_name}"
|
|
154
|
+
* V1 format: "PAYOUT TO BANK {bank_name} {account_number} {account_name}"
|
|
155
|
+
* Legacy format: "TO_BANK => {json_object}"
|
|
156
|
+
*
|
|
157
|
+
* @returns BankBeneficiaryInfo if parsing is successful, undefined otherwise
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```typescript
|
|
161
|
+
* // V2 format
|
|
162
|
+
* const v2Narration = new Narration("PAYOUT CORUTZTZ 1234567890 JANE SMITH");
|
|
163
|
+
* const v2Contact = v2Narration.getBankBeneficiaryDetails();
|
|
164
|
+
*
|
|
165
|
+
* // V1 format
|
|
166
|
+
* const v1Narration = new Narration("PAYOUT TO BANK CRDB 1234567890 Jane Smith");
|
|
167
|
+
* const v1Contact = v1Narration.getBankBeneficiaryDetails();
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
getBankBeneficiaryDetails: () => BankBeneficiaryInfo | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* Extracts mobile contact information from the narration text.
|
|
173
|
+
* Handles V2 format (PAY with phone number and name), V1 format, and legacy format.
|
|
174
|
+
* Also handles Ecobank-prefixed narrations by stripping the prefix.
|
|
175
|
+
*
|
|
176
|
+
* V2 format: "PAYOUT {phone_number} {name}"
|
|
177
|
+
* V1 format: "PAYOUT TO MOBILE {phone_number} {name}"
|
|
178
|
+
* Legacy format: "TO_MOMO => {json_object}"
|
|
179
|
+
*
|
|
180
|
+
* @returns MobileBeneficiaryInfo if parsing is successful, undefined otherwise
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```typescript
|
|
184
|
+
* // V2 format
|
|
185
|
+
* const v2Narration = new Narration("PAYOUT +255123456789 JOHN DOE");
|
|
186
|
+
* const v2Contact = v2Narration.getMobileBeneficiaryDetails();
|
|
187
|
+
*
|
|
188
|
+
* // V1 format
|
|
189
|
+
* const v1Narration = new Narration("PAYOUT TO MOBILE +255123456789 John Doe");
|
|
190
|
+
* const v1Contact = v1Narration.getMobileBeneficiaryDetails();
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
getMobileBeneficiaryDetails: () => MobileBeneficiaryInfo | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* Type guard to check if an unknown object is a valid Narration instance.
|
|
196
|
+
*
|
|
197
|
+
* @param obj - The object to check
|
|
198
|
+
* @returns Type predicate indicating if the object is a Narration instance
|
|
199
|
+
*/
|
|
200
|
+
static is(obj: unknown): obj is Narration;
|
|
201
|
+
/**
|
|
202
|
+
* Serializes the Narration instance to a JSON-compatible object
|
|
203
|
+
*/
|
|
204
|
+
toJSON(): NarrationJSON;
|
|
205
|
+
/**
|
|
206
|
+
* Serializes the Narration instance to a JSON string
|
|
207
|
+
*/
|
|
208
|
+
toJSONString(): string;
|
|
209
|
+
/**
|
|
210
|
+
* Creates a Narration instance from a JSON-compatible object or string
|
|
211
|
+
*/
|
|
212
|
+
static fromJSON(json: NarrationJSON | string): Narration | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* Type guard using Zod schema validation
|
|
215
|
+
*/
|
|
216
|
+
static isNarrationJSON(obj: unknown): obj is NarrationJSON;
|
|
217
|
+
/**
|
|
218
|
+
* @deprecated Use toJSON() instead
|
|
219
|
+
*/
|
|
220
|
+
toJson(): NarrationJSON;
|
|
221
|
+
/**
|
|
222
|
+
* @deprecated Use fromJSON() instead
|
|
223
|
+
*/
|
|
224
|
+
static fromJson(json: NarrationJSON | string): Narration | undefined;
|
|
225
|
+
}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { Amount } from "@temboplus/frontend-core";
|
|
2
|
+
import { Narration } from "./narration.model.js";
|
|
3
|
+
import z from "zod";
|
|
4
|
+
/**
|
|
5
|
+
* Zod schema for WalletStatementEntry JSON serialization
|
|
6
|
+
*/
|
|
7
|
+
export declare const WalletStatementEntryJSONSchema: z.ZodObject<{
|
|
8
|
+
accountNo: z.ZodOptional<z.ZodString>;
|
|
9
|
+
debitOrCredit: z.ZodString;
|
|
10
|
+
tranRefNo: z.ZodString;
|
|
11
|
+
narration: z.ZodObject<{
|
|
12
|
+
text: z.ZodString;
|
|
13
|
+
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
version: string;
|
|
16
|
+
text: string;
|
|
17
|
+
}, {
|
|
18
|
+
text: string;
|
|
19
|
+
version?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
txnDate: z.ZodString;
|
|
22
|
+
valueDate: z.ZodString;
|
|
23
|
+
amountCredited: z.ZodObject<{
|
|
24
|
+
value: z.ZodNumber;
|
|
25
|
+
text: z.ZodString;
|
|
26
|
+
currencyCode: z.ZodString;
|
|
27
|
+
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
version: string;
|
|
30
|
+
value: number;
|
|
31
|
+
text: string;
|
|
32
|
+
currencyCode: string;
|
|
33
|
+
}, {
|
|
34
|
+
value: number;
|
|
35
|
+
text: string;
|
|
36
|
+
currencyCode: string;
|
|
37
|
+
version?: string | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
amountDebited: z.ZodObject<{
|
|
40
|
+
value: z.ZodNumber;
|
|
41
|
+
text: z.ZodString;
|
|
42
|
+
currencyCode: z.ZodString;
|
|
43
|
+
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
version: string;
|
|
46
|
+
value: number;
|
|
47
|
+
text: string;
|
|
48
|
+
currencyCode: string;
|
|
49
|
+
}, {
|
|
50
|
+
value: number;
|
|
51
|
+
text: string;
|
|
52
|
+
currencyCode: string;
|
|
53
|
+
version?: string | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
balance: z.ZodObject<{
|
|
56
|
+
value: z.ZodNumber;
|
|
57
|
+
text: z.ZodString;
|
|
58
|
+
currencyCode: z.ZodString;
|
|
59
|
+
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
version: string;
|
|
62
|
+
value: number;
|
|
63
|
+
text: string;
|
|
64
|
+
currencyCode: string;
|
|
65
|
+
}, {
|
|
66
|
+
value: number;
|
|
67
|
+
text: string;
|
|
68
|
+
currencyCode: string;
|
|
69
|
+
version?: string | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
currencyCode: z.ZodString;
|
|
72
|
+
version: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
version: string;
|
|
75
|
+
currencyCode: string;
|
|
76
|
+
debitOrCredit: string;
|
|
77
|
+
tranRefNo: string;
|
|
78
|
+
narration: {
|
|
79
|
+
version: string;
|
|
80
|
+
text: string;
|
|
81
|
+
};
|
|
82
|
+
txnDate: string;
|
|
83
|
+
valueDate: string;
|
|
84
|
+
amountCredited: {
|
|
85
|
+
version: string;
|
|
86
|
+
value: number;
|
|
87
|
+
text: string;
|
|
88
|
+
currencyCode: string;
|
|
89
|
+
};
|
|
90
|
+
amountDebited: {
|
|
91
|
+
version: string;
|
|
92
|
+
value: number;
|
|
93
|
+
text: string;
|
|
94
|
+
currencyCode: string;
|
|
95
|
+
};
|
|
96
|
+
balance: {
|
|
97
|
+
version: string;
|
|
98
|
+
value: number;
|
|
99
|
+
text: string;
|
|
100
|
+
currencyCode: string;
|
|
101
|
+
};
|
|
102
|
+
accountNo?: string | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
currencyCode: string;
|
|
105
|
+
debitOrCredit: string;
|
|
106
|
+
tranRefNo: string;
|
|
107
|
+
narration: {
|
|
108
|
+
text: string;
|
|
109
|
+
version?: string | undefined;
|
|
110
|
+
};
|
|
111
|
+
txnDate: string;
|
|
112
|
+
valueDate: string;
|
|
113
|
+
amountCredited: {
|
|
114
|
+
value: number;
|
|
115
|
+
text: string;
|
|
116
|
+
currencyCode: string;
|
|
117
|
+
version?: string | undefined;
|
|
118
|
+
};
|
|
119
|
+
amountDebited: {
|
|
120
|
+
value: number;
|
|
121
|
+
text: string;
|
|
122
|
+
currencyCode: string;
|
|
123
|
+
version?: string | undefined;
|
|
124
|
+
};
|
|
125
|
+
balance: {
|
|
126
|
+
value: number;
|
|
127
|
+
text: string;
|
|
128
|
+
currencyCode: string;
|
|
129
|
+
version?: string | undefined;
|
|
130
|
+
};
|
|
131
|
+
accountNo?: string | undefined;
|
|
132
|
+
version?: string | undefined;
|
|
133
|
+
}>;
|
|
134
|
+
export type WalletStatementEntryJSON = z.infer<typeof WalletStatementEntryJSONSchema>;
|
|
135
|
+
/**
|
|
136
|
+
* Represents a single entry in a Wallet's statement history.
|
|
137
|
+
*
|
|
138
|
+
* This class provides methods for creating, validating, and accessing statement entry data.
|
|
139
|
+
* It integrates with the Zod schema validation for data integrity and includes narration parsing capabilities.
|
|
140
|
+
* The narration field now uses the Narration class for enhanced functionality.
|
|
141
|
+
*/
|
|
142
|
+
export declare class WalletStatementEntry {
|
|
143
|
+
private _accountNo?;
|
|
144
|
+
private _debitOrCredit;
|
|
145
|
+
private _tranRefNo;
|
|
146
|
+
private _narration;
|
|
147
|
+
private _txnDate;
|
|
148
|
+
private _valueDate;
|
|
149
|
+
private _amountCredited;
|
|
150
|
+
private _amountDebited;
|
|
151
|
+
private _balance;
|
|
152
|
+
private _currencyCode;
|
|
153
|
+
/**
|
|
154
|
+
* Gets the statement entry schema used for validation.
|
|
155
|
+
*/
|
|
156
|
+
static get schema(): z.ZodObject<{
|
|
157
|
+
accountNo: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
158
|
+
debitOrCredit: z.ZodString;
|
|
159
|
+
tranRefNo: z.ZodString;
|
|
160
|
+
narration: z.ZodString;
|
|
161
|
+
txnDate: z.ZodDate;
|
|
162
|
+
valueDate: z.ZodDate;
|
|
163
|
+
amountCredited: z.ZodNumber;
|
|
164
|
+
amountDebited: z.ZodNumber;
|
|
165
|
+
balance: z.ZodNumber;
|
|
166
|
+
currencyCode: z.ZodDefault<z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>>;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
currencyCode: string;
|
|
169
|
+
debitOrCredit: string;
|
|
170
|
+
tranRefNo: string;
|
|
171
|
+
narration: string;
|
|
172
|
+
txnDate: Date;
|
|
173
|
+
valueDate: Date;
|
|
174
|
+
amountCredited: number;
|
|
175
|
+
amountDebited: number;
|
|
176
|
+
balance: number;
|
|
177
|
+
accountNo?: string | undefined;
|
|
178
|
+
}, {
|
|
179
|
+
debitOrCredit: string;
|
|
180
|
+
tranRefNo: string;
|
|
181
|
+
narration: string;
|
|
182
|
+
txnDate: Date;
|
|
183
|
+
valueDate: Date;
|
|
184
|
+
amountCredited: number;
|
|
185
|
+
amountDebited: number;
|
|
186
|
+
balance: number;
|
|
187
|
+
accountNo?: string | undefined;
|
|
188
|
+
currencyCode?: string | undefined;
|
|
189
|
+
}>;
|
|
190
|
+
/**
|
|
191
|
+
* Private constructor to enforce use of static factory methods.
|
|
192
|
+
* Assumes data is already validated and dates are Date objects.
|
|
193
|
+
* @param data - Object containing statement entry information conforming to WalletStatementEntryDTO.
|
|
194
|
+
* @param narration - Narration instance for the transaction
|
|
195
|
+
*/
|
|
196
|
+
private constructor();
|
|
197
|
+
/**
|
|
198
|
+
* Creates a new WalletStatementEntry instance after validating the input data.
|
|
199
|
+
* Handles date coercion via the schema and uses currencyCode from the data.
|
|
200
|
+
*
|
|
201
|
+
* @param data - Object containing statement entry information. Dates can be strings or Date objects.
|
|
202
|
+
* @returns A new WalletStatementEntry instance, or undefined if validation fails.
|
|
203
|
+
*/
|
|
204
|
+
static create(data: {
|
|
205
|
+
accountNo?: string | null;
|
|
206
|
+
debitOrCredit: string;
|
|
207
|
+
tranRefNo: string;
|
|
208
|
+
narration: string | Narration;
|
|
209
|
+
txnDate: string | Date;
|
|
210
|
+
valueDate: string | Date;
|
|
211
|
+
amountCredited: number;
|
|
212
|
+
amountDebited: number;
|
|
213
|
+
balance: number;
|
|
214
|
+
currencyCode?: string;
|
|
215
|
+
}): WalletStatementEntry | undefined;
|
|
216
|
+
get accountNo(): string | undefined;
|
|
217
|
+
get debitOrCredit(): string;
|
|
218
|
+
get tranRefNo(): string;
|
|
219
|
+
get narration(): Narration;
|
|
220
|
+
get txnDate(): Date;
|
|
221
|
+
get valueDate(): Date;
|
|
222
|
+
get amountCredited(): Amount;
|
|
223
|
+
get amountDebited(): Amount;
|
|
224
|
+
get balance(): Amount;
|
|
225
|
+
get currencyCode(): string;
|
|
226
|
+
/**
|
|
227
|
+
* Validates the current statement entry instance data against the schema.
|
|
228
|
+
* @returns True if the statement entry instance data is valid, false otherwise.
|
|
229
|
+
*/
|
|
230
|
+
validate(): boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Type guard to check if an unknown object is a valid WalletStatementEntry instance.
|
|
233
|
+
* Performs structural checks (duck typing).
|
|
234
|
+
* @param obj - The object to check.
|
|
235
|
+
* @returns Type predicate indicating if the object is a WalletStatementEntry instance.
|
|
236
|
+
*/
|
|
237
|
+
static is(obj: unknown): obj is WalletStatementEntry;
|
|
238
|
+
/**
|
|
239
|
+
* Checks if two WalletStatementEntry instances are equal based on their transaction reference numbers.
|
|
240
|
+
* @param other - Another WalletStatementEntry to compare with.
|
|
241
|
+
* @returns True if both entries have the same transaction reference number.
|
|
242
|
+
*/
|
|
243
|
+
equals(other: WalletStatementEntry): boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Creates a copy of this WalletStatementEntry with the same data.
|
|
246
|
+
* @returns A new WalletStatementEntry instance with identical data.
|
|
247
|
+
*/
|
|
248
|
+
clone(): WalletStatementEntry | undefined;
|
|
249
|
+
/**
|
|
250
|
+
* Returns a string representation of the statement entry for debugging.
|
|
251
|
+
* @returns A formatted string with key transaction details.
|
|
252
|
+
*/
|
|
253
|
+
toString(): string;
|
|
254
|
+
/**
|
|
255
|
+
* Legacy method for backwards compatibility - creates from plain object
|
|
256
|
+
* @deprecated Use fromJson() for serialized data or create() for raw data
|
|
257
|
+
*/
|
|
258
|
+
static from(data: any): WalletStatementEntry | undefined;
|
|
259
|
+
/**
|
|
260
|
+
* Serializes the WalletStatementEntry instance to a JSON-compatible object
|
|
261
|
+
*/
|
|
262
|
+
toJSON(): WalletStatementEntryJSON;
|
|
263
|
+
/**
|
|
264
|
+
* Serializes the WalletStatementEntry instance to a JSON string
|
|
265
|
+
*/
|
|
266
|
+
toJSONString(): string;
|
|
267
|
+
/**
|
|
268
|
+
* Creates a WalletStatementEntry instance from a JSON-compatible object or string
|
|
269
|
+
*/
|
|
270
|
+
static fromJSON(json: WalletStatementEntryJSON | string): WalletStatementEntry | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* Type guard using Zod schema validation
|
|
273
|
+
*/
|
|
274
|
+
static isWalletStatementEntryJSON(obj: unknown): obj is WalletStatementEntryJSON;
|
|
275
|
+
/**
|
|
276
|
+
* Creates WalletStatementEntry instances from a JSON array
|
|
277
|
+
*/
|
|
278
|
+
static fromJSONArray(jsonArray: WalletStatementEntryJSON[] | string): WalletStatementEntry[];
|
|
279
|
+
/**
|
|
280
|
+
* Serializes an array of WalletStatementEntry instances to JSON
|
|
281
|
+
*/
|
|
282
|
+
static toJSONArray(entries: WalletStatementEntry[]): WalletStatementEntryJSON[];
|
|
283
|
+
/**
|
|
284
|
+
* @deprecated Use toJSON() instead
|
|
285
|
+
*/
|
|
286
|
+
toJson(): WalletStatementEntryJSON;
|
|
287
|
+
/**
|
|
288
|
+
* @deprecated Use fromJSON() instead
|
|
289
|
+
*/
|
|
290
|
+
static fromJson(json: WalletStatementEntryJSON | string): WalletStatementEntry | undefined;
|
|
291
|
+
/**
|
|
292
|
+
* @deprecated Use fromJSONArray() instead
|
|
293
|
+
*/
|
|
294
|
+
static fromJsonArray(jsonArray: WalletStatementEntryJSON[] | string): WalletStatementEntry[];
|
|
295
|
+
/**
|
|
296
|
+
* @deprecated Use toJSONArray() instead
|
|
297
|
+
*/
|
|
298
|
+
static toJsonArray(entries: WalletStatementEntry[]): WalletStatementEntryJSON[];
|
|
299
|
+
}
|
|
@@ -12,19 +12,19 @@ export declare const contract: {
|
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
13
|
id?: string | undefined;
|
|
14
14
|
accountNo?: string | undefined;
|
|
15
|
-
channel?: string | undefined;
|
|
16
15
|
profileId?: string | undefined;
|
|
17
|
-
|
|
16
|
+
channel?: string | undefined;
|
|
18
17
|
countryCode?: string | undefined;
|
|
19
18
|
currencyCode?: string | undefined;
|
|
19
|
+
accountName?: string | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
id?: string | undefined;
|
|
22
22
|
accountNo?: string | undefined;
|
|
23
|
-
channel?: string | undefined;
|
|
24
23
|
profileId?: string | undefined;
|
|
25
|
-
|
|
24
|
+
channel?: string | undefined;
|
|
26
25
|
countryCode?: string | undefined;
|
|
27
26
|
currencyCode?: string | undefined;
|
|
27
|
+
accountName?: string | undefined;
|
|
28
28
|
}>;
|
|
29
29
|
method: "GET";
|
|
30
30
|
path: "/";
|
|
@@ -35,27 +35,27 @@ export declare const contract: {
|
|
|
35
35
|
accountNo: z.ZodString;
|
|
36
36
|
accountName: z.ZodString;
|
|
37
37
|
channel: z.ZodString;
|
|
38
|
-
countryCode: z.ZodEffects<z.ZodDefault<z.ZodString>,
|
|
39
|
-
currencyCode: z.ZodEffects<z.ZodDefault<z.ZodString>,
|
|
38
|
+
countryCode: z.ZodEffects<z.ZodDefault<z.ZodString>, import("@temboplus/frontend-core").ISO2CountryCode, string | undefined>;
|
|
39
|
+
currencyCode: z.ZodEffects<z.ZodDefault<z.ZodString>, import("@temboplus/frontend-core").CurrencyCode, string | undefined>;
|
|
40
40
|
createdAt: z.ZodString;
|
|
41
41
|
updatedAt: z.ZodString;
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
createdAt: string;
|
|
43
44
|
id: string;
|
|
44
45
|
accountNo: string;
|
|
45
|
-
channel: string;
|
|
46
46
|
profileId: string;
|
|
47
|
-
createdAt: string;
|
|
48
47
|
updatedAt: string;
|
|
48
|
+
channel: string;
|
|
49
|
+
countryCode: import("@temboplus/frontend-core").ISO2CountryCode;
|
|
50
|
+
currencyCode: import("@temboplus/frontend-core").CurrencyCode;
|
|
49
51
|
accountName: string;
|
|
50
|
-
countryCode: string;
|
|
51
|
-
currencyCode: string;
|
|
52
52
|
}, {
|
|
53
|
+
createdAt: string;
|
|
53
54
|
id: string;
|
|
54
55
|
accountNo: string;
|
|
55
|
-
channel: string;
|
|
56
56
|
profileId: string;
|
|
57
|
-
createdAt: string;
|
|
58
57
|
updatedAt: string;
|
|
58
|
+
channel: string;
|
|
59
59
|
accountName: string;
|
|
60
60
|
countryCode?: string | undefined;
|
|
61
61
|
currencyCode?: string | undefined;
|
|
@@ -90,12 +90,12 @@ export declare const contract: {
|
|
|
90
90
|
startDate: z.ZodDate;
|
|
91
91
|
accountNo: z.ZodOptional<z.ZodString>;
|
|
92
92
|
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
endDate: Date;
|
|
94
93
|
startDate: Date;
|
|
94
|
+
endDate: Date;
|
|
95
95
|
accountNo?: string | undefined;
|
|
96
96
|
}, {
|
|
97
|
-
endDate: Date;
|
|
98
97
|
startDate: Date;
|
|
98
|
+
endDate: Date;
|
|
99
99
|
accountNo?: string | undefined;
|
|
100
100
|
}>;
|
|
101
101
|
path: "/statement";
|
|
@@ -110,7 +110,9 @@ export declare const contract: {
|
|
|
110
110
|
amountCredited: z.ZodNumber;
|
|
111
111
|
amountDebited: z.ZodNumber;
|
|
112
112
|
balance: z.ZodNumber;
|
|
113
|
+
currencyCode: z.ZodDefault<z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>>;
|
|
113
114
|
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
currencyCode: string;
|
|
114
116
|
debitOrCredit: string;
|
|
115
117
|
tranRefNo: string;
|
|
116
118
|
narration: string;
|
|
@@ -130,8 +132,8 @@ export declare const contract: {
|
|
|
130
132
|
amountDebited: number;
|
|
131
133
|
balance: number;
|
|
132
134
|
accountNo?: string | undefined;
|
|
135
|
+
currencyCode?: string | undefined;
|
|
133
136
|
}>, "many">;
|
|
134
137
|
};
|
|
135
138
|
};
|
|
136
139
|
};
|
|
137
|
-
//# sourceMappingURL=contract.d.ts.map
|