Files
upstream-mirror 64898b2c79
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
2026-09-15 15:05:30 +05:00

72 lines
2.8 KiB
Python

from typing import Any
from django.conf.urls import include
from django.urls import path
from corporate.views.remote_billing_page import remote_realm_billing_entry
from zilencer.auth import remote_server_path
from zilencer.views import (
deactivate_remote_server,
register_remote_push_device,
register_remote_push_device_for_e2ee_push_notification,
register_remote_server,
remote_server_check_analytics,
remote_server_notify_push,
remote_server_post_analytics,
remote_server_send_e2ee_push_notification,
remote_server_send_test_notification,
transfer_remote_server_registration,
unregister_all_remote_push_devices,
unregister_remote_push_device,
verify_registration_transfer_challenge_ack_endpoint,
)
i18n_urlpatterns: Any = []
# Zilencer views following the REST API style
# The endpoints marked "intentionally_undocumented" are part of the older system
# for sending non-E2EE push notifications, and will be removed in the future.
push_bouncer_patterns = [
remote_server_path(
"remotes/push/register", POST=(register_remote_push_device, {"intentionally_undocumented"})
),
remote_server_path(
"remotes/push/e2ee/register", POST=register_remote_push_device_for_e2ee_push_notification
),
remote_server_path(
"remotes/push/unregister",
POST=(unregister_remote_push_device, {"intentionally_undocumented"}),
),
remote_server_path(
"remotes/push/unregister/all",
POST=(unregister_all_remote_push_devices, {"intentionally_undocumented"}),
),
remote_server_path(
"remotes/push/notify", POST=(remote_server_notify_push, {"intentionally_undocumented"})
),
remote_server_path("remotes/push/e2ee/notify", POST=remote_server_send_e2ee_push_notification),
remote_server_path(
"remotes/push/test_notification",
POST=(remote_server_send_test_notification, {"intentionally_undocumented"}),
),
# Push signup doesn't use the REST API, since there's no auth.
path("remotes/server/register", register_remote_server),
path("remotes/server/register/transfer", transfer_remote_server_registration),
path(
"remotes/server/register/verify_challenge",
verify_registration_transfer_challenge_ack_endpoint,
),
remote_server_path("remotes/server/deactivate", POST=deactivate_remote_server),
# For receiving table data used in analytics and billing
remote_server_path("remotes/server/analytics", POST=remote_server_post_analytics),
remote_server_path("remotes/server/analytics/status", GET=remote_server_check_analytics),
]
billing_patterns = [remote_server_path("remotes/server/billing", POST=remote_realm_billing_entry)]
v1_api_bouncer_patterns = push_bouncer_patterns + billing_patterns
urlpatterns = [
path("api/v1/", include(v1_api_bouncer_patterns)),
]