api: Add typing to view function signatures
Because parameters of Web API view functions were not typed, mypy was not processing the body of those functions and thus typing errors could be missed.
So add typing to these function signatures and fix new mypy errors now new code is processed.
Migrated from D7959 (view on Phabricator)