From 6d95eacaad235dc3fc195a962e5cf97505751a8f Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Sun, 17 Dec 2023 17:39:28 -0700 Subject: [PATCH] fix: Add more endpoints from TM admin --- docs/endpoints.md | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/docs/endpoints.md b/docs/endpoints.md index 5412938f..7087fb12 100644 --- a/docs/endpoints.md +++ b/docs/endpoints.md @@ -1,5 +1,14 @@ # REST API Endpoints +This is a comparison between the endpoint of Tasking Manager and the +Field Mapping Tasking Manager. The goal of the TM Admin project is to +support these endpoints. There is also not an obvious 1-1 relationship +between endpoints the support class in TM Adamin. Endpoints are higher +level than the code in TM Admin. + +For the common functions like querying the database by ID or name, +these are in a base class, so shared. + # Users Endpoints for managing User profiles. @@ -7,20 +16,20 @@ Endpoints for managing User profiles. | Tasking Manager | FMTM|TM Admin| |-----------------|-----|--------| |Get paged list of all usernames|Get Users|UsersDB.getAll()| -|Registers users without OpenStreetMap account|| +|Registers users without OpenStreetMap account||UsersDB.createTable()| |Updates user info||UsersDB.updateTable()| -|Resends the verification email token to the logged in user|| -|Get paged lists of users matching OpenStreetMap username filter|| -|Get user information by OpenStreetMap username|UsersDB.getByName()| -|Get stats about users registered within a period of time|| +|Get user information by OpenStreetMap username||UsersDB.getByName()| +|Get stats about users registered within a period of time||UsersDB.getByWhere()| |Get user information by id|Get User by ID|UsersDB.getByID()| +|Allows user to enable or disable expert mode||UsersDB.updateExpert()| +|Allows PMs to set a user's mapping level||UsersDB.updateMappingLevel()| +|Allows PMs to set a user's role||UsersDB.updateRole() |Get a list of tasks a user has interacted with|| -|Allows user to enable or disable expert mode|| -|Allows PMs to set a user's mapping level|| -|Allows PMs to set a user's role|Create User role| -|Get details from OpenStreetMap for a specified username|| +|Resends the verification email token to the logged in user|| |Get recommended projects for a user|| +|Get details from OpenStreetMap for a specified username|| |Get detailed stats about a user by OpenStreetMap username|| +|Get paged lists of users matching OpenStreetMap username filter|| ||Get User Roles| # Organizations @@ -31,7 +40,7 @@ Endpoints for managing Organization profiles. |-----------------|-----|--------| | List all organisations|Get Organization|OrganizationsDB.getAll()| | Creates a new organisation|Create Organization|OrganizationsDB.createTable()| -| Deletes an organisation|Delete Organizations||| +| Deletes an organisation|Delete Organizations|OrganizationsDB.deleteByID| | Retrieves an organisation|Get Organization Detail|OrganizationsDB.getByID()| | Updates an organisation|Update Organization|OrganizationsDB.updateTable()| | Return statistics about projects and active tasks of an organisation|| @@ -50,13 +59,13 @@ Endpoints for managing projects. |Get popular projects||projectsDB.getByWhere()| |Get similar projects||projectsDB.getByWhere()| |Gets projects user has mapped||projectsDB.getByWhere()| -|Deletes a Tasking-Manager project|Delete Project| +|Deletes a Tasking-Manager project|Delete Project|projectsDB.deleteByID()| |Get a specified project including it's area|Get Project Details|projectsDB.getByID()| |Updates a Tasking-Manager project|Update Project|projectsDB.updataTable()| -|Set a project as featured||projectsDB.updateTable()| +|Set a project as featured||projectsDB.updateColumn()| |Send message to all contributors of a project|| -|Unset a project as featured||projectsDB.updateTable()| -|Transfers a project to a new user||projectsDB.updateTable()| +|Unset a project as featured||projectsDB.updateColumn()| +|Transfers a project to a new user||projectsDB.updateColumn()| |Get all user activity on a project||projectsDB.getByWhere()| |Get latest user activity on all of project task||projectsDB.getByWhere()| |Get all user contributions on a project||projectsDB.getByWhere()| @@ -100,11 +109,11 @@ Endpoints for managing tasks in a project. |Get all tasks for a project as JSON|Read Tasks|tasksDB.getAll()| |Extends duration of locked tasks||tasksDB.getByWhere()| |Invalidate all validated tasks on a project||| -|Locks a task for mapping||tasksDB.updateTable()| -|Lock tasks for validation||tasksDB.updateTable()| +|Locks a task for mapping||tasksDB.updateColumn()| +|Lock tasks for validation||tasksDB.updateColumn()| |Map all tasks on a project|| |Set all bad imagery tasks as ready for mapping||tasksDB.updateTable()| -|Reset all tasks on project back to ready, preserving history||tasksDB.updateTable()| +|Reset all tasks on project back to ready, preserving history||| |Revert tasks by a specific user in a project|| |Split a task|| |Unlock a task that is locked for mapping resetting it to its last status||tasksDB.updateTable()|