@temboplus/afloat 0.1.60 → 0.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +246 -42
- package/{esm/src/features/admin/contract.d.ts → dist/features/admin/admin.contract.d.ts} +41 -77
- package/{script/npm/src/src/features/admin/schemas.d.ts → dist/features/admin/admin.dtos.d.ts} +8 -9
- package/dist/features/admin/admin.repository.d.ts +179 -0
- package/dist/features/admin/index.d.ts +2 -0
- package/{esm/src/features/auth/access/contract.d.ts → dist/features/auth/access/access.api-contract.d.ts} +0 -1
- package/dist/features/auth/access/access.repository.d.ts +55 -0
- package/{esm/src/features/auth/contract.d.ts → dist/features/auth/auth.contract.d.ts} +12 -8
- package/dist/features/auth/auth.manager.d.ts +249 -0
- package/dist/features/auth/auth.repository.d.ts +66 -0
- package/dist/features/auth/auth.store.d.ts +139 -0
- package/{script/npm/src/src/features/auth/identity/contract.d.ts → dist/features/auth/identity/identity.api-contract.d.ts} +0 -1
- package/dist/features/auth/identity/identity.repository.d.ts +58 -0
- package/dist/features/auth/index.d.ts +5 -0
- package/{script/npm/src/src/features/auth/profile/contract.d.ts → dist/features/auth/profile/profile.api-contract.d.ts} +8 -6
- package/dist/features/auth/profile/profile.dtos.d.ts +80 -0
- package/dist/features/auth/profile/profile.repository.d.ts +56 -0
- package/{script/npm/src/src/features/auth/storage/client_store.d.ts → dist/features/auth/storage/client-store.d.ts} +2 -3
- package/{esm/src/features/auth/storage/client_token_handler.d.ts → dist/features/auth/storage/client-token-handler.d.ts} +1 -2
- package/{script/npm/src/src → dist}/features/auth/storage/types.d.ts +1 -2
- package/dist/features/contact/contact-input-handler.d.ts +16 -0
- package/{esm/src/features/contact/contract.d.ts → dist/features/contact/contact.api-contract.d.ts} +101 -45
- package/dist/features/contact/contact.dtos.d.ts +90 -0
- package/dist/features/contact/contact.repository.d.ts +116 -0
- package/dist/features/contact/index.d.ts +2 -0
- package/dist/features/payout/index.d.ts +3 -0
- package/dist/features/payout/payout-channel-handler.d.ts +108 -0
- package/{esm/src/features/payout/contract.d.ts → dist/features/payout/payout.api-contract.d.ts} +351 -187
- package/dist/features/payout/payout.dtos.d.ts +365 -0
- package/dist/features/payout/payout.repository.d.ts +193 -0
- package/dist/features/wallet/index.d.ts +4 -0
- package/dist/features/wallet/wallet-manager.session.d.ts +143 -0
- package/{script/npm/src/src/features/wallet/contract.d.ts → dist/features/wallet/wallet.contract.d.ts} +9 -7
- package/dist/features/wallet/wallet.dtos.d.ts +204 -0
- package/dist/features/wallet/wallet.repository.d.ts +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/npm/src/src/shared/common_responses.d.ts → dist/lib/api/common-responses.d.ts} +0 -1
- package/dist/lib/api/index.d.ts +2 -0
- package/{esm/src/errors/api_error.d.ts → dist/lib/error/error.api.d.ts} +0 -1
- package/{script/npm/src/src/errors/permission_error.d.ts → dist/lib/error/error.permission.d.ts} +1 -2
- package/dist/lib/error/error.utils.d.ts +22 -0
- package/dist/lib/error/index.d.ts +3 -0
- package/dist/models/contact-info.model.d.ts +817 -0
- package/{script/npm/src/src/models/contact/derivatives/contact.d.ts → dist/models/contact.model.d.ts} +23 -16
- package/dist/models/index.d.ts +11 -0
- package/{esm/src/models/user/managed-user.d.ts → dist/models/managed-user.model.d.ts} +3 -3
- package/dist/models/narration.model.d.ts +184 -0
- package/{script/npm/src/src/models/payout/derivatives/payout.d.ts → dist/models/payout.model.d.ts} +13 -17
- package/{esm/src → dist}/models/permission.d.ts +1 -2
- package/{script/npm/src/src/models/user/profile.d.ts → dist/models/profile.model.d.ts} +37 -43
- package/{script/npm/src/src/models/role.d.ts → dist/models/role.model.d.ts} +2 -10
- package/dist/models/statement-entry.model.d.ts +248 -0
- package/dist/models/user.model.d.ts +65 -0
- package/{script/npm/src/src/models/wallet/wallet.d.ts → dist/models/wallet.model.d.ts} +3 -46
- package/package.json +47 -25
- 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/access/repository.d.ts +0 -11
- package/esm/src/features/auth/access/repository.d.ts.map +0 -1
- package/esm/src/features/auth/access/repository.js +0 -25
- package/esm/src/features/auth/contract.d.ts.map +0 -1
- package/esm/src/features/auth/contract.js +0 -43
- package/esm/src/features/auth/identity/contract.d.ts +0 -23
- package/esm/src/features/auth/identity/contract.d.ts.map +0 -1
- package/esm/src/features/auth/identity/contract.js +0 -17
- package/esm/src/features/auth/identity/repository.d.ts +0 -22
- package/esm/src/features/auth/identity/repository.d.ts.map +0 -1
- package/esm/src/features/auth/identity/repository.js +0 -30
- package/esm/src/features/auth/index.d.ts +0 -6
- package/esm/src/features/auth/index.d.ts.map +0 -1
- package/esm/src/features/auth/index.js +0 -5
- package/esm/src/features/auth/manager.d.ts +0 -105
- package/esm/src/features/auth/manager.d.ts.map +0 -1
- package/esm/src/features/auth/manager.js +0 -181
- package/esm/src/features/auth/profile/contract.d.ts +0 -37
- package/esm/src/features/auth/profile/contract.d.ts.map +0 -1
- package/esm/src/features/auth/profile/contract.js +0 -14
- package/esm/src/features/auth/profile/repository.d.ts +0 -11
- package/esm/src/features/auth/profile/repository.d.ts.map +0 -1
- package/esm/src/features/auth/profile/repository.js +0 -25
- package/esm/src/features/auth/repository.d.ts +0 -30
- package/esm/src/features/auth/repository.d.ts.map +0 -1
- package/esm/src/features/auth/repository.js +0 -69
- package/esm/src/features/auth/storage/client_store.d.ts +0 -30
- package/esm/src/features/auth/storage/client_store.d.ts.map +0 -1
- package/esm/src/features/auth/storage/client_store.js +0 -46
- package/esm/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
- package/esm/src/features/auth/storage/client_token_handler.js +0 -36
- package/esm/src/features/auth/storage/server_store.d.ts +0 -24
- package/esm/src/features/auth/storage/server_store.d.ts.map +0 -1
- package/esm/src/features/auth/storage/server_store.js +0 -34
- package/esm/src/features/auth/storage/server_token_handler.d.ts +0 -36
- package/esm/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
- package/esm/src/features/auth/storage/server_token_handler.js +0 -115
- package/esm/src/features/auth/storage/types.d.ts +0 -42
- package/esm/src/features/auth/storage/types.d.ts.map +0 -1
- package/esm/src/features/auth/storage/types.js +0 -1
- package/esm/src/features/contact/contract.d.ts.map +0 -1
- package/esm/src/features/contact/contract.js +0 -49
- package/esm/src/features/contact/index.d.ts +0 -2
- package/esm/src/features/contact/index.d.ts.map +0 -1
- package/esm/src/features/contact/index.js +0 -1
- package/esm/src/features/contact/repository.d.ts +0 -58
- package/esm/src/features/contact/repository.d.ts.map +0 -1
- package/esm/src/features/contact/repository.js +0 -108
- package/esm/src/features/payout/contract.d.ts.map +0 -1
- package/esm/src/features/payout/contract.js +0 -75
- package/esm/src/features/payout/index.d.ts +0 -2
- package/esm/src/features/payout/index.d.ts.map +0 -1
- package/esm/src/features/payout/index.js +0 -1
- package/esm/src/features/payout/repository.d.ts +0 -67
- package/esm/src/features/payout/repository.d.ts.map +0 -1
- package/esm/src/features/payout/repository.js +0 -163
- package/esm/src/features/wallet/contract.d.ts +0 -137
- package/esm/src/features/wallet/contract.d.ts.map +0 -1
- package/esm/src/features/wallet/contract.js +0 -38
- package/esm/src/features/wallet/index.d.ts +0 -2
- package/esm/src/features/wallet/index.d.ts.map +0 -1
- package/esm/src/features/wallet/index.js +0 -1
- package/esm/src/features/wallet/repository.d.ts +0 -57
- package/esm/src/features/wallet/repository.d.ts.map +0 -1
- package/esm/src/features/wallet/repository.js +0 -93
- package/esm/src/models/contact/derivatives/contact.d.ts +0 -172
- package/esm/src/models/contact/derivatives/contact.d.ts.map +0 -1
- package/esm/src/models/contact/derivatives/contact.js +0 -266
- package/esm/src/models/contact/derivatives/contact.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 -146
- 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 -158
- package/esm/src/models/payout/derivatives/payout.d.ts.map +0 -1
- package/esm/src/models/payout/derivatives/payout.js +0 -265
- package/esm/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
- package/esm/src/models/payout/index.d.ts +0 -7
- package/esm/src/models/payout/index.d.ts.map +0 -1
- package/esm/src/models/payout/index.js +0 -6
- package/esm/src/models/payout/narration.d.ts +0 -164
- package/esm/src/models/payout/narration.d.ts.map +0 -1
- package/esm/src/models/payout/narration.js +0 -308
- package/esm/src/models/payout/schemas.d.ts +0 -156
- package/esm/src/models/payout/schemas.d.ts.map +0 -1
- package/esm/src/models/payout/schemas.js +0 -105
- package/esm/src/models/payout/status.d.ts +0 -33
- package/esm/src/models/payout/status.d.ts.map +0 -1
- package/esm/src/models/payout/status.js +0 -34
- package/esm/src/models/permission.d.ts.map +0 -1
- package/esm/src/models/permission.js +0 -50
- package/esm/src/models/role.d.ts +0 -21
- package/esm/src/models/role.d.ts.map +0 -1
- package/esm/src/models/role.js +0 -73
- package/esm/src/models/user/authenticated-user.d.ts +0 -77
- package/esm/src/models/user/authenticated-user.d.ts.map +0 -1
- package/esm/src/models/user/authenticated-user.js +0 -226
- package/esm/src/models/user/index.d.ts +0 -4
- package/esm/src/models/user/index.d.ts.map +0 -1
- package/esm/src/models/user/index.js +0 -3
- package/esm/src/models/user/managed-user.d.ts.map +0 -1
- package/esm/src/models/user/managed-user.js +0 -255
- package/esm/src/models/user/profile.d.ts +0 -161
- package/esm/src/models/user/profile.d.ts.map +0 -1
- package/esm/src/models/user/profile.js +0 -334
- package/esm/src/models/wallet/index.d.ts +0 -4
- package/esm/src/models/wallet/index.d.ts.map +0 -1
- package/esm/src/models/wallet/index.js +0 -3
- package/esm/src/models/wallet/schemas.d.ts +0 -95
- package/esm/src/models/wallet/schemas.d.ts.map +0 -1
- package/esm/src/models/wallet/schemas.js +0 -35
- package/esm/src/models/wallet/statement_entry.d.ts +0 -160
- package/esm/src/models/wallet/statement_entry.d.ts.map +0 -1
- package/esm/src/models/wallet/statement_entry.js +0 -255
- package/esm/src/models/wallet/wallet.d.ts +0 -147
- package/esm/src/models/wallet/wallet.d.ts.map +0 -1
- package/esm/src/models/wallet/wallet.js +0 -279
- package/esm/src/shared/base_repository.d.ts.map +0 -1
- package/esm/src/shared/base_repository.js +0 -153
- package/esm/src/shared/common_responses.d.ts +0 -13
- package/esm/src/shared/common_responses.d.ts.map +0 -1
- package/esm/src/shared/common_responses.js +0 -10
- package/esm/src/shared/index.d.ts +0 -3
- package/esm/src/shared/index.d.ts.map +0 -1
- package/esm/src/shared/index.js +0 -2
- package/esm/src/shared/token_required_repository.d.ts +0 -78
- package/esm/src/shared/token_required_repository.d.ts.map +0 -1
- package/esm/src/shared/token_required_repository.js +0 -128
- package/script/mod.d.ts +0 -8
- package/script/mod.d.ts.map +0 -1
- package/script/mod.js +0 -23
- package/script/npm/src/_dnt.test_shims.d.ts +0 -6
- package/script/npm/src/_dnt.test_shims.d.ts.map +0 -1
- package/script/npm/src/_dnt.test_shims.js +0 -65
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.js +0 -49
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts +0 -24
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.js +0 -49
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts +0 -16
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.js +0 -25
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts +0 -26
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.js +0 -34
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts +0 -17
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.js +0 -209
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts +0 -35
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.js +0 -61
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.js +0 -30
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts +0 -15
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.js +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.js +0 -25
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.js +0 -55
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts +0 -25
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.js +0 -56
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts +0 -19
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.js +0 -31
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.js +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts +0 -44
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.js +0 -61
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts +0 -21
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.js +0 -36
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.js +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.js +0 -35
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.js +0 -163
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts +0 -42
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.js +0 -56
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts +0 -24
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.js +0 -60
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.js +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts +0 -45
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.js +0 -47
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts +0 -15
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.js +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts +0 -15
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.js +0 -23
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -115
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -283
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -185
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.js +0 -63
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -242
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
- package/script/npm/src/mod.d.ts +0 -8
- package/script/npm/src/mod.d.ts.map +0 -1
- package/script/npm/src/mod.js +0 -23
- package/script/npm/src/src/errors/api_error.d.ts +0 -63
- package/script/npm/src/src/errors/api_error.d.ts.map +0 -1
- package/script/npm/src/src/errors/api_error.js +0 -94
- package/script/npm/src/src/errors/index.d.ts +0 -3
- package/script/npm/src/src/errors/index.d.ts.map +0 -1
- package/script/npm/src/src/errors/index.js +0 -18
- package/script/npm/src/src/errors/permission_error.d.ts.map +0 -1
- package/script/npm/src/src/errors/permission_error.js +0 -74
- package/script/npm/src/src/features/admin/contract.d.ts +0 -842
- package/script/npm/src/src/features/admin/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/admin/contract.js +0 -213
- package/script/npm/src/src/features/admin/index.d.ts +0 -4
- package/script/npm/src/src/features/admin/index.d.ts.map +0 -1
- package/script/npm/src/src/features/admin/index.js +0 -19
- package/script/npm/src/src/features/admin/repository.d.ts +0 -114
- package/script/npm/src/src/features/admin/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/admin/repository.js +0 -252
- package/script/npm/src/src/features/admin/schemas.d.ts.map +0 -1
- package/script/npm/src/src/features/admin/schemas.js +0 -209
- package/script/npm/src/src/features/auth/access/contract.d.ts +0 -14
- package/script/npm/src/src/features/auth/access/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/access/contract.js +0 -17
- package/script/npm/src/src/features/auth/access/repository.d.ts +0 -11
- package/script/npm/src/src/features/auth/access/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/access/repository.js +0 -29
- package/script/npm/src/src/features/auth/contract.d.ts +0 -112
- package/script/npm/src/src/features/auth/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/contract.js +0 -46
- package/script/npm/src/src/features/auth/identity/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/identity/contract.js +0 -20
- package/script/npm/src/src/features/auth/identity/repository.d.ts +0 -22
- package/script/npm/src/src/features/auth/identity/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/identity/repository.js +0 -34
- package/script/npm/src/src/features/auth/index.d.ts +0 -6
- package/script/npm/src/src/features/auth/index.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/index.js +0 -21
- package/script/npm/src/src/features/auth/manager.d.ts +0 -105
- package/script/npm/src/src/features/auth/manager.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/manager.js +0 -185
- package/script/npm/src/src/features/auth/profile/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/profile/contract.js +0 -17
- package/script/npm/src/src/features/auth/profile/repository.d.ts +0 -11
- package/script/npm/src/src/features/auth/profile/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/profile/repository.js +0 -29
- package/script/npm/src/src/features/auth/repository.d.ts +0 -30
- package/script/npm/src/src/features/auth/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/repository.js +0 -73
- package/script/npm/src/src/features/auth/storage/client_store.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/storage/client_store.js +0 -51
- package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts +0 -32
- package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/storage/client_token_handler.js +0 -40
- package/script/npm/src/src/features/auth/storage/server_store.d.ts +0 -24
- package/script/npm/src/src/features/auth/storage/server_store.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/storage/server_store.js +0 -38
- package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts +0 -36
- package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/storage/server_token_handler.js +0 -119
- package/script/npm/src/src/features/auth/storage/types.d.ts.map +0 -1
- package/script/npm/src/src/features/auth/storage/types.js +0 -2
- package/script/npm/src/src/features/contact/contract.d.ts +0 -170
- package/script/npm/src/src/features/contact/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/contact/contract.js +0 -52
- package/script/npm/src/src/features/contact/index.d.ts +0 -2
- package/script/npm/src/src/features/contact/index.d.ts.map +0 -1
- package/script/npm/src/src/features/contact/index.js +0 -17
- package/script/npm/src/src/features/contact/repository.d.ts +0 -58
- package/script/npm/src/src/features/contact/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/contact/repository.js +0 -112
- package/script/npm/src/src/features/payout/contract.d.ts +0 -623
- package/script/npm/src/src/features/payout/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/payout/contract.js +0 -78
- package/script/npm/src/src/features/payout/index.d.ts +0 -2
- package/script/npm/src/src/features/payout/index.d.ts.map +0 -1
- package/script/npm/src/src/features/payout/index.js +0 -17
- package/script/npm/src/src/features/payout/repository.d.ts +0 -67
- package/script/npm/src/src/features/payout/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/payout/repository.js +0 -167
- package/script/npm/src/src/features/wallet/contract.d.ts.map +0 -1
- package/script/npm/src/src/features/wallet/contract.js +0 -41
- package/script/npm/src/src/features/wallet/index.d.ts +0 -2
- package/script/npm/src/src/features/wallet/index.d.ts.map +0 -1
- package/script/npm/src/src/features/wallet/index.js +0 -17
- package/script/npm/src/src/features/wallet/repository.d.ts +0 -57
- package/script/npm/src/src/features/wallet/repository.d.ts.map +0 -1
- package/script/npm/src/src/features/wallet/repository.js +0 -97
- package/script/npm/src/src/models/contact/derivatives/contact.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact.js +0 -270
- package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact.test.js +0 -64
- 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/derivatives/contact_info.test.d.ts +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.js +0 -331
- 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/contact/validation.test.d.ts +0 -2
- package/script/npm/src/src/models/contact/validation.test.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/validation.test.js +0 -186
- package/script/npm/src/src/models/index.d.ts +0 -7
- package/script/npm/src/src/models/index.d.ts.map +0 -1
- package/script/npm/src/src/models/index.js +0 -22
- package/script/npm/src/src/models/payout/api.d.ts +0 -29
- package/script/npm/src/src/models/payout/api.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/api.js +0 -2
- package/script/npm/src/src/models/payout/channel.d.ts +0 -58
- package/script/npm/src/src/models/payout/channel.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/channel.js +0 -56
- package/script/npm/src/src/models/payout/derivatives/payout.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/derivatives/payout.js +0 -269
- package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts +0 -1
- package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/derivatives/payout.test.js +0 -76
- package/script/npm/src/src/models/payout/index.d.ts +0 -7
- package/script/npm/src/src/models/payout/index.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/index.js +0 -22
- package/script/npm/src/src/models/payout/narration.d.ts +0 -164
- package/script/npm/src/src/models/payout/narration.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/narration.js +0 -312
- package/script/npm/src/src/models/payout/schemas.d.ts +0 -156
- package/script/npm/src/src/models/payout/schemas.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/schemas.js +0 -108
- package/script/npm/src/src/models/payout/status.d.ts +0 -33
- package/script/npm/src/src/models/payout/status.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/status.js +0 -37
- package/script/npm/src/src/models/permission.d.ts +0 -55
- package/script/npm/src/src/models/permission.d.ts.map +0 -1
- package/script/npm/src/src/models/permission.js +0 -53
- package/script/npm/src/src/models/role.d.ts.map +0 -1
- package/script/npm/src/src/models/role.js +0 -77
- package/script/npm/src/src/models/user/authenticated-user.d.ts +0 -77
- package/script/npm/src/src/models/user/authenticated-user.d.ts.map +0 -1
- package/script/npm/src/src/models/user/authenticated-user.js +0 -230
- package/script/npm/src/src/models/user/index.d.ts +0 -4
- package/script/npm/src/src/models/user/index.d.ts.map +0 -1
- package/script/npm/src/src/models/user/index.js +0 -19
- package/script/npm/src/src/models/user/managed-user.d.ts +0 -108
- package/script/npm/src/src/models/user/managed-user.d.ts.map +0 -1
- package/script/npm/src/src/models/user/managed-user.js +0 -260
- package/script/npm/src/src/models/user/profile.d.ts.map +0 -1
- package/script/npm/src/src/models/user/profile.js +0 -338
- package/script/npm/src/src/models/wallet/index.d.ts +0 -4
- package/script/npm/src/src/models/wallet/index.d.ts.map +0 -1
- package/script/npm/src/src/models/wallet/index.js +0 -19
- package/script/npm/src/src/models/wallet/schemas.d.ts +0 -95
- package/script/npm/src/src/models/wallet/schemas.d.ts.map +0 -1
- package/script/npm/src/src/models/wallet/schemas.js +0 -38
- package/script/npm/src/src/models/wallet/statement_entry.d.ts +0 -160
- package/script/npm/src/src/models/wallet/statement_entry.d.ts.map +0 -1
- package/script/npm/src/src/models/wallet/statement_entry.js +0 -259
- package/script/npm/src/src/models/wallet/wallet.d.ts.map +0 -1
- package/script/npm/src/src/models/wallet/wallet.js +0 -283
- package/script/npm/src/src/shared/base_repository.d.ts +0 -80
- package/script/npm/src/src/shared/base_repository.d.ts.map +0 -1
- package/script/npm/src/src/shared/base_repository.js +0 -157
- package/script/npm/src/src/shared/common_responses.d.ts.map +0 -1
- package/script/npm/src/src/shared/common_responses.js +0 -13
- package/script/npm/src/src/shared/index.d.ts +0 -3
- package/script/npm/src/src/shared/index.d.ts.map +0 -1
- package/script/npm/src/src/shared/index.js +0 -18
- package/script/npm/src/src/shared/token_required_repository.d.ts +0 -78
- package/script/npm/src/src/shared/token_required_repository.d.ts.map +0 -1
- package/script/npm/src/src/shared/token_required_repository.js +0 -132
- package/script/package.json +0 -3
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../../src/src/models/contact/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC;AAErE;;;;;;GAMG;AACH,KAAK,aAAa,GAAG,CAAC,CAAC,SAAS,CAAC;IAC/B,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;IACrB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;CACrC,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;AAyBvE;;;;;;GAMG;AACH,KAAK,QAAQ,GAAG,CAAC,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;IACrB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC;IAChB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC;IACrB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC;CACtB,CAAC,CAAC;AAmBH;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,cAAc;IACzB,0CAA0C;;IAE1C,0CAA0C;;IAE1C,uCAAuC;;CAExC,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContactSchemas = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
/**
|
|
6
|
-
* Schema for contact channel types.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* Currently supports two channel types:
|
|
10
|
-
* - "Bank": For traditional banking channels
|
|
11
|
-
* - "Mobile": For mobile money channels
|
|
12
|
-
*
|
|
13
|
-
* @see {@link ContactType} for the inferred type
|
|
14
|
-
*/
|
|
15
|
-
const contactTypeSchema = zod_1.z.enum([
|
|
16
|
-
"Bank",
|
|
17
|
-
"Mobile",
|
|
18
|
-
]);
|
|
19
|
-
/**
|
|
20
|
-
* Schema for validating contact input data.
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* Validates the following fields:
|
|
24
|
-
* - displayName: Non-empty string
|
|
25
|
-
* - accountNo: Non-empty string
|
|
26
|
-
* - channel: Non-empty string
|
|
27
|
-
* - type: Must be either "Bank" or "Mobile"
|
|
28
|
-
*/
|
|
29
|
-
const contactInputSchema = zod_1.z.object({
|
|
30
|
-
displayName: zod_1.z
|
|
31
|
-
.string()
|
|
32
|
-
.min(1, "Display name is required"),
|
|
33
|
-
accountNo: zod_1.z
|
|
34
|
-
.string()
|
|
35
|
-
.min(1, "Account number is required"),
|
|
36
|
-
channel: zod_1.z
|
|
37
|
-
.string()
|
|
38
|
-
.min(1, "Channel is required"),
|
|
39
|
-
type: contactTypeSchema,
|
|
40
|
-
});
|
|
41
|
-
/**
|
|
42
|
-
* Schema for complete contact records.
|
|
43
|
-
*
|
|
44
|
-
* @remarks
|
|
45
|
-
* Extends contactInputSchema with additional system fields:
|
|
46
|
-
* - id: Unique identifier
|
|
47
|
-
* - profileId: Associated profile ID
|
|
48
|
-
* - createdAt: Creation timestamp
|
|
49
|
-
* - updatedAt: Last update timestamp
|
|
50
|
-
*/
|
|
51
|
-
const contactSchema = zod_1.z.object({
|
|
52
|
-
id: zod_1.z.string().min(1, "Contact id is required"),
|
|
53
|
-
profileId: zod_1.z.string(),
|
|
54
|
-
createdAt: zod_1.z.coerce.date(),
|
|
55
|
-
updatedAt: zod_1.z.coerce.date(),
|
|
56
|
-
}).merge(contactInputSchema);
|
|
57
|
-
/**
|
|
58
|
-
* Collection of all contact-related schemas.
|
|
59
|
-
*/
|
|
60
|
-
exports.ContactSchemas = {
|
|
61
|
-
/** Schema for complete contact records */
|
|
62
|
-
contactData: contactSchema,
|
|
63
|
-
/** Schema for contact input validation */
|
|
64
|
-
contactInput: contactInputSchema,
|
|
65
|
-
/** Schema for contact channel types */
|
|
66
|
-
contactType: contactTypeSchema,
|
|
67
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { RuleObject } from "antd/es/form";
|
|
2
|
-
/**
|
|
3
|
-
* Regex pattern to validate account numbers.
|
|
4
|
-
* The account number must only contain letters and digits, between 6 and 20 characters long.
|
|
5
|
-
* @constant {RegExp}
|
|
6
|
-
*/
|
|
7
|
-
export declare const ACCOUNT_NUMBER_REGEX: RegExp;
|
|
8
|
-
/**
|
|
9
|
-
* Validator for account number field.
|
|
10
|
-
* Ensures the account number is between 8-12 digits and numeric.
|
|
11
|
-
* @param {RuleObject} _ The rule object for validation (used by validation framework).
|
|
12
|
-
* @param {string} value The value to validate.
|
|
13
|
-
* @throws Will throw an error if validation fails.
|
|
14
|
-
*/
|
|
15
|
-
export declare const ACC_NUMBER_VALIDATOR: (rule: RuleObject, value: string | null | undefined) => Promise<string | undefined>;
|
|
16
|
-
/**
|
|
17
|
-
* Validator for account name field.
|
|
18
|
-
* Ensures the account name is at least 3 characters long and contains only letters and spaces.
|
|
19
|
-
* @param {RuleObject} _ The rule object for validation (used by validation framework).
|
|
20
|
-
* @param {string} value The value to validate.
|
|
21
|
-
* @throws Will throw an error if validation fails.
|
|
22
|
-
*/
|
|
23
|
-
export declare const ACC_NAME_VALIDATOR: (rule: RuleObject, value: string) => Promise<string | undefined>;
|
|
24
|
-
/**
|
|
25
|
-
* Validates if the provided account name is valid.
|
|
26
|
-
* @param {string} [name] The account name to validate.
|
|
27
|
-
* @returns {boolean} `true` if valid, otherwise `false`.
|
|
28
|
-
*/
|
|
29
|
-
export declare const validateAccName: (name?: string) => boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Validates if the provided account number is valid.
|
|
32
|
-
* The account number must be numeric and between 8-12 digits.
|
|
33
|
-
* @param {string} [accountNumber] The account number to validate.
|
|
34
|
-
* @returns {boolean} `true` if valid, otherwise `false`.
|
|
35
|
-
*/
|
|
36
|
-
export declare const validateBankAccNo: (accountNumber?: string) => boolean;
|
|
37
|
-
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../../../src/src/models/contact/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAqC/C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAwB,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,SACzB,UAAU,SACT,MAAM,GAAG,IAAI,GAAG,SAAS,KAC/B,OAAO,CAAC,MAAM,GAAG,SAAS,CAkB5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,SACT,MAAM,KACZ,OAAO,CAAC,MAAM,GAAG,SAAS,CAoB5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,KAAG,OAI/C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,mBAAoB,MAAM,KAAG,OAU1D,CAAC"}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateBankAccNo = exports.validateAccName = exports.ACC_NAME_VALIDATOR = exports.ACC_NUMBER_VALIDATOR = exports.ACCOUNT_NUMBER_REGEX = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Regular expression to validate account names.
|
|
6
|
-
*
|
|
7
|
-
* Key Criteria:
|
|
8
|
-
* 1. The name must consist of at least two words separated by one or more spaces.
|
|
9
|
-
* 2. Each word can include alphabetic characters (a-z, A-Z) and special characters like
|
|
10
|
-
* hyphens (-), apostrophes ('), periods (.), and other Unicode letters.
|
|
11
|
-
* 3. Words can be single letters (e.g., "A", "B") or longer.
|
|
12
|
-
* 4. The entire name must contain at least two alphabetic characters total.
|
|
13
|
-
* 5. Allow additional whitespace between words but disallow trailing or leading spaces.
|
|
14
|
-
* 6. Supports names with special characters (e.g., "O'Connor", "St. John", "María-José")
|
|
15
|
-
*
|
|
16
|
-
* Examples of valid names:
|
|
17
|
-
* - "John Doe"
|
|
18
|
-
* - "John A Doe"
|
|
19
|
-
* - "A B"
|
|
20
|
-
* - "Anna-Marie Johnson"
|
|
21
|
-
* - "Jean-Luc Picard"
|
|
22
|
-
* - "Mary O'Connor"
|
|
23
|
-
* - "St. John Smith"
|
|
24
|
-
* - "María José"
|
|
25
|
-
* - "François d'Arc"
|
|
26
|
-
* - "J Smith"
|
|
27
|
-
* - "John D"
|
|
28
|
-
* - "A Martinez"
|
|
29
|
-
*
|
|
30
|
-
* Examples of invalid names:
|
|
31
|
-
* - "John" (only one word)
|
|
32
|
-
* - "A" (only one word, less than 2 letters total)
|
|
33
|
-
* - "John123 Doe" (contains numeric characters)
|
|
34
|
-
* - " John Doe " (leading or trailing spaces)
|
|
35
|
-
* - "- -" (no alphabetic characters)
|
|
36
|
-
*/
|
|
37
|
-
const ACCOUNT_NAME_REGEX = /^(?=.*\p{L}.*\p{L})[\p{L}]['\p{L}.-]*(?:\s+[\p{L}]['\p{L}.-]*)+$/u;
|
|
38
|
-
/**
|
|
39
|
-
* Regex pattern to validate account numbers.
|
|
40
|
-
* The account number must only contain letters and digits, between 6 and 20 characters long.
|
|
41
|
-
* @constant {RegExp}
|
|
42
|
-
*/
|
|
43
|
-
exports.ACCOUNT_NUMBER_REGEX = /^[a-zA-Z0-9]{6,20}$/; // Only letters and digits, 6-20 characters
|
|
44
|
-
/**
|
|
45
|
-
* Validator for account number field.
|
|
46
|
-
* Ensures the account number is between 8-12 digits and numeric.
|
|
47
|
-
* @param {RuleObject} _ The rule object for validation (used by validation framework).
|
|
48
|
-
* @param {string} value The value to validate.
|
|
49
|
-
* @throws Will throw an error if validation fails.
|
|
50
|
-
*/
|
|
51
|
-
const ACC_NUMBER_VALIDATOR = (rule, value) => {
|
|
52
|
-
const accNoString = value?.toString().trim();
|
|
53
|
-
// If field is empty/undefined/null
|
|
54
|
-
if (!accNoString) {
|
|
55
|
-
// Only throw if the field is required
|
|
56
|
-
if (rule.required) {
|
|
57
|
-
return Promise.reject(new Error("Account number is required."));
|
|
58
|
-
}
|
|
59
|
-
// If field is not required and empty, validation passes
|
|
60
|
-
return Promise.resolve(undefined);
|
|
61
|
-
}
|
|
62
|
-
const accNo = removeSpaces(accNoString);
|
|
63
|
-
const valid = (0, exports.validateBankAccNo)(accNo);
|
|
64
|
-
if (valid)
|
|
65
|
-
return Promise.resolve(accNo);
|
|
66
|
-
return Promise.reject(new Error("Invalid Account Number Format"));
|
|
67
|
-
};
|
|
68
|
-
exports.ACC_NUMBER_VALIDATOR = ACC_NUMBER_VALIDATOR;
|
|
69
|
-
/**
|
|
70
|
-
* Validator for account name field.
|
|
71
|
-
* Ensures the account name is at least 3 characters long and contains only letters and spaces.
|
|
72
|
-
* @param {RuleObject} _ The rule object for validation (used by validation framework).
|
|
73
|
-
* @param {string} value The value to validate.
|
|
74
|
-
* @throws Will throw an error if validation fails.
|
|
75
|
-
*/
|
|
76
|
-
const ACC_NAME_VALIDATOR = (rule, value) => {
|
|
77
|
-
const accNameString = value?.toString().trim();
|
|
78
|
-
// If field is empty/undefined/null
|
|
79
|
-
if (!accNameString) {
|
|
80
|
-
// Only throw if the field is required
|
|
81
|
-
if (rule.required) {
|
|
82
|
-
return Promise.reject(new Error("Account name is required."));
|
|
83
|
-
}
|
|
84
|
-
// If field is not required and empty, validation passes
|
|
85
|
-
return Promise.resolve(undefined);
|
|
86
|
-
}
|
|
87
|
-
const accName = normalizeSpaces(accNameString);
|
|
88
|
-
const valid = (0, exports.validateAccName)(accName);
|
|
89
|
-
if (valid)
|
|
90
|
-
return Promise.resolve(accName);
|
|
91
|
-
return Promise.reject(new Error("Invalid account name. Examples: 'John Doe', 'Anna-Marie Smith'"));
|
|
92
|
-
};
|
|
93
|
-
exports.ACC_NAME_VALIDATOR = ACC_NAME_VALIDATOR;
|
|
94
|
-
/**
|
|
95
|
-
* Validates if the provided account name is valid.
|
|
96
|
-
* @param {string} [name] The account name to validate.
|
|
97
|
-
* @returns {boolean} `true` if valid, otherwise `false`.
|
|
98
|
-
*/
|
|
99
|
-
const validateAccName = (name) => {
|
|
100
|
-
if (!name)
|
|
101
|
-
return false;
|
|
102
|
-
const accName = normalizeSpaces(name);
|
|
103
|
-
return Boolean(accName.length && ACCOUNT_NAME_REGEX.test(accName));
|
|
104
|
-
};
|
|
105
|
-
exports.validateAccName = validateAccName;
|
|
106
|
-
/**
|
|
107
|
-
* Validates if the provided account number is valid.
|
|
108
|
-
* The account number must be numeric and between 8-12 digits.
|
|
109
|
-
* @param {string} [accountNumber] The account number to validate.
|
|
110
|
-
* @returns {boolean} `true` if valid, otherwise `false`.
|
|
111
|
-
*/
|
|
112
|
-
const validateBankAccNo = (accountNumber) => {
|
|
113
|
-
if (!accountNumber)
|
|
114
|
-
return false;
|
|
115
|
-
const normalizedNumber = removeSpaces(accountNumber);
|
|
116
|
-
return (normalizedNumber.length >= 6 && // Ensures minimum length of 6
|
|
117
|
-
normalizedNumber.length <= 20 && // Ensures maximum length of 20
|
|
118
|
-
exports.ACCOUNT_NUMBER_REGEX.test(normalizedNumber));
|
|
119
|
-
};
|
|
120
|
-
exports.validateBankAccNo = validateBankAccNo;
|
|
121
|
-
/**
|
|
122
|
-
* Normalizes spaces in a string by replacing multiple consecutive spaces
|
|
123
|
-
* with a single space, ensuring names are properly formatted.
|
|
124
|
-
*
|
|
125
|
-
* @param {string} input - The input string (e.g., a name) to process.
|
|
126
|
-
* @returns {string} A new string with multiple spaces replaced by a single space.
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* normalizeSpaces("John Doe"); // Returns: "John Doe"
|
|
130
|
-
* normalizeSpaces("John M Doe"); // Returns: "John M Doe"
|
|
131
|
-
* normalizeSpaces(" John Doe "); // Returns: "John Doe" (trims leading and trailing spaces as well)
|
|
132
|
-
*/
|
|
133
|
-
function normalizeSpaces(input) {
|
|
134
|
-
return input.trim().replace(/\s+/g, " ");
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Removes all whitespace characters from the given string.
|
|
138
|
-
*
|
|
139
|
-
* This function replaces all occurrences of spaces, tabs, and other
|
|
140
|
-
* whitespace characters (including multiple spaces) in the input string
|
|
141
|
-
* with an empty string, effectively removing them.
|
|
142
|
-
*
|
|
143
|
-
* @param {string} input - The input string from which spaces should be removed.
|
|
144
|
-
* @returns {string} A new string with all whitespace characters removed.
|
|
145
|
-
*
|
|
146
|
-
* @example
|
|
147
|
-
* removeSpaces(" Hello World "); // Returns: "HelloWorld"
|
|
148
|
-
* removeSpaces("NoSpacesHere"); // Returns: "NoSpacesHere"
|
|
149
|
-
* removeSpaces(" "); // Returns: ""
|
|
150
|
-
*/
|
|
151
|
-
function removeSpaces(input) {
|
|
152
|
-
return input.replace(/\s+/g, "");
|
|
153
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.test.d.ts","sourceRoot":"","sources":["../../../../../../src/src/models/contact/validation.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const dntShim = __importStar(require("../../../_dnt.test_shims.js"));
|
|
27
|
-
const mod_js_1 = require("../../../deps/jsr.io/@std/assert/1.0.10/mod.js");
|
|
28
|
-
const validation_js_1 = require("./validation.js");
|
|
29
|
-
// Tests for ACCOUNT_NUMBER_REGEX
|
|
30
|
-
dntShim.Deno.test("ACCOUNT_NUMBER_REGEX - pattern matching", () => {
|
|
31
|
-
const validCases = [
|
|
32
|
-
"123456",
|
|
33
|
-
"12345678901234567890",
|
|
34
|
-
"ABC123DEF456",
|
|
35
|
-
"123ABC456DEF",
|
|
36
|
-
];
|
|
37
|
-
const invalidCases = [
|
|
38
|
-
"12345", // too short
|
|
39
|
-
"123456789012345678901", // too long
|
|
40
|
-
"ABC-123", // invalid character
|
|
41
|
-
"ABC@123", // invalid character
|
|
42
|
-
];
|
|
43
|
-
validCases.forEach((value) => {
|
|
44
|
-
(0, mod_js_1.assertEquals)(validation_js_1.ACCOUNT_NUMBER_REGEX.test(value), true, `Expected "${value}" to match ACCOUNT_NUMBER_REGEX`);
|
|
45
|
-
});
|
|
46
|
-
invalidCases.forEach((value) => {
|
|
47
|
-
(0, mod_js_1.assertEquals)(validation_js_1.ACCOUNT_NUMBER_REGEX.test(value), false, `Expected "${value}" to not match ACCOUNT_NUMBER_REGEX`);
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
// Tests for validateAccName
|
|
51
|
-
dntShim.Deno.test("validateAccName - valid cases", () => {
|
|
52
|
-
const validCases = [
|
|
53
|
-
"John Doe",
|
|
54
|
-
"Anna-Marie Johnson",
|
|
55
|
-
"Jean-Luc Picard",
|
|
56
|
-
"Mary Ann Wilson",
|
|
57
|
-
];
|
|
58
|
-
validCases.forEach((name) => {
|
|
59
|
-
(0, mod_js_1.assertEquals)((0, validation_js_1.validateAccName)(name), true, `Expected "${name}" to be valid`);
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
dntShim.Deno.test("validateAccName - invalid cases", () => {
|
|
63
|
-
const invalidCases = [
|
|
64
|
-
undefined,
|
|
65
|
-
"",
|
|
66
|
-
"John",
|
|
67
|
-
"John123 Doe",
|
|
68
|
-
"-John Doe",
|
|
69
|
-
"John-",
|
|
70
|
-
"John--Doe",
|
|
71
|
-
];
|
|
72
|
-
invalidCases.forEach((name) => {
|
|
73
|
-
(0, mod_js_1.assertEquals)((0, validation_js_1.validateAccName)(name), false, `Expected "${name}" to be invalid`);
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
// Tests for validateBankAccNo
|
|
77
|
-
dntShim.Deno.test("validateBankAccNo - valid cases", () => {
|
|
78
|
-
const validCases = [
|
|
79
|
-
"123456",
|
|
80
|
-
"12345678901234567890",
|
|
81
|
-
"ABC123DEF456",
|
|
82
|
-
"ABCDEF123456",
|
|
83
|
-
"123ABC",
|
|
84
|
-
"123456 ", // should pass after space removal
|
|
85
|
-
];
|
|
86
|
-
validCases.forEach((accNo) => {
|
|
87
|
-
(0, mod_js_1.assertEquals)((0, validation_js_1.validateBankAccNo)(accNo), true, `Expected "${accNo}" to be valid`);
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
dntShim.Deno.test("validateBankAccNo - invalid cases", () => {
|
|
91
|
-
const invalidCases = [
|
|
92
|
-
undefined,
|
|
93
|
-
"",
|
|
94
|
-
"12345",
|
|
95
|
-
"123456789012345678901",
|
|
96
|
-
"@ABC123",
|
|
97
|
-
"ABC-123",
|
|
98
|
-
];
|
|
99
|
-
invalidCases.forEach((accNo) => {
|
|
100
|
-
(0, mod_js_1.assertEquals)((0, validation_js_1.validateBankAccNo)(accNo), false, `Expected "${accNo}" to be invalid`);
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
// Tests for ACC_NAME_VALIDATOR
|
|
104
|
-
dntShim.Deno.test("ACC_NAME_VALIDATOR - valid cases", async () => {
|
|
105
|
-
const validCases = [
|
|
106
|
-
"John Doe",
|
|
107
|
-
"Anna-Marie Johnson",
|
|
108
|
-
"Jean-Luc Picard",
|
|
109
|
-
"John Doe", // multiple spaces should be normalized
|
|
110
|
-
];
|
|
111
|
-
for (const name of validCases) {
|
|
112
|
-
const result = await (0, validation_js_1.ACC_NAME_VALIDATOR)({ required: true }, name);
|
|
113
|
-
(0, mod_js_1.assertEquals)(result, name.trim().replace(/\s+/g, " "), `Expected "${name}" to be valid and normalized`);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
dntShim.Deno.test("ACC_NAME_VALIDATOR - invalid cases", async () => {
|
|
117
|
-
const invalidCases = [
|
|
118
|
-
"John",
|
|
119
|
-
"John123 Doe",
|
|
120
|
-
];
|
|
121
|
-
for (const name of invalidCases) {
|
|
122
|
-
try {
|
|
123
|
-
await (0, validation_js_1.ACC_NAME_VALIDATOR)({ required: true }, name);
|
|
124
|
-
throw new Error(`Expected "${name}" to throw validation error`);
|
|
125
|
-
}
|
|
126
|
-
catch (error) {
|
|
127
|
-
(0, mod_js_1.assertEquals)(error.message, "Invalid account name. Examples: 'John Doe', 'Anna-Marie Smith'");
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
dntShim.Deno.test("ACC_NAME_VALIDATOR - required field validation", async () => {
|
|
132
|
-
try {
|
|
133
|
-
await (0, validation_js_1.ACC_NAME_VALIDATOR)({ required: true }, "");
|
|
134
|
-
throw new Error("Expected empty required field to throw error");
|
|
135
|
-
}
|
|
136
|
-
catch (error) {
|
|
137
|
-
(0, mod_js_1.assertEquals)(error.message, "Account name is required.");
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
dntShim.Deno.test("ACC_NAME_VALIDATOR - optional field validation", async () => {
|
|
141
|
-
const result = await (0, validation_js_1.ACC_NAME_VALIDATOR)({ required: false }, "");
|
|
142
|
-
(0, mod_js_1.assertEquals)(result, undefined, "Expected empty optional field to be valid");
|
|
143
|
-
});
|
|
144
|
-
// Tests for ACC_NUMBER_VALIDATOR
|
|
145
|
-
dntShim.Deno.test("ACC_NUMBER_VALIDATOR - valid cases", async () => {
|
|
146
|
-
const validCases = [
|
|
147
|
-
"123456",
|
|
148
|
-
"12345678901234567890",
|
|
149
|
-
"ABC123DEF456",
|
|
150
|
-
"123456 ", // should pass after space removal
|
|
151
|
-
];
|
|
152
|
-
for (const accNo of validCases) {
|
|
153
|
-
const result = await (0, validation_js_1.ACC_NUMBER_VALIDATOR)({ required: true }, accNo);
|
|
154
|
-
(0, mod_js_1.assertEquals)(result, accNo.replace(/\s+/g, ""), `Expected "${accNo}" to be valid and normalized`);
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
dntShim.Deno.test("ACC_NUMBER_VALIDATOR - invalid cases", async () => {
|
|
158
|
-
const invalidCases = [
|
|
159
|
-
"12345",
|
|
160
|
-
"123456789012345678901",
|
|
161
|
-
"@ABC123",
|
|
162
|
-
"ABC-123",
|
|
163
|
-
];
|
|
164
|
-
for (const accNo of invalidCases) {
|
|
165
|
-
try {
|
|
166
|
-
await (0, validation_js_1.ACC_NUMBER_VALIDATOR)({ required: true }, accNo);
|
|
167
|
-
throw new Error(`Expected "${accNo}" to throw validation error`);
|
|
168
|
-
}
|
|
169
|
-
catch (error) {
|
|
170
|
-
(0, mod_js_1.assertEquals)(error.message, "Invalid Account Number Format");
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
dntShim.Deno.test("ACC_NUMBER_VALIDATOR - required field validation", async () => {
|
|
175
|
-
try {
|
|
176
|
-
await (0, validation_js_1.ACC_NUMBER_VALIDATOR)({ required: true }, "");
|
|
177
|
-
throw new Error("Expected empty required field to throw error");
|
|
178
|
-
}
|
|
179
|
-
catch (error) {
|
|
180
|
-
(0, mod_js_1.assertEquals)(error.message, "Account number is required.");
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
dntShim.Deno.test("ACC_NUMBER_VALIDATOR - optional field validation", async () => {
|
|
184
|
-
const result = await (0, validation_js_1.ACC_NUMBER_VALIDATOR)({ required: false }, "");
|
|
185
|
-
(0, mod_js_1.assertEquals)(result, undefined, "Expected empty optional field to be valid");
|
|
186
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./permission.js"), exports);
|
|
18
|
-
__exportStar(require("./user/index.js"), exports);
|
|
19
|
-
__exportStar(require("./contact/index.js"), exports);
|
|
20
|
-
__exportStar(require("./payout/index.js"), exports);
|
|
21
|
-
__exportStar(require("./wallet/index.js"), exports);
|
|
22
|
-
__exportStar(require("./role.js"), exports);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Arguments for retrieving payouts from the API.
|
|
3
|
-
*
|
|
4
|
-
* @interface GetPayoutsAPIArgs
|
|
5
|
-
*
|
|
6
|
-
* @property {number} [rangeStart] - The starting index for pagination. If not provided, defaults to beginning.
|
|
7
|
-
* @property {number} [rangeEnd] - The ending index for pagination. If not provided, defaults to 10.
|
|
8
|
-
* @property {boolean} [pending] - Filter for pending payouts only. If true, returns only pending payouts.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* // Get first 10 payouts
|
|
13
|
-
* const args: GetPayoutsAPIArgs = {
|
|
14
|
-
* rangeStart: 0,
|
|
15
|
-
* rangeEnd: 10
|
|
16
|
-
* };
|
|
17
|
-
*
|
|
18
|
-
* // Get only pending payouts
|
|
19
|
-
* const pendingArgs: GetPayoutsAPIArgs = {
|
|
20
|
-
* pending: true
|
|
21
|
-
* };
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export interface GetPayoutsAPIArgs {
|
|
25
|
-
rangeStart?: number;
|
|
26
|
-
rangeEnd?: number;
|
|
27
|
-
pending?: boolean;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../../src/src/models/payout/api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { type TZPhoneNumber } from "@temboplus/frontend-core";
|
|
2
|
-
/**
|
|
3
|
-
* Represents the available channels through which payouts can be processed.
|
|
4
|
-
* @enum {string}
|
|
5
|
-
* @readonly
|
|
6
|
-
*/
|
|
7
|
-
export declare enum PAYOUT_CHANNEL {
|
|
8
|
-
/** Payment processed through mobile money services */
|
|
9
|
-
MOBILE = "Mobile",
|
|
10
|
-
/** Payment processed through traditional banking channels */
|
|
11
|
-
BANK = "Bank",
|
|
12
|
-
/** Payment processed through CRDB named account */
|
|
13
|
-
CRDB_NAMED_ACC = "CRDB_NAMED_ACC"
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Valid payout channel codes that can be used in the system
|
|
17
|
-
*
|
|
18
|
-
* @remarks
|
|
19
|
-
* - `TZ-BANK-B2C`: Code for bank transfers
|
|
20
|
-
* - `TZ-VERTO-B2C`: Code for Verto transfers
|
|
21
|
-
* - `TZ-${telecom}-B2C`: Pattern for mobile money transfers where the telecom company is the provider code
|
|
22
|
-
*
|
|
23
|
-
* @see {@link createPayoutChannelCode} for functions to generate valid codes
|
|
24
|
-
*/
|
|
25
|
-
export type PayoutChannelCode = "TZ-BANK-B2C" | "TZ-VERTO-B2C" | `TZ-${string}-B2C`;
|
|
26
|
-
/**
|
|
27
|
-
* Utility functions to create standardized payout channel codes
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* // Create bank channel code
|
|
32
|
-
* const bankCode = createPayoutChannelCode.bank(); // Returns "TZ-BANK-B2C"
|
|
33
|
-
*
|
|
34
|
-
* // Create mobile channel code
|
|
35
|
-
* const mobileCode = createPayoutChannelCode.mobile(phoneNumber); // Returns "TZ-VODACOM-B2C" for Vodacom number
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
export declare const createPayoutChannelCode: {
|
|
39
|
-
/**
|
|
40
|
-
* Creates a bank transfer channel code
|
|
41
|
-
* @returns {"TZ-BANK-B2C"} Standard bank transfer code
|
|
42
|
-
*/
|
|
43
|
-
bank: () => "TZ-BANK-B2C";
|
|
44
|
-
/**
|
|
45
|
-
* Creates a Verto transfer channel code
|
|
46
|
-
* @returns {"TZ-VERTO-B2C"} Standard Verto transfer code
|
|
47
|
-
*/
|
|
48
|
-
verto: () => "TZ-VERTO-B2C";
|
|
49
|
-
/**
|
|
50
|
-
* Creates a mobile money channel code based on the telecom provider
|
|
51
|
-
* @param {TZPhoneNumber} phoneNumber - Phone number object containing telecom information
|
|
52
|
-
* @returns {PayoutChannelCode} Channel code in format "TZ-{TELECOM}-B2C"
|
|
53
|
-
*
|
|
54
|
-
* @see {@link TZPhoneNumber} from "@jsr/temboplus__tembo-core" for phone number structure
|
|
55
|
-
*/
|
|
56
|
-
mobile: (phoneNumber: TZPhoneNumber) => PayoutChannelCode;
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../../../src/src/models/payout/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE/E;;;;GAIG;AACH,oBAAY,cAAc;IACxB,sDAAsD;IACtD,MAAM,WAAW;IACjB,6DAA6D;IAC7D,IAAI,SAAS;IACb,mDAAmD;IACnD,cAAc,mBAAmB;CAClC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GACzB,aAAa,GACb,cAAc,GACd,MAAM,MAAM,MAAM,CAAC;AAEvB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB;IAClC;;;OAGG;gBACO,aAAa;IAEvB;;;OAGG;iBACQ,cAAc;IAEzB;;;;;;OAMG;0BAC4B,aAAa,KAAG,iBAAiB;CAOjE,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPayoutChannelCode = exports.PAYOUT_CHANNEL = void 0;
|
|
4
|
-
const frontend_core_1 = require("@temboplus/frontend-core");
|
|
5
|
-
/**
|
|
6
|
-
* Represents the available channels through which payouts can be processed.
|
|
7
|
-
* @enum {string}
|
|
8
|
-
* @readonly
|
|
9
|
-
*/
|
|
10
|
-
var PAYOUT_CHANNEL;
|
|
11
|
-
(function (PAYOUT_CHANNEL) {
|
|
12
|
-
/** Payment processed through mobile money services */
|
|
13
|
-
PAYOUT_CHANNEL["MOBILE"] = "Mobile";
|
|
14
|
-
/** Payment processed through traditional banking channels */
|
|
15
|
-
PAYOUT_CHANNEL["BANK"] = "Bank";
|
|
16
|
-
/** Payment processed through CRDB named account */
|
|
17
|
-
PAYOUT_CHANNEL["CRDB_NAMED_ACC"] = "CRDB_NAMED_ACC";
|
|
18
|
-
})(PAYOUT_CHANNEL || (exports.PAYOUT_CHANNEL = PAYOUT_CHANNEL = {}));
|
|
19
|
-
/**
|
|
20
|
-
* Utility functions to create standardized payout channel codes
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* // Create bank channel code
|
|
25
|
-
* const bankCode = createPayoutChannelCode.bank(); // Returns "TZ-BANK-B2C"
|
|
26
|
-
*
|
|
27
|
-
* // Create mobile channel code
|
|
28
|
-
* const mobileCode = createPayoutChannelCode.mobile(phoneNumber); // Returns "TZ-VODACOM-B2C" for Vodacom number
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
exports.createPayoutChannelCode = {
|
|
32
|
-
/**
|
|
33
|
-
* Creates a bank transfer channel code
|
|
34
|
-
* @returns {"TZ-BANK-B2C"} Standard bank transfer code
|
|
35
|
-
*/
|
|
36
|
-
bank: () => "TZ-BANK-B2C",
|
|
37
|
-
/**
|
|
38
|
-
* Creates a Verto transfer channel code
|
|
39
|
-
* @returns {"TZ-VERTO-B2C"} Standard Verto transfer code
|
|
40
|
-
*/
|
|
41
|
-
verto: () => "TZ-VERTO-B2C",
|
|
42
|
-
/**
|
|
43
|
-
* Creates a mobile money channel code based on the telecom provider
|
|
44
|
-
* @param {TZPhoneNumber} phoneNumber - Phone number object containing telecom information
|
|
45
|
-
* @returns {PayoutChannelCode} Channel code in format "TZ-{TELECOM}-B2C"
|
|
46
|
-
*
|
|
47
|
-
* @see {@link TZPhoneNumber} from "@jsr/temboplus__tembo-core" for phone number structure
|
|
48
|
-
*/
|
|
49
|
-
mobile: function (phoneNumber) {
|
|
50
|
-
//! fix: Channeling all Vodacom numbers to Tigo. Request from Mr. Tesha to solve some specific problem
|
|
51
|
-
if (phoneNumber.networkOperator.id === frontend_core_1.NetworkOperator.VODACOM) {
|
|
52
|
-
return `TZ-${frontend_core_1.NetworkOperator.TIGO.toString().toUpperCase()}-B2C`;
|
|
53
|
-
}
|
|
54
|
-
return `TZ-${phoneNumber.networkOperator.id.toString().toUpperCase()}-B2C`;
|
|
55
|
-
},
|
|
56
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payout.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/models/payout/derivatives/payout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAuB,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,EAEL,KAAK,WAAW,EAEjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,sBAAsB,EAC3B,aAAa,EACd,MAAM,cAAc,CAAC;AAGtB;;GAEG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;IAElC;;OAEG;IACH,OAAO;IAKP,uCAAuC;IACvC,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,qDAAqD;IACrD,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,kCAAkC;IAClC,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,2CAA2C;IAC3C,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,+CAA+C;IAC/C,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED;;;OAGG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,wCAAwC;IACxC,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,iDAAiD;IACjD,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED;;;;;;;;;;;OAWG;IACH,IAAI,MAAM,IAAI,aAAa,CAe1B;IAED,2DAA2D;IAC3D,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,iDAAiD;IACjD,IAAI,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAEzC;IAED,wCAAwC;IACxC,IAAI,SAAS,IAAI,IAAI,CAEpB;IAED,6CAA6C;IAC7C,IAAI,SAAS,IAAI,IAAI,CAEpB;IAED,6CAA6C;IAC7C,IAAI,UAAU,IAAI,IAAI,GAAG,SAAS,CAEjC;IAED,4CAA4C;IAC5C,IAAI,cAAc,IAAI,sBAAsB,CAE3C;IAED,+CAA+C;IAC/C,IAAI,SAAS,IAAI,cAAc,GAAG,SAAS,CAE1C;IAED,qDAAqD;IACrD,IAAI,UAAU,IAAI,cAAc,GAAG,SAAS,CAE3C;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,WAAW,IAAI,WAAW,GAAG,SAAS,CA+BzC;IAED;;;OAGG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;IAIvC;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE;IAIpD;;;OAGG;WACW,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI;IAQzD;;;;;;;;;;;;;;;;;;;;;OAqBG;WACW,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM;IAUvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;WACW,EAAE,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM;IAO7C;;OAEG;IACI,MAAM,IAAI,UAAU;CAG5B"}
|