HealthSync_BE/design/API 설계서.txt

27 lines
8.4 KiB
Plaintext

사용자 컨텍스트|User Service|USR-001|구글 로그인|AuthController|Google OAuth 인증 처리|POST|/api/users|/auth/google-login||||GoogleLoginRequest|FALSE|{googleAccessToken: String, googleIdToken: String}|LoginResponse|FALSE|{accessToken: String, refreshToken: String, userId: String, isNewUser: boolean, message: String}
사용자 컨텍스트|User Service|USR-002|프로필 완료|AuthController|사용자 프로필 정보 저장|POST|/api/users|/profile/complete||||UserRegistrationRequest|FALSE|{name: String, birthDate: String, occupation: String}|UserRegistrationResponse|FALSE|{userId: String, message: String, status: String, profileCompletedAt: String}
사용자 컨텍스트|User Service|USR-003|사용자 기본 정보 조회|AuthController|사용자 프로필 조회|GET|/api/users|/profile|||||||UserProfileResponse|FALSE|{userId: String, name: String, age: int, occupation: String, registeredAt: String, lastLoginAt: String}
사용자 컨텍스트|User Service||직업 코드 변환|UserController|직업명을 코드로 변환|GET|/api/users|/occupations/code||occupationName <String> occupationName|||||OccupationCodeResponse|FALSE|{occupationCode: String, occupationName: String}
사용자 컨텍스트|User Service||직업명 조회|UserController|직업 코드를 명칭으로 변환|GET|/api/users|/occupations/name||occupationCode <String> occupationCode|||||OccupationNameResponse|FALSE|{occupationCode: String, occupationName: String}
사용자 컨텍스트|User Service||전체 직업 목록|UserController|모든 직업 목록 조회|GET|/api/users|/occupations|||||||OccupationListResponse|TRUE|{occupations: [{occupationCode: String, occupationName: String, category: String}], totalCount: int}
건강 컨텍스트|Health Service|USR-009|건강검진 연동|HealthController|건강보험공단 건강검진 데이터 연동|POST|/api/health|/checkup/sync||userId <String> userId|||||HealthSyncResponse|FALSE|{syncedRecords: int, newRecords: int, updatedRecords: int, skippedRecords: int, lastSyncedCheckup: Object, message: String}
건강 컨텍스트|Health Service||건강검진 이력 조회|HealthController|사용자 건강검진 이력 조회|GET|/api/health|/checkup/history||limit <int> limit|||||HealthHistoryResponse|FALSE|{checkupHistory: [{referenceYear: int, heightCm: double, weightKg: double, waistCm: double, bmi: double, systolicBp: int, diastolicBp: int, fastingGlucose: int, totalCholesterol: int, healthScore: int, riskLevel: String, abnormalIndicators: [String], analysisDate: String}], totalRecords: int, averageHealthScore: double, trendAnalysis: String, normalRangeReference: Object}
건강 컨텍스트|Health Service||건강검진 파일 업로드|HealthController|건강검진 파일 Azure Blob 저장|POST|/api/health|/checkup/upload||||CheckupFileRequest|FALSE|{userId: String, fileName: String, fileType: String, fileContent: String}|FileUploadResponse|FALSE|{fileId: String, uploadUrl: String, status: String, message: String}
건강 컨텍스트|Health Service||정상치 기준 조회|HealthController|성별별 건강검진 정상치 기준|GET|/api/health|/normal-ranges||genderCode <int> genderCode|||||NormalRangeResponse|TRUE|{normalRanges: [{itemCode: String, itemName: String, genderCode: int, normalMin: double, normalMax: double, cautionMin: double, cautionMax: double, dangerMin: double, dangerMax: double, unit: String}], genderCode: int}
목표 컨텍스트|Goal Service|USR-010|목표 설정 시작|GoalController|미션 선택 및 목표 설정|POST|/api/goals|/missions/select||||MissionSelectionRequest|FALSE|{userId: String, selectedMissionIds: [String]}|GoalSetupResponse|FALSE|{goalId: String, selectedMissions: [{missionId: String, title: String, description: String, startDate: String}], message: String, setupCompletedAt: String}
목표 컨텍스트|Goal Service|USR-011|설정한 목표 관리|GoalController|설정된 목표 조회|GET|/api/goals|/missions/active|||||||ActiveMissionsResponse|FALSE|{dailyMissions: [{missionId: String, title: String, description: String, status: String, completedToday: boolean, streakDays: int, nextReminderTime: String}], totalMissions: int, todayCompletedCount: int, completionRate: double}
목표 컨텍스트|Goal Service|USR-012|목표 달성 기록|GoalController|미션 완료 처리|PUT|/api/goals|/missions/{missionId}/complete|missionId <String> missionId|||MissionCompleteRequest|FALSE|{userId: String, completed: boolean, completedAt: String, notes: String}|MissionCompleteResponse|FALSE|{message: String, status: String, achievementMessage: String, newStreakDays: int, totalCompletedCount: int, earnedPoints: int}
목표 컨텍스트|Goal Service|USR-013|목표 달성 이력|GoalController|미션 달성 이력 조회|GET|/api/goals|/missions/history||startDate <String> startDate, endDate <String> endDate, missionIds <String> missionIds|||||MissionHistoryResponse|FALSE|{totalAchievementRate: double, periodAchievementRate: double, bestStreak: int, missionStats: [{missionId: String, title: String, achievementRate: double, completedDays: int, totalDays: int}], chartData: Object, period: {startDate: String, endDate: String}, insights: [String]}
목표 컨텍스트|Goal Service||목표 재설정|GoalController|미션 재설정|POST|/api/goals|/missions/reset||||MissionResetRequest|FALSE|{userId: String, reason: String, currentMissionIds: [String]}|MissionResetResponse|FALSE|{message: String, newRecommendations: [{missionId: String, title: String, description: String, category: String}], resetCompletedAt: String}
지능형서비스 컨텍스트|Intelligence Service|USR-004|AI 3줄 요약 진단|AnalysisController|건강검진 결과 AI 3줄 요약|GET|/api/intelligence|/health/diagnosis||userId <String> userId|||||HealthDiagnosisResponse|FALSE|{threeSentenceSummary: [String], healthScore: int, riskLevel: String, occupationConsiderations: String, analysisTimestamp: String, confidenceScore: double}
지능형서비스 컨텍스트|Intelligence Service|USR-004|AI 추천 건강 미션|AnalysisController|AI 기반 미션 추천|POST|/api/intelligence|/missions/recommend||||MissionRecommendationRequest|FALSE|{userId: String, currentHealthStatus: String, preferences: [String]}|MissionRecommendationResponse|FALSE|{missions: [{missionId: String, title: String, description: String, category: String, difficulty: String, healthBenefit: String, occupationRelevance: String, estimatedTimeMinutes: int}], recommendationReason: String, totalRecommended: int}
지능형서비스 컨텍스트|Intelligence Service|USR-005|챗봇 상담|ChatController|AI 채팅 상담|POST|/api/intelligence|/chat/consultation||||ChatRequest|FALSE|{message: String, sessionId: String, context: String}|ChatResponse|FALSE|{response: String, sessionId: String, timestamp: String, suggestedQuestions: [String], responseType: String}
지능형서비스 컨텍스트|Intelligence Service||채팅 히스토리 조회|ChatController|채팅 기록 조회|GET|/api/intelligence|/chat/history||sessionId <String> sessionId, limit <int> messageLimit|||||ChatHistoryResponse|FALSE|{sessionId: String, messages: [{role: String, content: String, timestamp: String}], totalMessageCount: int, cacheExpiration: String}
지능형서비스 컨텍스트|Intelligence Service|USR-007|미션 달성 축하|NotificationController|미션 달성 축하 메시지|POST|/api/intelligence|/notifications/celebration||||CelebrationRequest|FALSE|{userId: String, missionId: String, achievementType: String, consecutiveDays: int, totalAchievements: int}|CelebrationResponse|FALSE|{congratsMessage: String, achievementBadge: String, healthBenefit: String, nextMilestone: String, encouragementLevel: String, visualEffect: String}
지능형서비스 컨텍스트|Intelligence Service|USR-006|미션 독려|NotificationController|미션 독려 메시지 생성|POST|/api/intelligence|/notifications/encouragement||||EncouragementRequest|FALSE|{userId: String, missionsStatus: [{missionId: String, completed: boolean}]}|EncouragementResponse|FALSE|{message: String, motivationType: String, timing: String, personalizedTip: String, priority: String}
지능형서비스 컨텍스트|Intelligence Service||배치 알림 처리|BatchController|주기적 AI 알림 트리거|POST|/api/intelligence|/batch/notifications||||BatchNotificationRequest|FALSE|{triggerTime: String, targetUsers: [String], notificationType: String}|BatchNotificationResponse|FALSE|{processedCount: int, successCount: int, failedCount: int, nextScheduledTime: String}