feat: 웹훅 설정 API 구현 (#144) #145

Merged
seonkyu.kim merged 1 commits from feature/#144-webhook-config into develop 2026-02-11 01:06:27 +00:00
Owner

📋 작업 요약

  • 서비스별 웹훅 URL 및 구독 이벤트 타입을 설정/조회하는 API 구현
  • Service 엔티티에 WebhookEvents 컬럼 추가 (JSON 배열)
  • 이벤트 타입: push_sent, push_failed, push_clicked

Closes #144

🛠️ 작업 내용 (Changes)

  • SPMS.Domain/Entities/Service.cs — WebhookEvents(string?) 필드 추가
  • SPMS.Infrastructure/Migrations/ — AddWebhookEventsToService 마이그레이션
  • SPMS.Application/DTOs/Service/WebhookConfigRequestDto.cs — 설정 요청 DTO (service_code, webhook_url, events)
  • SPMS.Application/DTOs/Service/WebhookConfigResponseDto.cs — 응답 DTO (webhook_url, events, is_active)
  • SPMS.Application/Interfaces/IServiceManagementService.cs — ConfigureWebhookAsync, GetWebhookConfigAsync 추가
  • SPMS.Application/Services/ServiceManagementService.cs — 웹훅 설정/조회 구현 (이벤트 검증 포함)
  • SPMS.API/Controllers/ServiceController.cs — webhook/config, webhook/info 엔드포인트 추가

📢 리뷰어 참고 사항 (To Reviewers)

  • 유효한 이벤트 타입: push_sent, push_failed, push_clicked (그 외 입력 시 400 에러)
  • is_active: webhook_url이 있고 구독 이벤트가 1개 이상일 때 true
  • webhook_url을 null로 설정하면 웹훅 비활성화
  • ServiceController는 Super Admin 전용 (ServiceCodeMiddleware 우회), service_code를 body에서 받음

체크리스트 (Self Checklist)

  • 빌드(Build)가 성공적으로 수행되었는가?
  • 모든 단위 테스트(Unit Test)를 통과하였는가?
  • 불필요한 로그나 주석을 제거하였는가?
  • 컨벤션(Clean Architecture, Naming)을 준수하였는가?
  • 기밀 정보(비밀번호, 키 등)가 하드코딩 되어있지 않은가?

📸 스크린샷 / 테스트 로그 (Screenshots/Logs)

Build succeeded.
    0 Warning(s)
    0 Error(s)
## 📋 작업 요약 - 서비스별 웹훅 URL 및 구독 이벤트 타입을 설정/조회하는 API 구현 - Service 엔티티에 WebhookEvents 컬럼 추가 (JSON 배열) - 이벤트 타입: push_sent, push_failed, push_clicked ## 🔗 관련 이슈 (Related Issues) Closes #144 ## 🛠️ 작업 내용 (Changes) - [x] SPMS.Domain/Entities/Service.cs — WebhookEvents(string?) 필드 추가 - [x] SPMS.Infrastructure/Migrations/ — AddWebhookEventsToService 마이그레이션 - [x] SPMS.Application/DTOs/Service/WebhookConfigRequestDto.cs — 설정 요청 DTO (service_code, webhook_url, events) - [x] SPMS.Application/DTOs/Service/WebhookConfigResponseDto.cs — 응답 DTO (webhook_url, events, is_active) - [x] SPMS.Application/Interfaces/IServiceManagementService.cs — ConfigureWebhookAsync, GetWebhookConfigAsync 추가 - [x] SPMS.Application/Services/ServiceManagementService.cs — 웹훅 설정/조회 구현 (이벤트 검증 포함) - [x] SPMS.API/Controllers/ServiceController.cs — webhook/config, webhook/info 엔드포인트 추가 ## 📢 리뷰어 참고 사항 (To Reviewers) - 유효한 이벤트 타입: push_sent, push_failed, push_clicked (그 외 입력 시 400 에러) - is_active: webhook_url이 있고 구독 이벤트가 1개 이상일 때 true - webhook_url을 null로 설정하면 웹훅 비활성화 - ServiceController는 Super Admin 전용 (ServiceCodeMiddleware 우회), service_code를 body에서 받음 ## ✅ 체크리스트 (Self Checklist) - [x] 빌드(Build)가 성공적으로 수행되었는가? - [x] 모든 단위 테스트(Unit Test)를 통과하였는가? - [x] 불필요한 로그나 주석을 제거하였는가? - [x] 컨벤션(Clean Architecture, Naming)을 준수하였는가? - [x] 기밀 정보(비밀번호, 키 등)가 하드코딩 되어있지 않은가? ## 📸 스크린샷 / 테스트 로그 (Screenshots/Logs) ``` Build succeeded. 0 Warning(s) 0 Error(s) ```
seonkyu.kim added this to the Phase 3-2: 통계 & Webhook & 배치 milestone 2026-02-11 01:04:14 +00:00
seonkyu.kim added 1 commit 2026-02-11 01:04:15 +00:00
seonkyu.kim added the
Priority
High
Status
In Progress
Type
Feature
labels 2026-02-11 01:04:32 +00:00
seonkyu.kim self-assigned this 2026-02-11 01:04:39 +00:00
seonkyu.kim requested review from Owners 2026-02-11 01:04:44 +00:00
seonkyu.kim merged commit b5de3ca2d1 into develop 2026-02-11 01:06:27 +00:00
seonkyu.kim deleted branch feature/#144-webhook-config 2026-02-11 01:06:54 +00:00
seonkyu.kim added
Status
Done
and removed
Status
In Progress
labels 2026-02-11 01:07:16 +00:00
Sign in to join this conversation.
No description provided.