2022-06-03 08:09:47 -06:00
|
|
|
from django.urls import path
|
|
|
|
|
|
2024-07-03 16:55:54 +01:00
|
|
|
from common.api_helpers.optional_slash_router import optional_slash_path
|
|
|
|
|
|
2022-06-03 08:09:47 -06:00
|
|
|
from .views import (
|
|
|
|
|
InstallLinkRedirectView,
|
|
|
|
|
OAuthSlackView,
|
|
|
|
|
ResetSlackView,
|
|
|
|
|
SignupRedirectView,
|
|
|
|
|
SlackEventApiEndpointView,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
2024-06-03 17:07:10 +08:00
|
|
|
# Old urls for handling slack events and interactive messages. Currently used in OSS
|
2022-06-03 08:09:47 -06:00
|
|
|
path("event_api_endpoint/", SlackEventApiEndpointView.as_view()),
|
|
|
|
|
path("interactive_api_endpoint/", SlackEventApiEndpointView.as_view()),
|
2024-06-03 17:07:10 +08:00
|
|
|
# New urls used in cloud via chatops-proxy v3.
|
2024-07-03 16:55:54 +01:00
|
|
|
optional_slash_path("events", SlackEventApiEndpointView.as_view()),
|
|
|
|
|
optional_slash_path("interactive", SlackEventApiEndpointView.as_view()),
|
2024-06-03 17:07:10 +08:00
|
|
|
# Trailing / is missing here on purpose. QA the feature if you want to add it. No idea why doesn't it work with it.
|
|
|
|
|
path("reset_slack", ResetSlackView.as_view(), name="reset-slack"),
|
|
|
|
|
# Deprecated.
|
2022-06-03 08:09:47 -06:00
|
|
|
path("oauth/", OAuthSlackView.as_view()),
|
|
|
|
|
path("oauth/<str:subscription>/<str:utm>/", OAuthSlackView.as_view()),
|
|
|
|
|
path("install_redirect/", InstallLinkRedirectView.as_view()),
|
|
|
|
|
path("install_redirect/<str:subscription>/<str:utm>/", InstallLinkRedirectView.as_view()),
|
|
|
|
|
path("signup_redirect/", SignupRedirectView.as_view()),
|
|
|
|
|
path("signup_redirect/<str:subscription>/<str:utm>/", SignupRedirectView.as_view()),
|
|
|
|
|
]
|