discourse/spec/requests/api/schemas/json
Selase Krakani 862007fb18
FEATURE: Add support for case-sensitive Watched Words (#17445)
* FEATURE: Add case-sensitivity flag to watched_words

Currently, all watched words are matched case-insensitively. This flag
allows a watched word to be flagged for case-sensitive matching.
To allow allow for backwards compatibility the flag is set to false by
default.

* FEATURE: Support case-sensitive creation of Watched Words via API

Extend admin creation and upload of Watched Words to support case
sensitive flag. This lays the ground work for supporting
case-insensitive matching of Watched Words.

Support for an extra column has also been introduced for the Watched
Words upload CSV file. The new column structure is as follows:

 word,replacement,case_sentive

* FEATURE: Enable case-sensitive matching of Watched Words

WordWatcher's word_matcher_regexp now returns a list of regular
expressions instead of one case-insensitive regular expression.

With the ability to flag a Watched Word as case-sensitive, an action
can have words of both sensitivities.This makes the use of the global
Regexp::IGNORECASE flag added to all words problematic.

To get around platform limitations around the use of subexpression level
switches/flags, a list of regular expressions is returned instead, one for each
case sensitivity.

Word matching has also been updated to use this list of regular expressions
instead of one.

* FEATURE: Use case-sensitive regular expressions for Watched Words

Update Watched Words regular expressions matching and processing to handle
the extra metadata which comes along with the introduction of
case-sensitive Watched Words.

This allows case-sensitive Watched Words to matched as such.

* DEV: Simplify type casting of case-sensitive flag from uploads

Use builtin semantics instead of a custom method for converting
string case flags in uploaded Watched Words to boolean.

* UX: Add case-sensitivity details to Admin Watched Words UI

Update Watched Word form to include a toggle for case-sensitivity.
This also adds support for, case-sensitive testing and matching of  Watched Word
in the admin UI.

* DEV: Code improvements from review feedback

 - Extract watched word regex creation out to a utility function
 - Make JS array presence check more explicit and readable

* DEV: Extract Watched Word regex creation to utility function

Clean-up work from review feedback. Reduce code duplication.

* DEV: Rename word_matcher_regexp to word_matcher_regexp_list

Since a list is returned now instead of a single regular expression,
change `word_matcher_regexp` to `word_matcher_regexp_list` to better communicate
this change.

* DEV:  Incorporate WordWatcher updates from upstream

Resolve conflicts and ensure apply_to_text does not remove non-word characters in matches
that aren't at the beginning of the line.
2022-08-02 10:06:03 +02:00
..
admin_user_list_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
admin_user_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
backups_create_request.json document api endpoints (#11958) 2021-02-03 17:12:35 -07:00
backups_list_response.json api docs example (#11997) 2021-02-08 10:09:44 -07:00
badge_create_request.json DEV: Document some of the badge api endpoints (#13919) 2021-08-03 06:25:12 -06:00
badge_create_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
badge_list_response.json DEV: Fix flaky admin badges.json api docs spec (#17210) 2022-06-23 14:32:17 -06:00
badge_update_request.json DEV: Document some of the badge api endpoints (#13919) 2021-08-03 06:25:12 -06:00
badge_update_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
category_create_request.json DEV: Update category api docs (#12017) 2021-02-09 06:27:23 -07:00
category_create_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
category_list_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
category_topics_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
category_update_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
group_add_members_request.json document api endpoints (#11958) 2021-02-03 17:12:35 -07:00
group_add_members_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
group_create_request.json DEV: Tidy up create group api endpoint docs (#17586) 2022-07-20 19:18:48 -06:00
group_create_response.json DEV: Tidy up create group api endpoint docs (#17586) 2022-07-20 19:18:48 -06:00
group_members_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
group_remove_members_request.json document api endpoints (#11958) 2021-02-03 17:12:35 -07:00
group_remove_members_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
group_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
groups_list_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
post_delete_request.json DEV: Document delete post API endpoint (#15495) 2022-01-07 16:09:32 -07:00
post_replies_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
search_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
site_response.json FEATURE: Add support for case-sensitive Watched Words (#17445) 2022-08-02 10:06:03 +02:00
success_ok_response.json document user endpoints (#11894) 2021-01-29 11:27:11 -07:00
tag_group_create_request.json
tag_group_create_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
topic_create_request.json DEV: Document external topic id endpoints (#15897) 2022-02-10 19:01:19 -07:00
topic_create_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
topic_show_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
upload_abort_multipart_request.json DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
upload_batch_presign_multipart_parts_request.json DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
upload_batch_presign_multipart_parts_response.json DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
upload_complete_external_upload_request.json DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
upload_complete_multipart_request.json DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
upload_create_multipart_request.json DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
upload_create_multipart_response.json DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
upload_create_request.json
upload_create_response.json
upload_generate_presigned_put_request.json DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
upload_generate_presigned_put_response.json DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
user_actions_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
user_anonymize_response.json DEV: Document anonymize user api endpoint (#13893) 2021-07-29 17:40:41 -06:00
user_badges_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
user_create_request.json FEATURE: API to create user's associated account (#15737) 2022-03-03 18:17:02 +02:00
user_create_response.json DEV: Refactor the api docs for the user endpoint (#14377) 2021-09-20 10:04:57 -06:00
user_delete_request.json document user endpoints (#11894) 2021-01-29 11:27:11 -07:00
user_delete_response.json document user endpoints (#11894) 2021-01-29 11:27:11 -07:00
user_emails_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
user_get_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00
user_password_change_request.json document api endpoints (#11958) 2021-02-03 17:12:35 -07:00
user_password_reset_request.json document api endpoints (#11958) 2021-02-03 17:12:35 -07:00
user_password_reset_response.json document api endpoints (#11958) 2021-02-03 17:12:35 -07:00
user_refresh_gravatar_response.json document user endpoints (#11894) 2021-01-29 11:27:11 -07:00
user_silence_request.json FIX: Show suspended by user (#16927) 2022-06-01 14:54:23 +02:00
user_silence_response.json FIX: Show suspended by user (#16927) 2022-06-01 14:54:23 +02:00
user_suspend_request.json DEV: Document the user suspend api endpoint (#12179) 2021-02-23 05:58:22 -07:00
user_suspend_response.json FIX: Show suspended by user (#16927) 2022-06-01 14:54:23 +02:00
user_update_avatar_request.json document user endpoints (#11894) 2021-01-29 11:27:11 -07:00
user_update_email_request.json document user endpoints (#11894) 2021-01-29 11:27:11 -07:00
user_update_request.json FEATURE: API to create user's associated account (#15737) 2022-03-03 18:17:02 +02:00
user_update_response.json FEATURE: API to create user's associated account (#15737) 2022-03-03 18:17:02 +02:00
user_update_username_request.json DEV: Update api docs to update username and to get post replies (#15881) 2022-02-09 15:04:36 -07:00
users_public_list_response.json repair structural problems with the openapi spec (#16710) 2022-06-20 10:56:56 -06:00