Skip to content

[feat] 웹에서 Webhook 관리 기능 추가 및 OpenAPI 문서 제거#178

Merged
ZaMan0806 merged 5 commits into
developfrom
feat/webhook-web-management
Jun 8, 2026
Merged

[feat] 웹에서 Webhook 관리 기능 추가 및 OpenAPI 문서 제거#178
ZaMan0806 merged 5 commits into
developfrom
feat/webhook-web-management

Conversation

@ZaMan0806

@ZaMan0806 ZaMan0806 commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

개요 💡

서버에서 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개 페이지 삭제 (개요·등록·목록·수정·삭제·이벤트 명세·서명 검증)
  • 문서 네비게이션에서 Webhook 블록 제거
  • /api/http 엔드포인트 표의 Webhook 행 및 안내 링크 제거
  • /api 권한 범위 표의 WEBHOOK_WRITE 행 제거

feat: 웹에서 Webhook 관리 기능 추가 (client 앱)

  • shared: webhookUrl / webhookQueryKeys 추가(/v1/webhooks), 네비게이션에 Webhook 탭(/webhooks) 추가
  • entities/webhooks: 서버 응답(snake_case) 타입, 이벤트 9종 상수, zod 폼 스키마
  • views/webhooks: useGetWebhooks, WebhooksPage(계정당 최대 10개 도달 시 추가 버튼 비활성 + 안내)
  • widgets/webhooks: 생성/수정/삭제 mutation 훅, 이벤트 선택 훅, 폼 다이얼로그, 목록 테이블, secret 1회 노출 성공 다이얼로그

기존 OAuth Client 관리 기능과 동일한 FSD 구조를 따랐고, 인증은 axios 인터셉터의 JWT 자동 부착을 그대로 재사용합니다. 요청/응답 계약은 스테이지 Swagger로 교차 확인했습니다.

스크린샷/동영상 📸

스크린샷 2026-06-05 오후 11 13 56

관련 이슈 🚨

리뷰 요청사항 👀

  • 서버 DTO가 target_url / is_active / created_at 등 snake_case로 직렬화되어, 프론트 타입도 snake_case로 두고 폼만 camelCase→snake_case로 매핑했습니다. 이 방식이 적절한지 봐주세요.
  • 이벤트 목록은 서버 WebhookEvent enum 고정 9종이라 조회 API 없이 프론트 상수로 정의했습니다. 향후 이벤트 추가 시 동기화 전략에 대한 의견 부탁드립니다.
  • 목록은 서버가 페이지네이션 없이 { webhooks: [...] }로 반환하여 단일 테이블로 구성했습니다.

ZaMan0806 added 2 commits June 5, 2026 23:16
서버에서 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회 노출 성공 다이얼로그
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
datagsm-front-admin Ready Ready Preview, Comment Jun 5, 2026 2:58pm
datagsm-front-client Ready Ready Preview, Comment Jun 5, 2026 2:58pm
datagsm-front-docs Ready Ready Preview, Comment Jun 5, 2026 2:58pm
datagsm-front-oauth Ready Ready Preview, Comment Jun 5, 2026 2:58pm
datagsm-front-status Ready Ready Preview, Comment Jun 5, 2026 2:58pm

Request Review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread apps/client/src/entities/webhooks/model/schema.ts
Comment thread apps/client/src/widgets/webhooks/ui/WebhookFormDialog/index.tsx
Comment thread apps/client/src/widgets/webhooks/ui/WebhookFormDialog/index.tsx Outdated
Comment thread apps/client/src/widgets/webhooks/ui/WebhookFormDialog/index.tsx Outdated
Comment thread apps/client/src/widgets/webhooks/ui/WebhookFormDialog/index.tsx Outdated
ZaMan0806 added 3 commits June 5, 2026 23:27
isInitialized ref로 다이얼로그가 열리는 시점에만 폼을 reset하도록 가드를 추가.
React Query 자동 refetch로 webhook 참조가 바뀌어도 수정 중인 입력 값이
유지됩니다.
onSubmit이 edit 모드도 처리하도록 통합하고 저장 버튼을 type="submit"으로
변경. 입력 필드에서 엔터를 눌러도 수정 확인 다이얼로그가 정상적으로 열립니다.
중복되던 onSaveClick 핸들러를 제거했습니다.

@junjuny0227 junjuny0227 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다

@ZaMan0806 ZaMan0806 merged commit 135e911 into develop Jun 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[task] webhook 문서 작업 [task] webhook CRUD 페이지 구현

2 participants