Files
maternal-app/maternal-web/lib/api/users.ts
andupetcu a91a7b009a
Some checks failed
Backend CI/CD Pipeline / Lint and Test Backend (push) Has been cancelled
CI/CD Pipeline / Lint and Test (push) Has been cancelled
Backend CI/CD Pipeline / E2E Tests Backend (push) Has been cancelled
Backend CI/CD Pipeline / Build Backend Application (push) Has been cancelled
Backend CI/CD Pipeline / Performance Testing (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
Add backend with analytics, notifications, and enhanced features
Backend:
- Complete NestJS backend implementation with comprehensive features
- Analytics: Weekly/monthly reports with PDF/CSV export
- Smart notifications: Persistent notifications with milestones and anomaly detection
- AI safety: Medical disclaimer triggers and prompt injection protection
- COPPA/GDPR compliance: Full audit logging system

Frontend:
- Updated settings page and analytics components
- API integration improvements

Docs:
- Added implementation gaps tracking
- Azure OpenAI integration documentation
- Testing and post-launch summaries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 15:22:50 +03:00

32 lines
675 B
TypeScript

import apiClient from './client';
export interface UserPreferences {
notifications?: boolean;
emailUpdates?: boolean;
darkMode?: boolean;
}
export interface UpdateProfileData {
name?: string;
preferences?: UserPreferences;
}
export interface UserProfile {
id: string;
email: string;
name: string;
role: string;
locale: string;
emailVerified: boolean;
preferences?: UserPreferences;
families?: string[];
}
export const usersApi = {
// Update user profile
updateProfile: async (data: UpdateProfileData): Promise<UserProfile> => {
const response = await apiClient.patch('/api/v1/auth/profile', data);
return response.data.data;
},
};