"""URL patterns for integrations (OAuth callbacks, webhooks).

This module aggregates URL patterns from integration sub-modules.
Each integration has its own urls.py that can be included here.

Note: For backward compatibility, we keep the flat URL structure here
rather than nesting (e.g., /github/callback/ instead of /github/github/callback/).
The sub-module URLs are also available for direct include if needed.
"""

from django.urls import path

from . import views

app_name = "integrations"

# Main URL patterns - flat structure for backward compatibility
urlpatterns = [
    # GitHub OAuth and webhooks
    path("github/callback/", views.github_oauth_callback, name="github_callback"),
    path("github/webhook/", views.github_webhook, name="github_webhook"),
    # LinkedIn OAuth
    path("linkedin/callback/", views.linkedin_oauth_callback, name="linkedin_callback"),
]

# Note: Sub-module URLs are also available at:
# - integrations.github.urls (github_callback, github_webhook)
# - integrations.linkedin.urls (linkedin_callback)
# These can be used with include() if namespaced routing is preferred.
