Commit Graph
100 Commits
Author SHA1 Message Date
Abdalhamid Alhamad 1822f074c6 fix: update phone number change instructions in help/support FAQs for clarity and localization 2026-02-01 14:24:35 +03:00
Abdalhamid Alhamad db946b9531 fix build error 2026-01-25 14:10:46 +03:00
Abdalhamid Alhamad 25ede3c9e7 feat(lookup): add localized help/support FAQs 2026-01-25 13:15:59 +03:00
Abdalhamid Alhamad f5c3b03264 feat: enhance card service and transaction notification for shared account handling
- Updated CardService to differentiate between shared and separate accounts during card control updates, optimizing balance allocation.
- Enhanced TransactionNotificationListener to accurately reflect balance based on account structure for internal transfers and top-ups.
- Improved logging for better traceability of account operations and balance calculations.
2026-01-20 16:27:32 +03:00
Abdalhamid Alhamad a09b84e475 feat: enhance transaction notification listener for internal transfer support
- Updated TransactionNotificationListener to differentiate between internal transfers and external top-ups for child accounts.
- Added new notification scopes and messages for internal transfers from parent to child.
- Improved balance retrieval logic to ensure accurate account balances are displayed in notifications.
- Enhanced localization support by adding relevant keys for internal transfer notifications in both English and Arabic.
2026-01-20 15:20:58 +03:00
Abdalhamid Alhamad 4305c4b75f fix the messages 2026-01-20 14:40:16 +03:00
Abdalhamid Alhamad 64623c7cea fix: correct junior ID to customer ID mapping in transaction queries
Fixed spending history and related transaction queries that were incorrectly
using juniorId as customerId. The queries now properly join through the
Customer -> Junior relationship to filter by junior ID.

Affected methods:
- getTransactionsForCardWithinDateRange (spending history)
- findTransfersToJunior (transfers list)
- countTransfersToJunior (transfers count)
- findTransactionById (transaction details)

This fixes the spending history endpoint which was returning empty results
due to ID mismatch between Junior entity ID and Customer entity ID.

