Spaces:
Sleeping
Sleeping
Commit History
-
notfication ms integration
4e94087
-
notification fix
6cd783a -
notification
e47349e -
email smtp
84651f3 -
feat(logging): Enhance logging with structured events and error handling
17ba139
-
feat(staff-auth): Query pos_staff collection directly and add staff_id to auth tokens
- Replace SystemUserService dependency with direct pos_staff collection queries - Add staff_id field to JWT token payload and login response - Implement _get_staff_by_phone() helper to fetch staff from pos_staff with field normalization - Implement _get_merchant_type() helper to fetch merchant type from scm_merchants cross-DB - Add ADMIN_ROLES constant to prevent admin users from using staff OTP login - Update staff login response schema to include staff_id and normalize permissions field - Refactor staff_auth_service with organized sections for internal helpers and public API - Improve error handling and logging for staff lookup operations - Update collections.py to define POS_STAFF_COLLECTION constant - Enhance notification queue integration for OTP delivery via WhatsApp and SMS0ece69a -
feat(notifications): Replace WATI service with unified notification queue
- Replace direct WATI WhatsApp API calls with NotificationQueue abstraction across customer, service partner, and staff auth services - Add NotificationQueue utility module for centralized OTP notification handling via WhatsApp and SMS - Update OTP delivery status tracking to use "queued" and "queue_failed" states instead of "sent" and "failed" - Remove WatiService dependencies and instantiation from auth services - Simplify OTP response messages to be channel-agnostic - Add merchant_id lookup and passing to notification queue for credential resolution - Export NotificationQueue from utils module for consistent access across services2a952d3
-
feat(logging): Add correlation ID tracing for distributed request tracking
- Add CorrelationIdMiddleware to extract/generate and propagate correlation IDs across requests - Implement CorrelationIdFilter in logging system to include correlation ID in all log records - Create CorrelationHttpClient utility for automatic correlation ID propagation to downstream services - Update main.py to register correlation ID middleware in request pipeline - Add comprehensive implementation guide documenting usage, tracing, and integration patterns - Enable request tracing across microservices for improved debugging and observability1f7d0a1
-
feat: Implement forgot password feature with email reset functionality
- Added `FORGOT_PASSWORD_QUICKSTART.md` for quick reference on setup and usage. - Created `IMPLEMENTATION_SUMMARY.md` detailing the implementation process and features. - Introduced new API endpoints for password reset: `/auth/forgot-password`, `/auth/verify-reset-token`, and `/auth/reset-password`. - Developed email service in `app/utils/email_service.py` for sending transactional emails. - Updated configuration in `app/core/config.py` to include password reset settings. - Enhanced user service in `app/system_users/services/service.py` to handle password reset token creation, verification, and email sending. - Added schemas for password reset requests in `app/system_users/schemas/schema.py`. - Implemented token storage and management in `app/system_users/models/model.py`. - Created a test script `test_forgot_password.py` to validate the complete password reset flow. - Included troubleshooting and security features in documentation.96e0270
-
feat: Implement System Users module for authentication and user management
- Added `system_users` package with controllers, models, schemas, and services. - Created API endpoints for user login, registration, user management, and password change. - Implemented JWT authentication and user role management. - Added database management utilities for creating indexes and default roles. - Updated requirements.txt with necessary dependencies for FastAPI, MongoDB, and JWT handling. - Created a startup script to set up the environment and run the FastAPI server.7a5b513