[feat] 웹에서 Webhook 관리 기능 추가 및 OpenAPI 문서 제거#178
Conversation
서버에서 Webhook CRUD가 OpenAPI(API Key)에서 웹 로그인(JWT) 기반으로 이동(datagsm-server#353)하여, API Key로 호출하는 공개 Webhook 관리 API가 더 이상 존재하지 않으므로 관련 문서를 모두 제거합니다. - /api/webhook 문서 7개 페이지 삭제 (개요·등록·목록·수정·삭제·이벤트 명세·서명 검증) - 네비게이션(constants.ts)에서 Webhook 블록 제거 - /api/http 엔드포인트 표의 Webhook 행 및 안내 링크 제거 - /api 권한 범위 표의 WEBHOOK_WRITE 행 제거
Webhook CRUD가 웹 로그인(JWT) 기반으로 전환됨에 따라(datagsm-server#353), client 앱에 로그인 사용자가 본인 Webhook을 등록·조회·수정·삭제하는 UI를 추가합니다. 인증은 기존 axios 인터셉터의 JWT 자동 부착을 그대로 재사용하며, 기존 OAuth Client 관리 기능과 동일한 FSD 구조를 따릅니다. - shared: webhookUrl / webhookQueryKeys 추가 (/v1/webhooks) - shared: 네비게이션에 Webhook 탭 추가 (/webhooks) - entities/webhooks: 타입(서버 snake_case 응답), 이벤트 9종 상수, zod 폼 스키마 - views/webhooks: useGetWebhooks, WebhooksPage (10개 제한 시 추가 버튼 비활성) - widgets/webhooks: 생성/수정/삭제 mutation 훅, 이벤트 선택 훅, 폼 다이얼로그, 목록, secret 1회 노출 성공 다이얼로그
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request implements a comprehensive Webhook management feature in the client application, including pages, widgets, state management hooks, and API integrations, while removing the corresponding standalone API documentation. The review feedback identifies several key issues: a critical runtime error in the Zod schema due to the non-existent z.url() method, a potential UX bug where background refetches could reset active form fields, a form submission failure in edit mode when pressing the Enter key, and a minor typo in a Tailwind CSS class name (text-ms).
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
isInitialized ref로 다이얼로그가 열리는 시점에만 폼을 reset하도록 가드를 추가. React Query 자동 refetch로 webhook 참조가 바뀌어도 수정 중인 입력 값이 유지됩니다.
onSubmit이 edit 모드도 처리하도록 통합하고 저장 버튼을 type="submit"으로 변경. 입력 필드에서 엔터를 눌러도 수정 확인 다이얼로그가 정상적으로 열립니다. 중복되던 onSaveClick 핸들러를 제거했습니다.
9af77b3 to
5db7e63
Compare
개요 💡
서버에서 Webhook CRUD가
datagsm-openapi(API Key +WEBHOOK_WRITE스코프)에서datagsm-web(JWT 로그인) 모듈로 이동했습니다(themoment-team/datagsm-server#353). 이제 외부 개발자가 API Key로 호출하는 공개 API가 아니라 로그인한 사용자가 웹에서 직접 관리하는 기능입니다.이에 따라 ① 더 이상 유효하지 않은 OpenAPI 기반 Webhook 문서를 제거하고, ②
client앱에 사용자가 본인 Webhook을 관리하는 UI를 추가합니다.작업내용 ⌨️
커밋을 문서 제거와 웹 구현 두 개로 분리했습니다.
docs: OpenAPI 기반 Webhook 문서 제거/api/webhook문서 7개 페이지 삭제 (개요·등록·목록·수정·삭제·이벤트 명세·서명 검증)/api/http엔드포인트 표의 Webhook 행 및 안내 링크 제거/api권한 범위 표의WEBHOOK_WRITE행 제거feat: 웹에서 Webhook 관리 기능 추가 (client앱)webhookUrl/webhookQueryKeys추가(/v1/webhooks), 네비게이션에Webhook탭(/webhooks) 추가useGetWebhooks,WebhooksPage(계정당 최대 10개 도달 시 추가 버튼 비활성 + 안내)기존 OAuth Client 관리 기능과 동일한 FSD 구조를 따랐고, 인증은 axios 인터셉터의 JWT 자동 부착을 그대로 재사용합니다. 요청/응답 계약은 스테이지 Swagger로 교차 확인했습니다.
스크린샷/동영상 📸
관련 이슈 🚨
datagsm-openapi에서datagsm-web모듈로 이동 datagsm-server#353리뷰 요청사항 👀
target_url/is_active/created_at등 snake_case로 직렬화되어, 프론트 타입도 snake_case로 두고 폼만 camelCase→snake_case로 매핑했습니다. 이 방식이 적절한지 봐주세요.WebhookEventenum 고정 9종이라 조회 API 없이 프론트 상수로 정의했습니다. 향후 이벤트 추가 시 동기화 전략에 대한 의견 부탁드립니다.{ webhooks: [...] }로 반환하여 단일 테이블로 구성했습니다.