Files
keinasystem/backend/apps/mail/urls.py
Akira 7a1aa81f9f 実装完了
作成・変更したファイル
バックエンド(新規):

apps/mail/models.py — MailSender, MailEmail, MailNotificationToken
apps/mail/serializers.py
apps/mail/views.py — Windmill用API、フィードバック、ルール管理
apps/mail/urls.py
apps/mail/admin.py
マイグレーション(自動生成・適用済み)
バックエンド(変更):

settings.py — apps.mail 追加、MAIL_API_KEY/FRONTEND_URL 環境変数
urls.py — /api/mail/ 追加
フロントエンド(新規):

mail/feedback/[token]/page.tsx — 認証不要、フィードバック3択+スコープ選択
mail/rules/page.tsx — ルール管理(一覧・追加・削除)
フロントエンド(変更):

Navbar.tsx — 「メールルール」メニュー追加
types/index.ts — MailSender, MailEmailFeedback 型追加
次のステップ(Windmill側)
Keinaシステム側の実装は完了しています。次はWindmillにIMAPポーリングスクリプトを書く必要があります。Windmillのスクリプトが必要になったタイミングでお声がけください。
2026-02-22 09:27:27 +09:00

20 lines
761 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from . import views
router = DefaultRouter()
router.register(r'senders', views.MailSenderViewSet, basename='mail-sender')
urlpatterns = [
# Windmill向けAPIAPIキー認証
path('sender-rule/', views.SenderRuleView.as_view(), name='mail-sender-rule'),
path('sender-context/', views.SenderContextView.as_view(), name='mail-sender-context'),
path('emails/', views.MailEmailCreateView.as_view(), name='mail-email-create'),
# フィードバック認証不要、UUIDトークン
path('feedback/<uuid:token>/', views.FeedbackView.as_view(), name='mail-feedback'),
# ルール管理JWT認証
path('', include(router.urls)),
]