Performance impact: Minimal (~1-2ms overhead from additional joins on
indexed foreign keys). The queries now return correct results instead of
0 results.
2026-01-20 12:39:10 +03:00
Abdalhamid Alhamad 7c9e0f0b51 feat: refine transaction notification listener for improved balance calculations
- Updated TransactionNotificationListener to differentiate between child top-up and spending notifications, ensuring accurate balance retrieval.
- Enhanced error handling and fallback mechanisms for both child and parent account balance fetching.
- Improved logging to provide detailed insights into balance calculations, including available balance after accounting for reserved amounts.
2026-01-14 16:56:22 +03:00
Abdalhamid Alhamad 1086166e04 feat: improve transaction notification listener for accurate balance retrieval
- Enhanced TransactionNotificationListener to fetch updated balances for child and parent accounts by bypassing entity cache.
- Implemented error handling and fallback mechanisms to ensure reliable balance notifications.
- Updated logging for better traceability of balance fetching processes.
2026-01-14 16:31:47 +03:00
Abdalhamid Alhamad 6d6dc1471f feat: add timezone support to user and device entities
- Introduced optional timezone fields in User and Device entities to store user preferences and device timezones.
- Updated request DTOs for login and user updates to include timezone information.
- Enhanced AuthService to handle timezone during device registration and updates.
- Added migration to incorporate timezone fields in the database schema.
2026-01-14 16:12:08 +03:00
Abdalhamid Alhamad 1b0d6cb284 feat: enhance card and transaction services for balance updates
- Added functionality to credit child account balance and decrease parent account balance in CardService.
- Updated TransactionService to reload card details for accurate balance after transactions.
- Improved TransactionNotificationListener to fetch updated balances for both child and parent accounts, ensuring accurate notifications.
2026-01-14 14:51:45 +03:00
Abdalhamid Alhamad c963b57904 feat: enhance card service validation and notification integration
- Added validation for card reference and limit in CardService to ensure data integrity.
- Improved error handling with detailed logging for invalid card states.
- Updated transaction notification listener to fetch parent account details and adjust balance notifications accordingly.
- Enhanced notification creation process to include status management for better tracking.
2026-01-14 13:27:02 +03:00
Abdalhamid Alhamad 145e6c62b8 feat: implement KYC and card notification events
- Added KycNotificationListener to handle notifications for KYC approval and rejection events.
- Introduced CardNotificationListener to manage notifications for card creation and blocking events.
- Enhanced CardService to emit events for card creation and blocking, integrating with the new notification system.
- Updated notification constants and interfaces to include new KYC and card-related events.
- Improved notification message formatting and added localization support for new events.
2026-01-14 12:31:48 +03:00
Abdalhamid Alhamad 45acf73a4a feat: enhance transaction notification logging and error handling
- Added console logging for emitted transaction creation events in TransactionService.
- Improved error handling in TransactionNotificationListener for i18n translation failures, providing fallback messages.
- Updated amount parsing in MoneyRequestNotificationListener to ensure consistent handling of string and numeric values.
2026-01-12 16:47:28 +03:00
Abdalhamid Alhamad d3ff755439 refactor: standardize notification message formatting
- Updated notification message arguments to use consistent object syntax for better readability.
- Modified Arabic and English translation files to reflect the new argument format in notification messages.
2026-01-12 16:28:26 +03:00
Abdalhamid Alhamad 21653efc46 feat: implement money request notification system
- Added MoneyRequestNotificationListener to handle notifications for money request events (created, approved, declined).
- Introduced new notification event constants for money requests.
- Updated notification interfaces to include money request event payloads.
- Enhanced existing notification system to support money request notifications, notifying parents and children appropriately.
- Updated device service to support finding devices by ID for improved functionality.
2026-01-12 16:07:48 +03:00
Abdalhamid Alhamad 63b0a42eca feat: enhance Redis module exports for pub/sub functionality
- Added 'REDIS_PUBLISHER' and 'REDIS_SUBSCRIBER' to the exports of RedisModule to improve pub/sub capabilities.
2026-01-11 14:38:59 +03:00
Abdalhamid Alhamad b1cda5e7dc feat: Complete Phase 2 notification system implementation
- Implement messaging system factory pattern
- Fix all transaction notification blockers
- Complete listener logic for all notification types
2026-01-11 11:17:08 +03:00
Abdalhamid Alhamad 2c8de913f8 refactor: update notification titles and enhance notification creation process
- Simplified notification titles by removing emojis for better clarity.
- Modified createNotification method to include automatic publishing to Redis, improving notification delivery.
- Updated email and OTP notification methods to leverage the new createNotification functionality.
2026-01-06 16:22:21 +03:00
Abdalhamid Alhamad 170aa903c7 add eveint lestiner to the parent 2026-01-06 14:51:44 +03:00
Abdalhamid Alhamad 2f74aa36a9 merge conflect 2026-01-06 12:57:13 +03:00
Abdalhamid Alhamad 2562515574 Merge branch 'dev' of github.com:HamzaSha1/zod-backend into feature/notification-system-fcm-registration 2026-01-06 12:53:44 +03:00
Abdalhamid Alhamad 93b509b256 feat: add notification event handling and notification factory service
- Introduce constants for notification event names
- Implement interfaces for transaction created events
- Create a transaction notification listener to handle transaction notifications
- Develop a notification factory service for sending notifications based on user preferences
- Add a migration to include a data column in the notifications table
2026-01-06 12:38:19 +03:00
Abdalhamid Alhamad 9c93a35093 feat: implement notification system with FCM token registration
- Add FCM token registration during login/signup
- Implement transaction notification listeners
- Add notification data column to database
- Update Firebase service with data payload support
- Add transaction notification scopes
- Update card repository to load relations for notifications
2026-01-06 12:29:01 +03:00
Abdalhamid Alhamad 110a6fb0ee refactor: remove address fields from customer entity and related services
- Removed address-related fields from Customer entity, DTOs, and services to streamline KYC process.
- Updated KYC initiation and customer update logic to default to Saudi Arabia for country and use fixed address values.
- Added migration to drop address columns from the database.
2025-12-18 12:35:32 +03:00
Abdalhamid Alhamad 24bcb10d76 feat: enhance KYC process with external customer ID validation
- Added validation to ensure customer has a neoleapExternalCustomerId before card creation.
- Updated KYC status update to include neoleapExternalCustomerId in the customer record.
- Enhanced application info to include ExternalCorporateId for better integration with Neoleap.
2025-12-17 12:51:20 +03:00
Abdalhamid Alhamad cfd02e8c30 refactor: remove obsolete customer fields and update migration
- Removed unused fields: sourceOfIncome, profession, and professionType from Customer entity and DTOs.
- Updated KYC callback mock to reflect the removal of professionType.
- Added migration to drop the corresponding columns from the database.
2025-12-16 16:40:13 +03:00
Abdalhamid Alhamad 5e708c16fe chore: remove migration from wrong directory
Migration already exists in correct location: src/db/migrations/
2025-12-16 14:57:03 +03:00
Abdalhamid Alhamad fe11f35b32 feat: send the adress data to noleap 2025-12-16 14:51:21 +03:00
Abdalhamid Alhamad 3200f60821 feat: Complete KYC implementation with address fields
- Added address fields to registration (verify-user DTO)
- Added address fields to KYC initiation (initiate-kyc DTO)
- Added national_id column to kyc_transactions table
- Changed duplicate KYC check from customerId to nationalId
- Added KYC webhook endpoint (/api/neoleap-webhooks/kyc)
- Added webhook processing logic
- Updated customer service to save address during registration and KYC
- Added validation to require address before card creation
- Removed duplicate src/migrations/ directory
2025-12-16 14:44:07 +03:00
Abdalhamid Alhamad e8127970f6 chore: remove email and dob from guardian signup flow 2025-12-11 12:13:51 +03:00
Abdalhamid Alhamad 07d4a83cf9 test ssh 2025-12-07 20:18:59 +03:00
Abdalhamid Alhamad 91dea22f45 refactor: remove unused PoiValidationRule class from KycMetadataResponseDto 2025-11-18 15:14:47 +03:00
Abdalhamid Alhamad c007ac584f feat: add KYC onboarding metadata endpoint with POI validation 2025-11-18 15:03:42 +03:00
Abdalhamid Alhamad 506974afc8 Enhance profile picture handling in JuniorService to ensure foreign key consistency and validate document ownership before assignment. 2025-11-09 12:42:48 +03:00
Abdalhamid Alhamad 8b00cda23d Update return value in updateJunior method to fetch updated junior details by ID instead of returning the junior object directly. 2025-11-09 12:25:37 +03:00
Abdalhamid Alhamad 2172051093 Refactor balance check in increaseReservedBalance method to delegate validation to the caller, improving clarity and responsibility separation. 2025-11-02 12:41:16 +03:00
Abdalhamid Alhamad d6fb5f48d9 add more loggs 2025-11-02 12:34:41 +03:00
Abdalhamid Alhamad 99af65a300 money-request to use the parent card 2025-11-02 11:57:41 +03:00
Abdalhamid Alhamad 3b295ea79f ZOD-344-Add QR code validation error handling and localization support
- Introduced new error handling for already used or expired QR codes in JuniorService.
- Added corresponding localization entries in Arabic and English app.json files for QR code validation messages.
2025-11-02 10:52:43 +03:00
Abdalhamid Alhamad a3a61b4923 Implement OTP generation and email verification logic in UserService 2025-10-28 15:52:24 +03:00
Abdalhamid Alhamad 05a6ad2d84 Enhance weekly summary functionality to accept optional date range parameters in CardService, TransactionService, JuniorService, and JuniorController. Update API documentation to reflect new query parameters for start and end dates. 2025-10-28 11:20:49 +03:00
Abdalhamid Alhamad bbeece9e03 git checkout -b ZOD-349-weekly-spending-data-not-displaying-in-the-child-profile-parent-view 2025-10-26 13:14:35 +03:00
Abdalhamid Alhamad 8a6b1cc900 Remove duplicate email cleanup logic and add unique constraint to user email 2025-10-21 14:10:14 +03:00
Abdalhamid Alhamad e966f95463 ZOD-341-Add unique constraint to user email and clean up duplicates 2025-10-21 10:49:43 +03:00
Abdalhamid Alhamad 4f778f7904 * ZOD-341-junior-a-child-can-edit-their-email-to-an-existing-email-causing-multiple-child-accounts-to-share-the-same-login 2025-10-20 14:25:53 +03:00
Abdalhamid Alhamad d2e084d3e4 git checkout -b ZOD-204-view-spending-from-child-login 2025-10-19 15:26:47 +03:00
Abdalhamid Alhamad 7b57277a7f ZOD-339-child-profile-gender-update-is-not-reflected-after-editing 2025-10-19 11:01:52 +03:00
Abdalhamid Alhamad 297a2fe5ad ZOD-333-junior-incorrect-relationship-label-displayed-as-child-instead-of-daughter-or-son-in-child-confirmation-details-after-the-scan-the-qr-code 2025-10-19 09:57:35 +03:00
Abdalhamid Alhamad 15621124ad ZOD-309-child-transaction-history-parent-→-child-transfers 2025-10-16 12:25:16 +03:00
Abdalhamid Alhamad f6fa74897a feat: add guardian transactions feature with response DTOs and service integration 2025-10-15 14:14:59 +03:00
Abdalhamid Alhamad 8f601b26ae fix: add gender property to UserResponseDto 2025-10-12 16:03:25 +03:00
Abdalhamid Alhamad e06642225a feat: working on creating parent card 2025-08-14 14:40:08 +03:00
Abdalhamid Alhamad 05a9f04ac8 fix: fix import in migration index 2025-08-11 16:23:19 +03:00
Abdalhamid Alhamad dcc9077392 fix: rename migration timestamp 2025-08-11 16:22:20 +03:00
Abdalhamid Alhamad 681d1e5791 fix: fix seed default avatar migration 2025-08-11 16:16:26 +03:00
Abdalhamid Alhamad bf505a65bf fix: fix invalid imports 2025-08-11 16:13:53 +03:00
Abdalhamid Alhamad 6bf32d27c7 Merge branch 'dev' of github.com:HamzaSha1/zod-backend into dev 2025-08-11 15:33:39 +03:00
Abdalhamid Alhamad ac63d4cdc7 refactor: refactor the code 2025-08-11 15:33:32 +03:00
Abdalhamid Alhamad 150027fb71 Merge branch 'main' into dev 2025-08-11 15:25:16 +03:00
Abdalhamid Alhamad e8ee74d0d7 refactor: remove unsed code 2025-08-11 15:15:41 +03:00
Abdalhamid Alhamad 99ad17f0f9 feat: add change password api 2025-08-07 15:25:45 +03:00
Abdalhamid Alhamad ee7b365527 feat: kyc process 2025-08-07 14:23:33 +03:00
Abdalhamid Alhamad 275984954e feat: working on edit profile ticket 2025-08-05 17:53:38 +03:00
Abdalhamid Alhamad 1e2b859b92 feat: finish generating signed url for document upload flow 2025-08-03 16:18:06 +03:00
Abdalhamid Alhamad 4cc52a1c07 fix: add swagger doc to verify otp api 2025-08-03 14:50:04 +03:00
Abdalhamid Alhamad 7461af20dd feat: edit forget password flow 2025-08-03 14:48:14 +03:00
Abdalhamid Alhamad f65a7d2933 feat: generate upload signed url for oci 2025-08-03 14:21:14 +03:00
Abdalhamid Alhamad fce720237f feat: add vpan to card entity 2025-08-03 11:53:16 +03:00
Abdalhamid Alhamad 5e0a4e6bd1 feat: fix update card status webhook 2025-07-31 14:42:06 +03:00
Abdalhamid Alhamad f9776e60cf fix: save transaction file 2025-07-31 14:11:53 +03:00
Abdalhamid Alhamad 7e63abb2fb feat: add-account-details 2025-07-31 14:07:01 +03:00
Abdalhamid Alhamad a245545811 feat: add login and forget password and refactor code 2025-07-30 15:40:40 +03:00
Abdalhamid Alhamad 4cb5814cd3 fix: organize migrations 2025-07-30 14:18:10 +03:00
Abdalhamid Alhamad 9e06ea4d71 Merge branch 'dev' into feat/neoleap-integration 2025-07-30 14:09:00 +03:00
Abdalhamid Alhamad cff87c4ecd rollup migrations into one 2025-07-30 13:08:31 +03:00
Abdalhamid Alhamad 1541c374ed feat: fix swagger examples 2025-07-27 13:26:21 +03:00
Abdalhamid Alhamad c493bd57e1 feat: onboarding signup journey 2025-07-27 13:15:54 +03:00
Abdalhamid Alhamad bf43e62b17 feat: handle card status changed webhook 2025-07-21 15:30:55 +03:00
Abdalhamid Alhamad 5a780eeb17 feat/working on update card control 2025-07-14 11:57:51 +03:00
Abdalhamid Alhamad 038b8ef6e3 feat: finish working on account transaction webhook 2025-07-09 13:31:08 +03:00
Abdalhamid Alhamad 3b3f8c0104 fix: remove host from request 2025-07-07 16:34:45 +03:00
Abdalhamid Alhamad 2770cf8774 fix:fix card migration 2025-07-07 12:06:01 +03:00
Abdalhamid Alhamad bea3ccfbbc Merge branch 'waiting-list' into feat/neoleap-integration 2025-07-06 16:45:37 +03:00
Abdalhamid Alhamad 492e538eb8 feat: send request via gateway 2025-07-06 16:44:23 +03:00
Abdalhamid Alhamad d3057beb54 feat: add transaction, card , and account entities 2025-07-02 18:42:38 +03:00
Abdalhamid Alhamad 19fa53c981 fix: fix apple client audience 2025-06-17 11:39:51 +03:00
Abdalhamid Alhamad d2cc02fb60 fix: localizze error messages 2025-06-17 09:43:36 +03:00
Abdalhamid Alhamad 4cbbfd8136 Merge branch 'waiting-list' into feat/neoleap-integration 2025-06-11 11:15:10 +03:00
Abdalhamid Alhamad 6c859a25d2 feat: handle oauth2 login 2025-06-04 14:52:09 +03:00
Abdalhamid Alhamad d1a6d3e715 feat: add test controller for integartion 2025-06-04 10:04:45 +03:00
Abdalhamid Alhamad 1ea1f42169 feat: finish create and inquire application api and handle response and errors 2025-06-03 14:51:36 +03:00
Abdalhamid Alhamad d4fe3b3fc3 feat: finish working on mocking inquire application api 2025-05-26 16:34:09 +03:00
Abdalhamid Alhamad b44bc5d5cc fix: localize customer already exist message 2025-05-26 15:24:20 +03:00
Abdalhamid Alhamad 9aa6c487ed Merge branch 'waiting-list' into feat/neoleap-integration 2025-05-26 12:11:53 +03:00
Abdalhamid Alhamad 42e4d75d70 feat: add country iso enum 2025-05-26 12:10:09 +03:00
Abdalhamid Alhamad a358cd2e7a feat: add neoleap service and mock create application api 2025-05-26 12:04:00 +03:00
Abdalhamid Alhamad 641a665beb Merge branch 'waiting-list' into feat/neoleap-integration 2025-05-21 09:59:18 +03:00
Abdalhamid Alhamad 49326e983f feat: handle new registration flow 2025-05-19 17:00:32 +03:00
Abdalhamid Alhamad 881d88c8d8 feat: add customer details to customer entity 2025-05-19 14:16:18 +03:00