mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 09:26:05 +00:00
a3674974f1
Adds DB tables for storing push subscriptions, some DB interaction code for retrieving them within MediaWiki, and a set of API modules for managing them from the outside world. When testing this patch, be sure to run maintenance/update.php to create the new tables, and set $wgEchoEnablePush = true in LocalSettings.php to enable the API new API module. N.B. The current DB schema is centered on app push subscriptions. Web push subscriptions require slightly different handling, since they are provided by browsers as a JSON blob rather than a token string. How to handle web push subscriptions is a question we can defer until the time comes to add web push support. Subscription data is stored in the echo_push_subscription table, with provider names normalized into the echo_push_provider table. We expect to be looking up subscriptions by central user ID, so that column is indexed. The subscription data also includes a column to store SHA256 digests of the subscriber tokens. This is for use as a unique key constraint, since we expect every push token to be univerally unique, and the token values themselves may be too large to reasonably index in MySQL. Bug: T252899 Change-Id: I3928761b3fba12e54ff4850e9a05c68ec7772f62
84 lines
7.9 KiB
JSON
84 lines
7.9 KiB
JSON
{
|
|
"@metadata": {
|
|
"authors": [
|
|
"Brad Jorsch",
|
|
"Matthew Flaschen",
|
|
"Matthias Mullie",
|
|
"Moriel Schottlender",
|
|
"Roan Kattouw",
|
|
"Stephane Bisson"
|
|
]
|
|
},
|
|
"apihelp-echomarkread-description": "Mark notifications as read for the current user.",
|
|
"apihelp-echomarkread-summary": "Mark notifications as read for the current user.",
|
|
"apihelp-echomarkread-param-list": "A list of notification IDs to mark as read.",
|
|
"apihelp-echomarkread-param-unreadlist": "A list of notification IDs to mark as unread.",
|
|
"apihelp-echomarkread-param-all": "If set, marks all of a user's notifications as read.",
|
|
"apihelp-echomarkread-param-sections": "A list of sections to mark as read.",
|
|
"apihelp-echomarkread-param-wikis": "List of wikis to mark notification as read (defaults to only current wiki).",
|
|
"apihelp-echomarkread-example-1": "Mark notification 8 as read",
|
|
"apihelp-echomarkread-example-2": "Mark all notifications as read",
|
|
"apihelp-echomarkread-example-3": "Mark notification 1 as unread",
|
|
"apihelp-echomarkseen-description": "Mark notifications as seen for the current user.",
|
|
"apihelp-echomarkseen-summary": "Mark notifications as seen for the current user.",
|
|
"apihelp-echomarkseen-example-1": "Mark notifications of all types as seen",
|
|
"apihelp-echomarkseen-param-type": "Type of notifications to mark as seen: 'alert', 'message' or 'all'.",
|
|
"apihelp-echomarkseen-param-timestampFormat": "Timestamp format to use for output, 'ISO_8601' or 'MW'. 'MW' is deprecated here, so all clients should switch to 'ISO_8601'. This parameter will be removed, and 'ISO_8601' will become the only output format.",
|
|
"apihelp-echomute-description": "Mute or unmute notifications from certain users or pages.",
|
|
"apihelp-echomute-summary": "Mute or unmute notifications from certain users or pages.",
|
|
"apihelp-echomute-param-type": "Which mute list to add to or remove from",
|
|
"apihelp-echomute-param-mute": "Pages or users to add to the mute list",
|
|
"apihelp-echomute-param-unmute": "Pages or users to remove from the mute list",
|
|
"apihelp-echopushsubscriptions-summary": "Manage push subscriptions for the current user.",
|
|
"apihelp-echopushsubscriptions-param-command": "Action to perform.",
|
|
"apihelp-echopushsubscriptions+create-summary": "Register push subscriptions for the current user.",
|
|
"apihelp-echopushsubscriptions+create-param-provider": "The push service provider for which to register a token.",
|
|
"apihelp-echopushsubscriptions+create-param-providertoken": "The token to register.",
|
|
"apihelp-echopushsubscriptions+create-example": "Register a push subscription for the current user.",
|
|
"apihelp-echopushsubscriptions+delete-summary": "Unegister push subscriptions for the current user.",
|
|
"apihelp-echopushsubscriptions+delete-param-providertoken": "The token associated with the push subscription to unregister.",
|
|
"apihelp-echopushsubscriptions+delete-example": "Unregister a push subscription for the current user.",
|
|
"apihelp-query+notifications-description": "Get notifications waiting for the current user.",
|
|
"apihelp-query+notifications-summary": "Get notifications waiting for the current user.",
|
|
"apihelp-query+notifications-param-prop": "Details to request.",
|
|
"apihelp-query+notifications-param-sections": "The notification sections to query (i.e. some combination of 'alert' and 'message').",
|
|
"apihelp-query+notifications-param-groupbysection": "Whether to group the result by section. Each section is fetched separately if set.",
|
|
"apihelp-query+notifications-param-filter": "Filter notifications returned.",
|
|
"apihelp-query+notifications-param-format": "If specified, notifications will be returned formatted this way.",
|
|
"apihelp-query+notifications-paramvalue-format-model": "Raw notification data",
|
|
"apihelp-query+notifications-paramvalue-format-special": "Formatted for Special:Notifications page (and only that!) Do not rely on the HTML as it may change at any given time.",
|
|
"apihelp-query+notifications-paramvalue-format-flyout": "<span class=\"apihelp-deprecated\">Deprecated</span>. Use <kbd>$1format=model</kbd> for raw data",
|
|
"apihelp-query+notifications-paramvalue-format-html": "<span class=\"apihelp-deprecated\">Deprecated</span>. Use <kbd>$1format=model</kbd> for raw data",
|
|
"apihelp-query+notifications-param-limit": "The maximum number of notifications to return.",
|
|
"apihelp-query+notifications-param-wikis": "List of wikis to fetch notifications from (defaults to only current wiki).",
|
|
"apihelp-query+notifications-param-crosswikisummary": "True to opt in to a summary notification of notifications on foreign wikis.",
|
|
"apihelp-query+notifications-param-alertcontinue": "When more alert results are available, use this to continue.",
|
|
"apihelp-query+notifications-param-unreadfirst": "Whether to show unread notifications first (only used if groupbysection is not set).",
|
|
"apihelp-query+notifications-param-alertunreadfirst": "Whether to show unread message notifications first (only used if groupbysection is set).",
|
|
"apihelp-query+notifications-param-messagecontinue": "When more message results are available, use this to continue.",
|
|
"apihelp-query+notifications-param-messageunreadfirst": "Whether to show unread alert notifications first (only used if groupbysection is set).",
|
|
"apihelp-query+notifications-param-titles": "Only return notifications for these pages. To get notifications not associated with any page, use [] as a title.",
|
|
"apihelp-query+notifications-param-bundle": "Whether to show bundle compatible unread notifications according to notification types bundling rules.",
|
|
"apihelp-query+notifications-example-1": "List notifications",
|
|
"apihelp-query+notifications-example-2": "List notifications, grouped by section, with counts",
|
|
"apihelp-query+unreadnotificationpages-description": "Get pages for which there are unread notifications for the current user.",
|
|
"apihelp-query+unreadnotificationpages-summary": "Get pages for which there are unread notifications for the current user.",
|
|
"apihelp-query+unreadnotificationpages-param-grouppages": "Group talk pages together with their subject page, and group notifications not associated with a page together with the current user's user page.",
|
|
"apihelp-query+unreadnotificationpages-param-limit": "The maximum number of pages to return.",
|
|
"apihelp-query+unreadnotificationpages-param-wikis": "List of wikis to fetch pages with unread notifications from (defaults to only current wiki).",
|
|
"apihelp-query+unreadnotificationpages-example-1": "List pages with (their amount of) unread notifications",
|
|
"apihelp-echoarticlereminder-summary": "Request a future reminder about the specified article",
|
|
"apihelp-echoarticlereminder-param-pageid": "ID of article to remind the user about",
|
|
"apihelp-echoarticlereminder-param-title": "Title of article to remind the user about",
|
|
"apihelp-echoarticlereminder-param-timestamp": "On which timestamp to remind the user",
|
|
"apihelp-echoarticlereminder-param-comment": "Optional user comment to include in the reminder",
|
|
"apihelp-echoarticlereminder-example-1" : "Create an article reminder notification for tomorrow with comment",
|
|
"apihelp-echoarticlereminder-example-2" : "Create an article reminder notification for tomorrow without comment",
|
|
"apiwarn-echo-deprecation-timestampformat": "The MW timestamp output format is deprecated here. In the future, ISO 8601 will always be used for the output timestamp format. Adjust your client and set <var>timestampFormat</var> to <kbd>ISO_8601</kbd>.",
|
|
"apiwarn-echo-deprecation-flyout": "<kbd>notformat=flyout</kbd> has been deprecated and will be removed soon. Use <kbd>notformat=model</kbd> to get the raw data or <kbd>notformat=special</kbd> for pre-rendered HTML.",
|
|
"apiwarn-echo-deprecation-html": "<kbd>notformat=html</kbd> has been deprecated and will be removed soon. Use <kbd>notformat=special</kbd> instead.",
|
|
"apierror-echo-event-creation-failed": "Could not create Echo event",
|
|
"apierror-echo-push-token-exists": "The provided token already exists in the database.",
|
|
"apierror-echo-push-token-not-found": "The provided token was not found in the database."
|
|
}
|