@temboplus/afloat 0.1.53 → 0.1.55
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/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/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/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/{esm/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/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/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 +120 -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/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/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/src/models/contact/derivatives/contact.d.ts → dist/models/contact.model.d.ts} +23 -16
- package/dist/models/index.d.ts +10 -0
- package/{esm/src/models/user/managed-user.d.ts → dist/models/managed-user.model.d.ts} +3 -3
- package/{script/src/models/payout/derivatives/payout.d.ts → dist/models/payout.model.d.ts} +13 -15
- package/{esm/src → dist}/models/permission.d.ts +1 -2
- package/{script/src/models/user/profile.d.ts → dist/models/profile.model.d.ts} +37 -43
- package/{script/src/models/role.d.ts → dist/models/role.model.d.ts} +2 -10
- package/dist/models/statement-entry.model.d.ts +195 -0
- package/{esm/src/models/user/authenticated-user.d.ts → dist/models/user.model.d.ts} +1 -2
- package/{script/src/models/wallet/wallet.d.ts → dist/models/wallet.model.d.ts} +3 -46
- package/package.json +47 -26
- package/LICENSE +0 -7
- package/esm/_dnt.test_shims.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- 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/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 -2
- package/esm/src/features/auth/index.d.ts.map +0 -1
- package/esm/src/features/auth/index.js +0 -1
- 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/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.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.test.d.ts.map +0 -1
- 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/derivatives/contact_info.test.d.ts.map +0 -1
- 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 -139
- package/esm/src/models/contact/validation.test.d.ts.map +0 -1
- 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 -156
- package/esm/src/models/payout/derivatives/payout.d.ts.map +0 -1
- package/esm/src/models/payout/derivatives/payout.js +0 -261
- package/esm/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
- package/esm/src/models/payout/index.d.ts +0 -6
- package/esm/src/models/payout/index.d.ts.map +0 -1
- package/esm/src/models/payout/index.js +0 -5
- 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.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/_dnt.test_shims.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/script/mod.d.ts +0 -8
- package/script/mod.d.ts.map +0 -1
- package/script/mod.js +0 -23
- package/script/package.json +0 -3
- package/script/src/errors/api_error.d.ts +0 -63
- package/script/src/errors/api_error.d.ts.map +0 -1
- package/script/src/errors/api_error.js +0 -94
- package/script/src/errors/index.d.ts +0 -3
- package/script/src/errors/index.d.ts.map +0 -1
- package/script/src/errors/index.js +0 -18
- package/script/src/errors/permission_error.d.ts.map +0 -1
- package/script/src/errors/permission_error.js +0 -74
- package/script/src/features/admin/contract.d.ts +0 -842
- package/script/src/features/admin/contract.d.ts.map +0 -1
- package/script/src/features/admin/contract.js +0 -213
- package/script/src/features/admin/index.d.ts +0 -4
- package/script/src/features/admin/index.d.ts.map +0 -1
- package/script/src/features/admin/index.js +0 -19
- package/script/src/features/admin/repository.d.ts +0 -114
- package/script/src/features/admin/repository.d.ts.map +0 -1
- package/script/src/features/admin/repository.js +0 -252
- package/script/src/features/admin/schemas.d.ts.map +0 -1
- package/script/src/features/admin/schemas.js +0 -209
- package/script/src/features/auth/access/contract.d.ts +0 -14
- package/script/src/features/auth/access/contract.d.ts.map +0 -1
- package/script/src/features/auth/access/contract.js +0 -17
- package/script/src/features/auth/contract.d.ts +0 -112
- package/script/src/features/auth/contract.d.ts.map +0 -1
- package/script/src/features/auth/contract.js +0 -46
- package/script/src/features/auth/identity/contract.d.ts.map +0 -1
- package/script/src/features/auth/identity/contract.js +0 -20
- package/script/src/features/auth/identity/repository.d.ts +0 -22
- package/script/src/features/auth/identity/repository.d.ts.map +0 -1
- package/script/src/features/auth/identity/repository.js +0 -34
- package/script/src/features/auth/index.d.ts +0 -2
- package/script/src/features/auth/index.d.ts.map +0 -1
- package/script/src/features/auth/index.js +0 -17
- package/script/src/features/auth/manager.d.ts +0 -105
- package/script/src/features/auth/manager.d.ts.map +0 -1
- package/script/src/features/auth/manager.js +0 -185
- package/script/src/features/auth/profile/contract.d.ts.map +0 -1
- package/script/src/features/auth/profile/contract.js +0 -17
- package/script/src/features/auth/repository.d.ts +0 -30
- package/script/src/features/auth/repository.d.ts.map +0 -1
- package/script/src/features/auth/repository.js +0 -73
- package/script/src/features/auth/storage/client_store.d.ts +0 -30
- package/script/src/features/auth/storage/client_store.d.ts.map +0 -1
- package/script/src/features/auth/storage/client_store.js +0 -51
- package/script/src/features/auth/storage/client_token_handler.d.ts +0 -32
- package/script/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
- package/script/src/features/auth/storage/client_token_handler.js +0 -40
- package/script/src/features/auth/storage/server_store.d.ts +0 -24
- package/script/src/features/auth/storage/server_store.d.ts.map +0 -1
- package/script/src/features/auth/storage/server_store.js +0 -38
- package/script/src/features/auth/storage/server_token_handler.d.ts +0 -36
- package/script/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
- package/script/src/features/auth/storage/server_token_handler.js +0 -119
- package/script/src/features/auth/storage/types.d.ts.map +0 -1
- package/script/src/features/auth/storage/types.js +0 -2
- package/script/src/features/contact/contract.d.ts +0 -170
- package/script/src/features/contact/contract.d.ts.map +0 -1
- package/script/src/features/contact/contract.js +0 -52
- package/script/src/features/contact/index.d.ts +0 -2
- package/script/src/features/contact/index.d.ts.map +0 -1
- package/script/src/features/contact/index.js +0 -17
- package/script/src/features/contact/repository.d.ts +0 -58
- package/script/src/features/contact/repository.d.ts.map +0 -1
- package/script/src/features/contact/repository.js +0 -112
- package/script/src/features/payout/contract.d.ts +0 -623
- package/script/src/features/payout/contract.d.ts.map +0 -1
- package/script/src/features/payout/contract.js +0 -78
- package/script/src/features/payout/index.d.ts +0 -2
- package/script/src/features/payout/index.d.ts.map +0 -1
- package/script/src/features/payout/index.js +0 -17
- package/script/src/features/payout/repository.d.ts +0 -67
- package/script/src/features/payout/repository.d.ts.map +0 -1
- package/script/src/features/payout/repository.js +0 -167
- package/script/src/features/wallet/contract.d.ts.map +0 -1
- package/script/src/features/wallet/contract.js +0 -41
- package/script/src/features/wallet/index.d.ts +0 -2
- package/script/src/features/wallet/index.d.ts.map +0 -1
- package/script/src/features/wallet/index.js +0 -17
- package/script/src/features/wallet/repository.d.ts +0 -57
- package/script/src/features/wallet/repository.d.ts.map +0 -1
- package/script/src/features/wallet/repository.js +0 -97
- package/script/src/models/contact/derivatives/contact.d.ts.map +0 -1
- package/script/src/models/contact/derivatives/contact.js +0 -270
- package/script/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
- package/script/src/models/contact/derivatives/contact_info.d.ts +0 -188
- package/script/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
- package/script/src/models/contact/derivatives/contact_info.js +0 -260
- package/script/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
- package/script/src/models/contact/index.d.ts +0 -5
- package/script/src/models/contact/index.d.ts.map +0 -1
- package/script/src/models/contact/index.js +0 -20
- package/script/src/models/contact/schemas.d.ts +0 -66
- package/script/src/models/contact/schemas.d.ts.map +0 -1
- package/script/src/models/contact/schemas.js +0 -67
- package/script/src/models/contact/validation.d.ts +0 -37
- package/script/src/models/contact/validation.d.ts.map +0 -1
- package/script/src/models/contact/validation.js +0 -146
- package/script/src/models/contact/validation.test.d.ts.map +0 -1
- package/script/src/models/index.d.ts +0 -7
- package/script/src/models/index.d.ts.map +0 -1
- package/script/src/models/index.js +0 -22
- package/script/src/models/payout/api.d.ts +0 -29
- package/script/src/models/payout/api.d.ts.map +0 -1
- package/script/src/models/payout/api.js +0 -2
- package/script/src/models/payout/channel.d.ts +0 -58
- package/script/src/models/payout/channel.d.ts.map +0 -1
- package/script/src/models/payout/channel.js +0 -56
- package/script/src/models/payout/derivatives/payout.d.ts.map +0 -1
- package/script/src/models/payout/derivatives/payout.js +0 -265
- package/script/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
- package/script/src/models/payout/index.d.ts +0 -6
- package/script/src/models/payout/index.d.ts.map +0 -1
- package/script/src/models/payout/index.js +0 -21
- package/script/src/models/payout/schemas.d.ts +0 -156
- package/script/src/models/payout/schemas.d.ts.map +0 -1
- package/script/src/models/payout/schemas.js +0 -108
- package/script/src/models/payout/status.d.ts +0 -33
- package/script/src/models/payout/status.d.ts.map +0 -1
- package/script/src/models/payout/status.js +0 -37
- package/script/src/models/permission.d.ts +0 -55
- package/script/src/models/permission.d.ts.map +0 -1
- package/script/src/models/permission.js +0 -53
- package/script/src/models/role.d.ts.map +0 -1
- package/script/src/models/role.js +0 -77
- package/script/src/models/user/authenticated-user.d.ts +0 -77
- package/script/src/models/user/authenticated-user.d.ts.map +0 -1
- package/script/src/models/user/authenticated-user.js +0 -230
- package/script/src/models/user/index.d.ts +0 -4
- package/script/src/models/user/index.d.ts.map +0 -1
- package/script/src/models/user/index.js +0 -19
- package/script/src/models/user/managed-user.d.ts +0 -108
- package/script/src/models/user/managed-user.d.ts.map +0 -1
- package/script/src/models/user/managed-user.js +0 -260
- package/script/src/models/user/profile.d.ts.map +0 -1
- package/script/src/models/user/profile.js +0 -338
- package/script/src/models/wallet/index.d.ts +0 -4
- package/script/src/models/wallet/index.d.ts.map +0 -1
- package/script/src/models/wallet/index.js +0 -19
- package/script/src/models/wallet/schemas.d.ts +0 -95
- package/script/src/models/wallet/schemas.d.ts.map +0 -1
- package/script/src/models/wallet/schemas.js +0 -38
- package/script/src/models/wallet/statement_entry.d.ts +0 -160
- package/script/src/models/wallet/statement_entry.d.ts.map +0 -1
- package/script/src/models/wallet/statement_entry.js +0 -259
- package/script/src/models/wallet/wallet.d.ts.map +0 -1
- package/script/src/models/wallet/wallet.js +0 -283
- package/script/src/shared/base_repository.d.ts +0 -80
- package/script/src/shared/base_repository.d.ts.map +0 -1
- package/script/src/shared/base_repository.js +0 -157
- package/script/src/shared/common_responses.d.ts.map +0 -1
- package/script/src/shared/common_responses.js +0 -13
- package/script/src/shared/index.d.ts +0 -3
- package/script/src/shared/index.d.ts.map +0 -1
- package/script/src/shared/index.js +0 -18
- package/script/src/shared/token_required_repository.d.ts +0 -78
- package/script/src/shared/token_required_repository.d.ts.map +0 -1
- package/script/src/shared/token_required_repository.js +0 -132
package/{script/src/models/contact/derivatives/contact.d.ts → dist/models/contact.model.d.ts}
RENAMED
|
@@ -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,10 @@
|
|
|
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";
|
|
@@ -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
|
|
@@ -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,21 +41,21 @@ 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
|
/** Current approval status of the payout */
|
|
55
|
-
get approvalStatus():
|
|
54
|
+
get approvalStatus(): PayoutApprovalStatus | undefined | null;
|
|
56
55
|
/** Information about who created the payout */
|
|
57
|
-
get createdBy():
|
|
56
|
+
get createdBy(): PayoutAuthorizer | undefined | null;
|
|
58
57
|
/** Information about who last actioned the payout */
|
|
59
|
-
get actionedBy():
|
|
58
|
+
get actionedBy(): PayoutAuthorizer | undefined | null;
|
|
60
59
|
/**
|
|
61
60
|
* Constructs contact information based on payout channel
|
|
62
61
|
*
|
|
@@ -69,7 +68,7 @@ export declare class Payout {
|
|
|
69
68
|
* For bank payouts, expects msisdn in format "SWIFTCODE:ACCOUNTNUMBER"
|
|
70
69
|
*
|
|
71
70
|
* @example
|
|
72
|
-
*
|
|
71
|
+
* ``
|
|
73
72
|
* // Mobile payout
|
|
74
73
|
* payout.contactInfo // Returns MobileContactInfo with phone details
|
|
75
74
|
*
|
|
@@ -82,17 +81,17 @@ export declare class Payout {
|
|
|
82
81
|
* Creates a Payout instance from raw data
|
|
83
82
|
* @throws {ZodError} if validation fails
|
|
84
83
|
*/
|
|
85
|
-
static create(data:
|
|
84
|
+
static create(data: PayoutDTO): Payout;
|
|
86
85
|
/**
|
|
87
86
|
* Creates multiple Payout instances from an array of raw data
|
|
88
87
|
* @throws {ZodError} if validation fails for any item
|
|
89
88
|
*/
|
|
90
|
-
static createMany(dataArray:
|
|
89
|
+
static createMany(dataArray: PayoutDTO[]): Payout[];
|
|
91
90
|
/**
|
|
92
91
|
* Creates a Payout instance from raw data without throwing
|
|
93
92
|
* @returns {Payout | null} Payout instance or null if validation fails
|
|
94
93
|
*/
|
|
95
|
-
static createSafe(data:
|
|
94
|
+
static createSafe(data: PayoutDTO): Payout | null;
|
|
96
95
|
/**
|
|
97
96
|
* Checks if an unknown value contains valid data to construct a Payout instance.
|
|
98
97
|
* This is useful when validating raw data structures before instantiation.
|
|
@@ -151,6 +150,5 @@ export declare class Payout {
|
|
|
151
150
|
/**
|
|
152
151
|
* Converts Payout instance to a plain object
|
|
153
152
|
*/
|
|
154
|
-
toJSON():
|
|
153
|
+
toJSON(): PayoutDTO;
|
|
155
154
|
}
|
|
156
|
-
//# 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
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { WalletStatementEntryDTO } from "@/features/wallet/wallet.dtos";
|
|
2
|
+
import { Amount, AmountJson } from "@temboplus/frontend-core";
|
|
3
|
+
/**
|
|
4
|
+
* Interface for the JSON representation of WalletStatementEntry
|
|
5
|
+
*/
|
|
6
|
+
export interface WalletStatementEntryJson {
|
|
7
|
+
accountNo?: string;
|
|
8
|
+
debitOrCredit: string;
|
|
9
|
+
tranRefNo: string;
|
|
10
|
+
narration: string;
|
|
11
|
+
txnDate: string;
|
|
12
|
+
valueDate: string;
|
|
13
|
+
amountCredited: AmountJson;
|
|
14
|
+
amountDebited: AmountJson;
|
|
15
|
+
balance: AmountJson;
|
|
16
|
+
currencyCode: string;
|
|
17
|
+
version?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Represents a single entry in a Wallet's statement history.
|
|
21
|
+
*
|
|
22
|
+
* This class provides methods for creating, validating, and accessing statement entry data.
|
|
23
|
+
* It integrates with the Zod schema validation for data integrity.
|
|
24
|
+
*/
|
|
25
|
+
export declare class WalletStatementEntry {
|
|
26
|
+
private _accountNo?;
|
|
27
|
+
private _debitOrCredit;
|
|
28
|
+
private _tranRefNo;
|
|
29
|
+
private _narration;
|
|
30
|
+
private _txnDate;
|
|
31
|
+
private _valueDate;
|
|
32
|
+
private _amountCredited;
|
|
33
|
+
private _amountDebited;
|
|
34
|
+
private _balance;
|
|
35
|
+
private _currencyCode;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the statement entry schema used for validation.
|
|
38
|
+
*/
|
|
39
|
+
static get schema(): import("zod").ZodObject<{
|
|
40
|
+
accountNo: import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, string | undefined, string | undefined>;
|
|
41
|
+
debitOrCredit: import("zod").ZodString;
|
|
42
|
+
tranRefNo: import("zod").ZodString;
|
|
43
|
+
narration: import("zod").ZodString;
|
|
44
|
+
txnDate: import("zod").ZodDate;
|
|
45
|
+
valueDate: import("zod").ZodDate;
|
|
46
|
+
amountCredited: import("zod").ZodNumber;
|
|
47
|
+
amountDebited: import("zod").ZodNumber;
|
|
48
|
+
balance: import("zod").ZodNumber;
|
|
49
|
+
currencyCode: import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodOptional<import("zod").ZodString>, string | undefined, string | undefined>>;
|
|
50
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
51
|
+
currencyCode: string;
|
|
52
|
+
debitOrCredit: string;
|
|
53
|
+
tranRefNo: string;
|
|
54
|
+
narration: string;
|
|
55
|
+
txnDate: Date;
|
|
56
|
+
valueDate: Date;
|
|
57
|
+
amountCredited: number;
|
|
58
|
+
amountDebited: number;
|
|
59
|
+
balance: number;
|
|
60
|
+
accountNo?: string | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
debitOrCredit: string;
|
|
63
|
+
tranRefNo: string;
|
|
64
|
+
narration: string;
|
|
65
|
+
txnDate: Date;
|
|
66
|
+
valueDate: Date;
|
|
67
|
+
amountCredited: number;
|
|
68
|
+
amountDebited: number;
|
|
69
|
+
balance: number;
|
|
70
|
+
accountNo?: string | undefined;
|
|
71
|
+
currencyCode?: string | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
/**
|
|
74
|
+
* Private constructor to enforce use of static factory methods.
|
|
75
|
+
* Assumes data is already validated and dates are Date objects.
|
|
76
|
+
* @param data - Object containing statement entry information conforming to WalletStatementEntryDTO.
|
|
77
|
+
*/
|
|
78
|
+
private constructor();
|
|
79
|
+
/**
|
|
80
|
+
* Creates a new WalletStatementEntry instance after validating the input data.
|
|
81
|
+
* Handles date coercion via the schema and uses currencyCode from the data.
|
|
82
|
+
*
|
|
83
|
+
* @param data - Object containing statement entry information. Dates can be strings or Date objects.
|
|
84
|
+
* @returns A new WalletStatementEntry instance, or undefined if validation fails.
|
|
85
|
+
*/
|
|
86
|
+
static create(data: {
|
|
87
|
+
accountNo?: string | null;
|
|
88
|
+
debitOrCredit: string;
|
|
89
|
+
tranRefNo: string;
|
|
90
|
+
narration: string;
|
|
91
|
+
txnDate: string | Date;
|
|
92
|
+
valueDate: string | Date;
|
|
93
|
+
amountCredited: number;
|
|
94
|
+
amountDebited: number;
|
|
95
|
+
balance: number;
|
|
96
|
+
currencyCode?: string;
|
|
97
|
+
}): WalletStatementEntry | undefined;
|
|
98
|
+
get accountNo(): string | undefined;
|
|
99
|
+
get debitOrCredit(): string;
|
|
100
|
+
get tranRefNo(): string;
|
|
101
|
+
get narration(): string;
|
|
102
|
+
get txnDate(): Date;
|
|
103
|
+
get valueDate(): Date;
|
|
104
|
+
get amountCredited(): Amount;
|
|
105
|
+
get amountDebited(): Amount;
|
|
106
|
+
get balance(): Amount;
|
|
107
|
+
get currencyCode(): string;
|
|
108
|
+
/**
|
|
109
|
+
* Serializes the WalletStatementEntry instance to a JSON-compatible object.
|
|
110
|
+
* Dates are converted to ISO strings, amounts are serialized using Amount.toJson().
|
|
111
|
+
*
|
|
112
|
+
* @returns {WalletStatementEntryJson} A plain object containing all necessary data
|
|
113
|
+
*/
|
|
114
|
+
toJson(): WalletStatementEntryJson;
|
|
115
|
+
/**
|
|
116
|
+
* Creates a WalletStatementEntry instance from a JSON-compatible object.
|
|
117
|
+
*
|
|
118
|
+
* @param {WalletStatementEntryJson | string} json - Either a WalletStatementEntryJson object or a JSON string
|
|
119
|
+
* @returns {WalletStatementEntry | undefined} A WalletStatementEntry instance if valid, undefined otherwise
|
|
120
|
+
*/
|
|
121
|
+
static fromJson(json: WalletStatementEntryJson | string): WalletStatementEntry | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Type guard to check if an object is a valid WalletStatementEntryJson
|
|
124
|
+
*
|
|
125
|
+
* @param obj - The object to validate
|
|
126
|
+
* @returns True if the object conforms to WalletStatementEntryJson structure
|
|
127
|
+
*/
|
|
128
|
+
static isWalletStatementEntryJson(obj: unknown): obj is WalletStatementEntryJson;
|
|
129
|
+
/**
|
|
130
|
+
* Validates the current statement entry instance data against the schema.
|
|
131
|
+
* @returns True if the statement entry instance data is valid, false otherwise.
|
|
132
|
+
*/
|
|
133
|
+
validate(): boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Type guard to check if an unknown object is a valid WalletStatementEntry instance.
|
|
136
|
+
* Performs structural checks (duck typing).
|
|
137
|
+
* @param obj - The object to check.
|
|
138
|
+
* @returns Type predicate indicating if the object is a WalletStatementEntry instance.
|
|
139
|
+
*/
|
|
140
|
+
static is(obj: unknown): obj is WalletStatementEntry;
|
|
141
|
+
/**
|
|
142
|
+
* Checks if two WalletStatementEntry instances are equal based on their transaction reference numbers.
|
|
143
|
+
* @param other - Another WalletStatementEntry to compare with.
|
|
144
|
+
* @returns True if both entries have the same transaction reference number.
|
|
145
|
+
*/
|
|
146
|
+
equals(other: WalletStatementEntry): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Creates a copy of this WalletStatementEntry with the same data.
|
|
149
|
+
* @returns A new WalletStatementEntry instance with identical data.
|
|
150
|
+
*/
|
|
151
|
+
clone(): WalletStatementEntry | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Returns a string representation of the statement entry for debugging.
|
|
154
|
+
* @returns A formatted string with key transaction details.
|
|
155
|
+
*/
|
|
156
|
+
toString(): string;
|
|
157
|
+
/**
|
|
158
|
+
* Serializes an array of WalletStatementEntry instances to JSON-compatible objects
|
|
159
|
+
*
|
|
160
|
+
* @param entries - Array of WalletStatementEntry instances to serialize
|
|
161
|
+
* @returns Array of WalletStatementEntryJson objects
|
|
162
|
+
*/
|
|
163
|
+
static toJsonArray(entries: WalletStatementEntry[]): WalletStatementEntryJson[];
|
|
164
|
+
/**
|
|
165
|
+
* Creates WalletStatementEntry instances from an array of JSON-compatible objects
|
|
166
|
+
*
|
|
167
|
+
* @param jsonArray - Array of WalletStatementEntryJson objects or JSON string
|
|
168
|
+
* @returns Array of WalletStatementEntry instances (invalid items are filtered out)
|
|
169
|
+
*/
|
|
170
|
+
static fromJsonArray(jsonArray: WalletStatementEntryJson[] | string): WalletStatementEntry[];
|
|
171
|
+
/**
|
|
172
|
+
* Legacy method for backwards compatibility - creates object representation
|
|
173
|
+
* @deprecated Use toJson() instead for proper serialization
|
|
174
|
+
*/
|
|
175
|
+
toObject(): Omit<WalletStatementEntryDTO, "amountCredited" | "amountDebited" | "balance"> & {
|
|
176
|
+
amountCredited: AmountJson;
|
|
177
|
+
amountDebited: AmountJson;
|
|
178
|
+
balance: AmountJson;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Legacy method for backwards compatibility - converts to JSON string
|
|
182
|
+
* @deprecated Use JSON.stringify(entry.toJson()) instead
|
|
183
|
+
*/
|
|
184
|
+
toJSON(): string;
|
|
185
|
+
/**
|
|
186
|
+
* Legacy method for backwards compatibility
|
|
187
|
+
* @deprecated Use fromJson() instead
|
|
188
|
+
*/
|
|
189
|
+
static fromJSON(jsonString: string): WalletStatementEntry | undefined;
|
|
190
|
+
/**
|
|
191
|
+
* Legacy method for backwards compatibility - creates from plain object
|
|
192
|
+
* @deprecated Use fromJson() for serialized data or create() for raw data
|
|
193
|
+
*/
|
|
194
|
+
static from(data: any): WalletStatementEntry | undefined;
|
|
195
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Profile } from "./profile.
|
|
1
|
+
import { Profile } from "./profile.model";
|
|
2
2
|
/**
|
|
3
3
|
* Represents a user in Afloat.
|
|
4
4
|
*
|
|
@@ -74,4 +74,3 @@ export declare class User {
|
|
|
74
74
|
*/
|
|
75
75
|
static from(data: any): User | undefined;
|
|
76
76
|
}
|
|
77
|
-
//# sourceMappingURL=authenticated-user.d.ts.map
|
|
@@ -1,46 +1,5 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
import { type CurrencyCode, type ISO2CountryCode } from "@temboplus/frontend-core";
|
|
3
|
-
|
|
4
|
-
* Zod schema definition for validating Wallet data structures.
|
|
5
|
-
* Ensures data integrity for wallet objects, including runtime validation
|
|
6
|
-
* of country codes against the imported ISO2CountryCodesSet.
|
|
7
|
-
*/
|
|
8
|
-
declare const walletSchema: z.ZodObject<{
|
|
9
|
-
id: z.ZodString;
|
|
10
|
-
profileId: z.ZodString;
|
|
11
|
-
accountNo: z.ZodString;
|
|
12
|
-
accountName: z.ZodString;
|
|
13
|
-
channel: z.ZodString;
|
|
14
|
-
countryCode: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
15
|
-
currencyCode: z.ZodEffects<z.ZodDefault<z.ZodString>, string, string | undefined>;
|
|
16
|
-
createdAt: z.ZodString;
|
|
17
|
-
updatedAt: z.ZodString;
|
|
18
|
-
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
id: string;
|
|
20
|
-
accountNo: string;
|
|
21
|
-
channel: string;
|
|
22
|
-
profileId: string;
|
|
23
|
-
createdAt: string;
|
|
24
|
-
updatedAt: string;
|
|
25
|
-
accountName: string;
|
|
26
|
-
countryCode: string;
|
|
27
|
-
currencyCode: string;
|
|
28
|
-
}, {
|
|
29
|
-
id: string;
|
|
30
|
-
accountNo: string;
|
|
31
|
-
channel: string;
|
|
32
|
-
profileId: string;
|
|
33
|
-
createdAt: string;
|
|
34
|
-
updatedAt: string;
|
|
35
|
-
accountName: string;
|
|
36
|
-
countryCode?: string | undefined;
|
|
37
|
-
currencyCode?: string | undefined;
|
|
38
|
-
}>;
|
|
39
|
-
/**
|
|
40
|
-
* TypeScript type representing the validated data structure for a Wallet.
|
|
41
|
-
* Derived from the walletSchema. Note: countryCode is inferred as string.
|
|
42
|
-
*/
|
|
43
|
-
type WalletDataType = z.infer<typeof walletSchema>;
|
|
2
|
+
import { WalletDTO, WalletDTOSchemas } from "@/features/wallet/wallet.dtos";
|
|
44
3
|
/**
|
|
45
4
|
* Represents a digital Wallet entity.
|
|
46
5
|
*
|
|
@@ -61,7 +20,7 @@ export declare class Wallet {
|
|
|
61
20
|
* Retrieves the Zod schema used for Wallet validation.
|
|
62
21
|
* @returns The Zod schema object for Wallet.
|
|
63
22
|
*/
|
|
64
|
-
static get schema(): typeof
|
|
23
|
+
static get schema(): typeof WalletDTOSchemas.walletDTO;
|
|
65
24
|
/**
|
|
66
25
|
* Private constructor enforces instantiation via static factory methods.
|
|
67
26
|
* @param data - The validated wallet data object (countryCode is string).
|
|
@@ -109,7 +68,7 @@ export declare class Wallet {
|
|
|
109
68
|
* Suitable for serialization or validation.
|
|
110
69
|
* @returns A plain object conforming to the WalletDataType structure.
|
|
111
70
|
*/
|
|
112
|
-
toObject():
|
|
71
|
+
toObject(): WalletDTO;
|
|
113
72
|
/**
|
|
114
73
|
* Serializes the Wallet instance into a JSON string.
|
|
115
74
|
* @returns A JSON string representation of the wallet data.
|
|
@@ -143,5 +102,3 @@ export declare class Wallet {
|
|
|
143
102
|
*/
|
|
144
103
|
static is(obj: unknown): obj is Wallet;
|
|
145
104
|
}
|
|
146
|
-
export {};
|
|
147
|
-
//# sourceMappingURL=wallet.d.ts.map
|