Ivan - Update controller documentations

This commit is contained in:
ivan 2017-05-12 01:58:40 -03:00
parent 145b73b3c8
commit 6d58c44915
75 changed files with 473 additions and 321 deletions

View File

@ -35,4 +35,6 @@ This request will return you the session data with an `userId` and a `token`. Yo
**All the paths that have permission `user`, `staff1`, `staff2` or `staff3`, require *userId* and *token* to be passed as parameter**. You need to pass them as `csrf_userid` and `csrf_token` respectively.
If you don't pass the userId and token, a `NO_PERMISSION` error will be returned.
If you don't pass the userId and token, a `NO_PERMISSION` error will be returned.
Additionally, if there is no users (only staff members), you can check a ticket you created by providing your email and the ticketNumber to the `/ticket/check` path. This path will return you a `token` and `ticketNumber` you will use to comment, retrieve, or do any other operations to the ticket.

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/add-topic Add a new topic.
* @api {post} /article/add-topic Add topic
* @apiVersion 4.0.0
*
* @apiName Add topic
*
* @apiGroup article
* @apiGroup Article
*
* @apiDescription This path adds a new topic.
*
* @apiPermission Staff level 2
* @apiPermission staff2
*
* @apiParam {String} name Name of the new topic.
* @apiParam {String} icon Icon of the new topic.

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/add Add a article.
* @api {post} /article/add Add article
* @apiVersion 4.0.0
*
* @apiName Add
* @apiName Add article
*
* @apiGroup article
* @apiGroup Article
*
* @apiDescription This path adds a new article.
*
* @apiPermission Staff level 2
* @apiPermission staff2
*
* @apiParam {String} title Title of the new article.
* @apiParam {String} content Content of the new article.

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/delete-topic Delete a topic.
* @api {post} /article/delete-topic Delete topic
* @apiVersion 4.0.0
*
* @apiName Delete topic
*
* @apiGroup article
* @apiGroup Article
*
* @apiDescription This path deletes a topic.
*
* @apiPermission Staff level 2
* @apiPermission staff2
*
* @apiParam {Number} topicId Id of the topic.
*

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/delete Delete a article.
* @api {post} /article/delete Delete article
* @apiVersion 4.0.0
*
* @apiName Delete
* @apiName Delete article
*
* @apiGroup article
* @apiGroup Article
*
* @apiDescription This path deletes a article.
* @apiDescription This path deletes an article.
*
* @apiPermission Staff level 2
* @apiPermission staff2
*
* @apiParam {Number} articleId Id of the article.
*

View File

@ -3,20 +3,21 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/edit-topic Edit a topic.
* @api {post} /article/edit-topic Edit topic
* @apiVersion 4.0.0
*
* @apiName Edit topic
*
* @apiGroup article
* @apiGroup Article
*
* @apiDescription This path edits a topic.
*
* @apiPermission Staff level 2
* @apiPermission staff2
*
* @apiParam {Number} topicId Id of the topic.
* @apiParam {String} name The new name of the topic.
* @apiParam {String} icon The new icon of the topic.
* @apiParam {String} iconColor The new Icon's color of the topic.
* @apiParam {String} name The new name of the topic. Optional.
* @apiParam {String} icon The new icon of the topic. Optional.
* @apiParam {String} iconColor The new Icon's color of the topic. Optional.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_TOPIC

View File

@ -3,21 +3,22 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/edit Edit a article.
* @api {post} /article/edit Edit article
* @apiVersion 4.0.0
*
* @apiName Edit a article
*
* @apiGroup article
* @apiGroup Article
*
* @apiDescription This path edits a article.
* @apiDescription This path edits an article.
*
* @apiPermission Staff level 2
* @apiPermission staff2
*
* @apiParam {Number} articleId Id of the article.
* @apiParam {Number} topicId Id of the topic of the article.
* @apiParam {String} content The new content of the article.
* @apiParam {String} title The new title of the article.
* @apiParam {Number} position The new position of the article.
* @apiParam {Number} topicId Id of the topic of the article. Optional.
* @apiParam {String} content The new content of the article. Optional.
* @apiParam {String} title The new title of the article. Optional.
* @apiParam {Number} position The new position of the article. Optional.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_TOPIC

View File

@ -3,11 +3,12 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/get-all Retrieve all articles.
* @api {post} /article/get-all Get all articles
* @apiVersion 4.0.0
*
* @apiName Get all
* @apiName Get all articles
*
* @apiGroup article
* @apiGroup Article
*
* @apiDescription This path retrieves all the articles.
*

View File

@ -3,22 +3,23 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /staff/add Add a new staff member.
* @api {post} /staff/add Add staff
* @apiVersion 4.0.0
*
* @apiName Add
* @apiName Add staff
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path add a new staff member.
* @apiDescription This path adds a new staff member.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} name The name of the new staff member.
* @apiParam {String} email The email of the new staff member.
* @apiParam {String} password The password of the new staff member.
* @apiParam {Number} level The level of the new staff member.
* @apiParam {String} profilePic The profile pic of the new staff member.
* @apiParam {String} departments The departments that will have assigned the new staff member.
* @apiParam {Number[]} departments The departments that will have assigned the new staff member.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_NAME

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /staff/assign-ticket Assign a ticket to a staff member.
* @api {post} /staff/assign-ticket Assign ticket
* @apiVersion 4.0.0
*
* @apiName Assign ticket
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path assigns a ticket to a staff member.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {Number} ticketNumber The number of the ticket to assign.
*

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
use RedBeanPHP\Facade as RedBean;
/**
* @api {post} /staff/delete Delete a staff member.
* @api {post} /staff/delete Delete staff
* @apiVersion 4.0.0
*
* @apiName Delete
* @apiName Delete staff
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path deletes a staff member.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {Number} staffId The id of the staff member.
*

View File

@ -2,21 +2,22 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/edit Edit a staff member.
* @api {post} /staff/edit Edit staff
* @apiVersion 4.0.0
*
* @apiName Edit
* @apiName Edit staff
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path edits a staff member .
* @apiDescription This path edits a staff member.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {Number} staffId Id of the staff.
* @apiParam {String} departments The name of the departments to change.
* @apiParam {String} email The new email of the staff member.
* @apiParam {String} password The new password of the staff member.
* @apiParam {Number} level The new level of the staff member.
* @apiParam {String} departments The name of the departments to change. Optional.
* @apiParam {String} email The new email of the staff member. Optional.
* @apiParam {String} password The new password of the staff member. Optional.
* @apiParam {Number} level The new level of the staff member. Optional.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_STAFF

View File

@ -2,24 +2,25 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/get-all-tickets Retrieve all tickets.
* @api {post} /staff/get-all-tickets Get all tickets
* @apiVersion 4.0.0
*
* @apiName Get all tickets
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path retrieves all tickets created.
* @apiDescription This path retrieves all tickets.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {Number} page The page's number that it's looking for.
* @apiParam {Number} page The page number.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_PAGE
*
* @apiSuccess {Object} data Information about a tickets and quantity of pages
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data.tickets Array of tickets of the current page
* @apiSuccess {Number} data.pages Quantity of pages
* @apiSuccess {Object} data Information about a tickets and quantity of pages.
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data.tickets Array of tickets of the current page.
* @apiSuccess {Number} data.pages Quantity of pages.
*
*/

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/get-all Retrieve information about all the staff members.
* @api {post} /staff/get-all Get all staffs
* @apiVersion 4.0.0
*
* @apiName Get all
* @apiName Get all staffs
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path retrieves information about all the staff member.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiUse NO_PERMISSION
*

View File

@ -3,19 +3,20 @@ use RedBeanPHP\Facade as RedBean;
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/get-new-tickets Retrieve new tickets.
* @api {post} /staff/get-new-tickets Get new tickets
* @apiVersion 4.0.0
*
* @apiName Get new tickets
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path retrieves new tickets.
* @apiDescription This path retrieves the new tickets of the departments the staff has assigned.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiUse NO_PERMISSION
*
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data Array of new tickets
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data Array of new tickets.
*
*/

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/get-tickets Retrieve own tickets.
* @api {post} /staff/get-tickets Get tickets
* @apiVersion 4.0.0
*
* @apiName Get tickets
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path retrieves the tickets of current staff member.
* @apiDescription This path retrieves the tickets assigned to the current staff member.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiUse NO_PERMISSION
*

View File

@ -3,17 +3,18 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /staff/get Retrieve information about a staff member.
* @api {post} /staff/get Get staff
* @apiVersion 4.0.0
*
* @apiName Get
* @apiName Get staff
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path retrieves information about a staff member .
* @apiDescription This path retrieves information about a staff member.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {Number} staffId The id of the staff member searched.
* @apiParam {Number} staffId The id of the staff member to be searched.
*
* @apiUse NO_PERMISSION
*

View File

@ -2,17 +2,18 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/last-events Retrieve the last events.
* @api {post} /staff/last-events Get last events
* @apiVersion 4.0.0
*
* @apiName Last events
* @apiName Get last events
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path retrieves the last events.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {Number} page The page's number of the list.
* @apiParam {Number} page The page number.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_PAGE

View File

@ -2,18 +2,19 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/search-tickets Search some tickets.
* @api {post} /staff/search-tickets Search tickets
* @apiVersion 4.0.0
*
* @apiName Search tickets
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path search some tickets.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {String} query Key to search.
* @apiParam {Number} page The number of page.
* @apiParam {String} query Query string to search.
* @apiParam {Number} page The page number.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_QUERY
@ -21,7 +22,7 @@ use Respect\Validation\Validator as DataValidator;
*
* @apiSuccess {Object} data Information about tickets
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data.tickets Array of tickets found
* @apiSuccess {Number} data.pages Number of the page
* @apiSuccess {Number} data.pages Number of pages
*
*/

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /staff/un-assign-ticket Un-assign a ticket.
* @api {post} /staff/un-assign-ticket Un-assign ticket
* @apiVersion 4.0.0
*
* @apiName Un-assign ticket
*
* @apiGroup staff
* @apiGroup Staff
*
* @apiDescription This path un assign a ticket of a staff member.
* @apiDescription This path un-assigns a ticket to the current staff member.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {Number} ticketNumber Ticket number to un-assign.
*

View File

@ -2,23 +2,24 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/add-api-key Create a new api-key.
* @api {post} /system/add-api-key Add APIKey
* @apiVersion 4.0.0
*
* @apiName Add api-key
* @apiName Add APIKey
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path create a new api-key.
* @apiDescription This path creates a new APIKey.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} name Name of the new api-key.
* @apiParam {String} name Name of the new APIKey.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_NAME
* @apiUse NAME_ALREADY_USED
*
* @apiSuccess {String} data Token of the api key
* @apiSuccess {String} data Token of the APIKey.
*
*/

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/add-department Create a new department.
* @api {post} /system/add-department Add department
* @apiVersion 4.0.0
*
* @apiName Add department
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path create a new department.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} name Name of the new department.
*

View File

@ -2,15 +2,16 @@
use Ifsnop\Mysqldump as IMysqldump;
/**
* @api {post} /system/backup-database Do a backup of the database.
* @api {post} /system/backup-database Backup database
* @apiVersion 4.0.0
*
* @apiName Backup database
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path do a backup of the database.
* @apiDescription This path does a backup of the database.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiUse NO_PERMISSION
*

View File

@ -1,13 +1,14 @@
<?php
/**
* @api {post} /system/check-requirements Checks and retrieves the current requirements.
* @api {post} /system/check-requirements Checks requirements
* @apiVersion 4.0.0
*
* @apiName Check requirements
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path checks and retrieves the current requirements.
* @apiDescription This path checks and retrieves the current requirements for the installation.
*
* @apiPermission any
*

View File

@ -1,17 +1,18 @@
<?php
/**
* @api {post} /system/csv-import Receives a csv file with a list of users to signup .
* @api {post} /system/csv-import CSV import
* @apiVersion 4.0.0
*
* @apiName CSV import
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path receives a csv file with a list of users to signup.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} file A csv file with this content format: email,password, name.
* @apiParam {String} file A csv file with this content format: email, password, name.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_FILE

View File

@ -2,15 +2,16 @@
use RedBeanPHP\Facade as RedBean;
/**
* @api {post} /system/delete-all-users Delete all users in database.
* @api {post} /system/delete-all-users Delete all users
* @apiVersion 4.0.0
*
* @apiName Delete all users
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path delete all users in database.
* @apiDescription This path deletes all users in database.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} password The password of the current staff.
*

View File

@ -2,17 +2,18 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/delete-api-key Delete a api-key.
* @api {post} /system/delete-api-key Delete APIKey
* @apiVersion 4.0.0
*
* @apiName Delete api-key
* @apiName Delete APIKey
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path delete a api-key.
* @apiDescription This path deletes an APIKey.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} name Name of the api-key to delete.
* @apiParam {String} name Name of the APIKey to delete.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_NAME

View File

@ -3,17 +3,18 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /system/delete-department Delete a department.
* @api {post} /system/delete-department Delete department
* @apiVersion 4.0.0
*
* @apiName Delete department
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path delete a department.
* @apiDescription This path deletes a department.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {Number} departmentId Id of the department to delete.
* @apiParam {Number} departmentId Id of the department to be deleted.
* @apiParam {Number} transferDepartmentId Id of the department where the tickets will be transfer to.
*
* @apiUse NO_PERMISSION

View File

@ -1,15 +1,16 @@
<?php
/**
* @api {post} /system/disable-registration Disable the registration.
* @api {post} /system/disable-registration Disable registration
* @apiVersion 4.0.0
*
* @apiName Disable registration
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path disable the registration.
* @apiDescription This path disables the registration.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} password The password of the current staff.
*

View File

@ -1,15 +1,16 @@
<?php
/**
* @api {post} /system/disable-user-system Disable the user system.
* @api {post} /system/disable-user-system Disable user system
* @apiVersion 4.0.0
*
* @apiName Disable user system
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path disable the user system.
* @apiDescription This path disables the user system.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} password The password of the current staff.
*

View File

@ -2,6 +2,25 @@
use Ifsnop\Mysqldump as IMysqldump;
use Respect\Validation\Validator as DataValidator;
/**
* @api {get} /system/download Download file
* @apiVersion 4.0.0
*
* @apiName Download file
*
* @apiGroup System
*
* @apiDescription This path downloads a file.
*
* @apiPermission any
*
* @apiParam {String} file The filename to be downloaded.
*
*
* @apiSuccess {Object} file File content
*
*/
class DownloadController extends Controller {
const PATH = '/download';
const METHOD = 'GET';

View File

@ -3,18 +3,18 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /system/edit-department Edit a department.
* @api {post} /system/edit-department Edit department
* @apiVersion 4.0.0
*
* @apiName Edit department
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path edit a department created.
* @apiDescription This path edits a department's name.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} name The new name of the department.
*
* @apiParam {Number} departmentId The Id of the department.
*
* @apiUse NO_PERMISSION

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/edit-mail-template Edit a mail template.
* @api {post} /system/edit-mail-template Edit mail template
* @apiVersion 4.0.0
*
* @apiName Edit mail template
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path edit a mail template.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} templateType The new type of the template.
* @apiParam {String} language The new language of the template.

View File

@ -1,19 +1,20 @@
<?php
/**
* @api {post} /system/edit-settings Edit the settings of the system.
* @api {post} /system/edit-settings Edit settings
* @apiVersion 4.0.0
*
* @apiName Edit settings
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path edit the settings of the system.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} allowedLanguages The list of languages allowed.
* @apiParam {String} supportedLanguages The list of languages supported.
* @apiParam {String} settings A list this content format: language, recaptcha-public, recaptcha-private, no-reply-email, smtp-host, smtp-port, smtp-user, smtp-pass, time-zone, maintenance-mode, layout, allow-attachments, max-size, title, url.
* @apiParam {Setting} setting A setting can be any of the following: language, recaptcha-public, recaptcha-private, no-reply-email, smtp-host, smtp-port, smtp-user, smtp-pass, time-zone, maintenance-mode, layout, allow-attachments, max-size, title, url.
*
* @apiUse NO_PERMISSION
*

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/enable-registration Enable the registration.
* @api {post} /system/enable-registration Enable registration
* @apiVersion 4.0.0
*
* @apiName Enable registration
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path enable the registration.
* @apiDescription This path enables the registration.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} password The password of the current staff.
*

View File

@ -1,15 +1,16 @@
<?php
/**
* @api {post} /system/enable-user-system Enable user system.
* @api {post} /system/enable-user-system Enable user system
* @apiVersion 4.0.0
*
* @apiName Enable user system
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path enable the user system.
* @apiDescription This path enables the user system.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} password The password of the current staff.
*

View File

@ -2,19 +2,20 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/get-api-keys Retrieve api keys.
* @api {post} /system/get-api-keys Get APIKeys
* @apiVersion 4.0.0
*
* @apiName Get api keys
* @apiName Get APIKeys
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path retrieves the all api keys.
* @apiDescription This path retrieves the all APIKeys.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiUse NO_PERMISSION
*
* @apiSuccess {[APIKey](#api-Data_Structures-ObjectApikey)[]} data Array of api keys
* @apiSuccess {[APIKey](#api-Data_Structures-ObjectApikey)[]} data Array of APIKeys
*
*/

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/get-logs retrieve logs.
* @api {post} /system/get-logs Get logs
* @apiVersion 4.0.0
*
* @apiName Get logs
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path retrieves the all logs.
* @apiDescription This path retrieves the all the logs.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {Number} page The page of logs.
*

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/get-mail-templates Retrieve mail templates.
* @api {post} /system/get-mail-templates Get mail templates
* @apiVersion 4.0.0
*
* @apiName Get mail templates
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path retrieves the all mail templates.
* @apiDescription This path retrieves the all the mail templates.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiUse NO_PERMISSION
*

View File

@ -1,17 +1,18 @@
<?php
/**
* @api {post} /system/get-settings Retrieve settings.
* @api {post} /system/get-settings Get settings
* @apiVersion 4.0.0
*
* @apiName Get settings
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path retrieves one or more settings.
* @apiDescription This path retrieves all the settings.
*
* @apiPermission any
*
* @apiParam {Boolean} allSettings A bool that means if you want a regular settings list or a complety settings list.
* @apiParam {Boolean} allSettings Indicates if you want the regular settings list or a complete settings list. Complete list only available for staff level3.
*
* @apiSuccess {Object} data Contains the information about the settings
*

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/get-stats Retrieve stats.
* @api {post} /system/get-stats Get stats
* @apiVersion 4.0.0
*
* @apiName Get stats
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path retrieves stats.
* @apiDescription This path retrieves the last stats.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {String} period Period of search.
* @apiParam {Number} staffId Id of the current staff.

View File

@ -3,13 +3,14 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /system/init-admin Create the main administrator account.
* @api {post} /system/init-admin Init admin
* @apiVersion 4.0.0
*
* @apiName Init admin
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path create the main administrator account.
* @apiDescription This path creates the main administrator account. It can only be used once during installation
*
* @apiPermission any
*

View File

@ -2,6 +2,31 @@
//include '../../config.php';
use RedBeanPHP\Facade as RedBean;
/**
* @api {post} /system/init-database Init database
* @apiVersion 4.0.0
*
* @apiName Init database
*
* @apiGroup System
*
* @apiDescription This path sets the database settings. It can only be used once during installation.
*
* @apiPermission any
*
* @apiParam {String} dbHost Url of the database server.
* @apiParam {String} dbName Name of the database. If not given, the system will try to create one.
* @apiParam {String} dbUser User of the database server.
* @apiParam {String} dbPassword Password of the database server.
*
* @apiUse DATABASE_CONNECTION
* @apiUse DATABASE_CREATION
* @apiUse INVALID_FILE
*
* @apiSuccess {Object} data Empty object
*
*/
class InitDatabaseController extends Controller {
const PATH = '/init-database';
const METHOD = 'POST';

View File

@ -2,6 +2,30 @@
use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /system/init-settings Init settings
* @apiVersion 4.0.0
*
* @apiName Init settings
*
* @apiGroup System
*
* @apiDescription This path sets the initial settings. It can only be used once during installation.
*
* @apiPermission any
*
* @apiParam {String} language Indicates the default language of the system.
* @apiParam {String} user-system-enabled Indicates if the user system should be enabled.
* @apiParam {String} registration Indicates if the registration should be enabled.
*
* @apiUse INVALID_LANGUAGE
* @apiUse INIT_SETTINGS_DONE
*
* @apiSuccess {Object} data Empty object
*
*/
class InitSettingsController extends Controller {
const PATH = '/init-settings';
const METHOD = 'POST';

View File

@ -1,6 +1,22 @@
<?php
use RedBeanPHP\Facade as RedBean;
/**
* @api {post} /system/installation-done Installation done
* @apiVersion 4.0.0
*
* @apiName Installation done
*
* @apiGroup System
*
* @apiDescription This path checks if the installation is already done.
*
* @apiPermission any
*
* @apiSuccess {Boolean} data Indicates if the installation is already done.
*
*/
class InstallationDoneController extends Controller {
const PATH = '/installation-done';
const METHOD = 'POST';

View File

@ -2,18 +2,19 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/recover-mail-template Recover mail template.
* @api {post} /system/recover-mail-template Recover mail template
* @apiVersion 4.0.0
*
* @apiName Recover mail template
*
* @apiGroup system
* @apiGroup System
*
* @apiDescription This path recover olds mail templates.
* @apiDescription This path recovers an mail template to its original content.
*
* @apiPermission Staff level 3
* @apiPermission staff3
*
* @apiParam {String} templateType type of the template.
* @apiParam {String} language language of the template.
* @apiParam {String} templateType Type of the template.
* @apiParam {String} language Lenguage of the template.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_TEMPLATE

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/add-custom-response Add new custom responses.
* @api {post} /ticket/add-custom-response Add custom responses
* @apiVersion 4.0.0
*
* @apiName Add a custom response
*
* @apiGroup Ticket
*
* @apiDescription This path allows create new custom responses for tickets.
* @apiDescription This path allows add new custom responses for tickets.
*
* @apiPermission Staff Level 2
* @apiPermission staff2
*
* @apiParam {String} name Name of the response.
* @apiParam {String} content Content of the response.

View File

@ -3,17 +3,18 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/change-department Change the department of a ticket.
* @api {post} /ticket/change-department Change department
* @apiVersion 4.0.0
*
* @apiName Change department
*
* @apiGroup Ticket
*
* @apiDescription This path change the department of a ticket.
* @apiDescription This path changes the department of a ticket.
*
* @apiPermission Staff Level 1
* @apiPermission staff1
*
* @apiParam {Number} ticketNumber The number of a ticket.
* @apiParam {Number} ticketNumber The number of the ticket.
* @apiParam {Number} departmentId The id of the new department of the ticket.
*
* @apiUse NO_PERMISSION

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /ticket/change-priority Change the priority of a ticket.
* @api {post} /ticket/change-priority Change priority
* @apiVersion 4.0.0
*
* @apiName Change priority
*
* @apiGroup Ticket
*
* @apiDescription This path change the priority of a ticket.
* @apiDescription This path changes the priority of a ticket.
*
* @apiPermission Staff Level 1
* @apiPermission staff1
*
* @apiParam {Number} ticketNumber The number of a ticket.
* @apiParam {String} priority The new priority of the ticket.

View File

@ -3,13 +3,14 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/check Check if a ticket was or not readed.
* @api {post} /ticket/check Check ticket
* @apiVersion 4.0.0
*
* @apiName Check
* @apiName Check ticket
*
* @apiGroup Ticket
*
* @apiDescription This path check if a ticket was or not readed.
* @apiDescription This path logs you in to see a ticket, but only when there is no users.
*
* @apiPermission any
*

View File

@ -3,13 +3,14 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/close Close a ticket.
* @api {post} /ticket/close Close ticket
* @apiVersion 4.0.0
*
* @apiName Close
*
* @apiGroup Ticket
*
* @apiDescription This path close a ticket.
* @apiDescription This path closes a ticket.
*
* @apiPermission user
*

View File

@ -3,19 +3,19 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/comment Comment a ticket.
*
* @apiName Comment
* @api {post} /ticket/comment Comment ticket
* @apiVersion 4.0.0
*
* @apiName Comment ticket
*
* @apiGroup Ticket
*
* @apiDescription This path comment a ticket.
* @apiDescription This path comments a ticket.
*
* @apiPermission user
*
* @apiParam {String} content Content of the comment.
* @apiParam {Number} ticketNumber The number of the ticket to comment.
* @apiParam {String} csrf_token Token of the session.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_CONTENT

View File

@ -3,13 +3,14 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/create Create a new ticket.
* @api {post} /ticket/create Create ticket
* @apiVersion 4.0.0
*
* @apiName Create
* @apiName Create ticket
*
* @apiGroup Ticket
*
* @apiDescription This path create a new ticket.
* @apiDescription This path creates a new ticket.
*
* @apiPermission user
*

View File

@ -3,20 +3,20 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/delete-custom-response Delete a custom response.
* @api {post} /ticket/delete-custom-response Delete custom response
* @apiVersion 4.0.0
*
* @apiName Delete custom response
*
* @apiGroup Ticket
*
* @apiDescription This path delete a custom response.
* @apiDescription This path deletes a custom response.
*
* @apiPermission user
*
* @apiParam {Number} id Id of the custom response to delete.
*
* @apiUse NO_PERMISSION
* @apiUse NO_PERMISSION
*
* @apiSuccess {Object} data Empty object
*

View File

@ -3,20 +3,21 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/edit-custom-response Edit a custom response.
* @api {post} /ticket/edit-custom-response Edit custom response
* @apiVersion 4.0.0
*
* @apiName Edit custom response
*
* @apiGroup Ticket
*
* @apiDescription This path edit a custom response.
* @apiDescription This path edits a custom response.
*
* @apiPermission Staff level 2
* @apiPermission staff2
*
* @apiParam {Number} id Id of the custom response to edit.
* @apiParam {String} content The new content of the custom response.
* @apiParam {String} language The new language of the custom response.
* @apiParam {String} name The new name of the custom response.
* @apiParam {String} content The new content of the custom response. It won't be changed if not defined.
* @apiParam {String} language The new language of the custom response. It won't be changed if not defined,
* @apiParam {String} name The new name of the custom response. It won't be changed if not defined.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_NAME

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/get-custom-responses Retrieve customs responses.
* @api {post} /ticket/get-custom-responses Get custom responses
* @apiVersion 4.0.0
*
* @apiName Get custom responses
*
* @apiGroup Ticket
*
* @apiDescription This path give back custom responses.
* @apiDescription This path returns all the custom responses.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiUse NO_PERMISSION
*

View File

@ -2,18 +2,18 @@
use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/get Retrieve Ticket information.
* @api {post} /ticket/get Get ticket
* @apiVersion 4.0.0
*
* @apiName GetTicket
* @apiName Get ticket
*
* @apiGroup Ticket
*
* @apiDescription This path retrieves information about a ticket.
*
* @apiPermission any
* @apiPermission user
*
* @apiParam {Number} ticketNumber The number of the ticket.
* @apiParam {String} csrf_token Token of the current session.
*
* @apiUse INVALID_TICKET
* @apiUse NO_PERMISSION

View File

@ -2,13 +2,14 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /ticket/re-open Re open a closed ticket.
* @api {post} /ticket/re-open Reopen ticket
* @apiVersion 4.0.0
*
* @apiName Re open
* @apiName Reopen ticket
*
* @apiGroup Ticket
*
* @apiDescription This path re open a closed ticket.
* @apiDescription This path reopens a closed ticket.
*
* @apiPermission user
*

View File

@ -2,17 +2,18 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /ticket/seen See if a ticket was or not seen.
* @api {post} /ticket/seen See ticket
* @apiVersion 4.0.0
*
* @apiName Seen
* @apiName See ticket
*
* @apiGroup Ticket
*
* @apiDescription This path see if a ticket was or not seen.
* @apiDescription This path sets "unread" value to false, so it does not appear highlighted.
*
* @apiPermission user
*
* @apiParam {String} ticketNumber Number of the ticket.
* @apiParam {Number} ticketNumber Number of the ticket.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_TICKET

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/ban Bans email users.
* @api {post} /user/ban Ban email
* @apiVersion 4.0.0
*
* @apiName BanUser
* @apiName Ban email
*
* @apiGroup User
*
* @apiDescription This path takes an Email and bans it.
* @apiDescription This path takes an email and adds it to the ban list.
*
* @apiPermission Staff Level 1
* @apiPermission staff1
*
* @apiParam {String} email Email of user to ban.
*

View File

@ -1,18 +1,19 @@
<?php
/**
* @api {post} /user/check-session Check if session exist or not.
* @api {post} /user/check-session Check session
* @apiVersion 4.0.0
*
* @apiName Check session
*
* @apiGroup User
*
* @apiDescription This path retrieves a object that says if a session exist or not.
* @apiDescription This path checks if the session exists.
*
* @apiPermission Any
* @apiPermission any
*
* @apiSuccess {Object} data Information about the session
* @apiSuccess {Boolean} data.sessionActive Indicate if the session is activated
* @apiSuccess {Object} data Information about the session.
* @apiSuccess {Boolean} data.sessionActive Indicates if the session is active.
*
*/

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
use RedBeanPHP\Facade as RedBean;
/**
* @api {post} /user/delete Delete a user.
* @api {post} /user/delete Delete user
* @apiVersion 4.0.0
*
* @apiName Delete
* @apiName Delete user
*
* @apiGroup User
*
* @apiDescription This path receive a user id and delete its user.
* @apiDescription This path receives an user id and deletes the user.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {Number} userId The id of the user to delete.
*

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/edit-email Edit email of an user.
* @api {post} /user/edit-email Edit email
* @apiVersion 4.0.0
*
* @apiName Edit-email
* @apiName Edit email
*
* @apiGroup User
*
* @apiDescription This path change the email of a user.
* @apiDescription This path changes the email of an user.
*
* @apiPermission User
* @apiPermission user
*
* @apiParam {String} newEmail The new email that the user wants to change.
*

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/edit-password Edit password of an user.
* @api {post} /user/edit-password Edit password
* @apiVersion 4.0.0
*
* @apiName Edit-password
* @apiName Edit password
*
* @apiGroup User
*
* @apiDescription This path edit the password of a user.
* @apiDescription This path edits the password of an user.
*
* @apiPermission User
* @apiPermission user
*
* @apiParam {String} newPassword The new password that the user wants to change.
* @apiParam {String} oldPassword The actual password of the user.

View File

@ -3,15 +3,16 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /user/get-user Retrieve the information of an specific user.
* @api {post} /user/get-user Get user information
* @apiVersion 4.0.0
*
* @apiName Get-user
* @apiName Get user information
*
* @apiGroup User
*
* @apiDescription This path retrieves information about an specific user.
* @apiDescription This path retrieves information about a specific user.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {String} userId The id of the user to find information of.
*
@ -19,7 +20,7 @@ DataValidator::with('CustomValidations', true);
* @apiUse INVALID_USER
* @apiUse USER_SYSTEM_DISABLED
*
* @apiSuccess {Object} data Information about a user
* @apiSuccess {Object} data Information about an user
* @apiSuccess {String} data.name Name of the user
* @apiSuccess {String} data.email Email of the user
* @apiSuccess {Number} data.signupDate Date of signup of the user

View File

@ -2,20 +2,21 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/get-users Retrieve the information of a list of users.
* @api {post} /user/get-users Get users list
* @apiVersion 4.0.0
*
* @apiName Get-users
* @apiName Get users list
*
* @apiGroup User
*
* @apiDescription This path retrieves information about a list of users.
* @apiDescription This path retrieves the list of users by page.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {Number} page Number of pages of users.
* @apiParam {String} orderBy Parameter to order the users by tickets or id.
* @apiParam {Boolean} desc Parameter to order the user ascending or descending way.
* @apiParam {String} search Key to find some specific users.
* @apiParam {Boolean} desc Parameter to order the users in an ascending or descending way.
* @apiParam {String} search Text query to find users.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_PAGE

View File

@ -3,24 +3,25 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /user/get Retrieve the information of yourself.
* @api {post} /user/get Get my information
* @apiVersion 4.0.0
*
* @apiName Get
* @apiName Get my Information
*
* @apiGroup User
*
* @apiDescription This path retrieve the information of a user.
* @apiDescription This path retrieves information about the logged user.
*
* @apiPermission User
* @apiPermission user
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_CREDENTIALS
*
* @apiSuccess {Object} data Information about a user
* @apiSuccess {Object} data Information about an user
* @apiSuccess {String} data.name Name of the user
* @apiSuccess {String} data.email Email of the user
* @apiSuccess {Boolean} data.verified Indicates if the user is verified
* @apiSuccess {Object} data Information about a user
* @apiSuccess {Object} data Information about an user
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data.tickets Array of tickets of the user
*
*/

View File

@ -2,15 +2,16 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/list-ban Retrieve the list of banned users.
* @api {post} /user/list-ban Get ban list
* @apiVersion 4.0.0
*
* @apiName List-ban
* @apiName Get ban list
*
* @apiGroup User
*
* @apiDescription This path retrieves the list of banned users.
* @apiDescription This path retrieves the list of banned emails.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiUse NO_PERMISSION
*

View File

@ -1,34 +1,35 @@
<?php
/**
* @api {post} /user/login Login a user.
* @api {post} /user/login Login
* @apiVersion 4.0.0
*
* @apiName Login
*
* @apiGroup User
*
* @apiDescription This path login a user.
* @apiDescription This path logs in an user.
*
* @apiPermission Any
* @apiPermission any
*
* @apiParam {Boolean} staff A bool that say if it want to login a staff or a normal user.
* @apiParam {String} email The email of the user to login.
* @apiParam {String} password The password of the user to login.
* @apiParam {Boolean} remember A bool that say if the session wants to be remembered.
* @apiParam {Boolean} staff Indicates if it wants to login a staff or a regular user.
* @apiParam {String} email The email of the user.
* @apiParam {String} password The password of the user.
* @apiParam {Boolean} remember Indicates if the session wants to be remembered.
* @apiParam {Number} userId The id of the user to login.
* @apiParam {String} rememberToken Token to login automatically.
* @apiParam {String} rememberToken Token to login automatically. It replaces the password.
*
* @apiUse USER_SYSTEM_DISABLED
* @apiUse SESSION_EXISTS
* @apiUse UNVERIFIED_USER
* @apiUse INVALID_CREDENTIALS
*
* @apiSuccess {Object} data Information about the session
* @apiSuccess {Number} data.userId Id of the user
* @apiSuccess {String} data.userEmail Email of the user
* @apiSuccess {Boolean} data.staff Indicates if the user is staff or not
* @apiSuccess {String} data.token Token of the session, used to verify the session when making other requests
* @apiSuccess {String} data.rememberToken Token of the remember session for automatic login
* @apiSuccess {Object} data Information about the session.
* @apiSuccess {Number} data.userId Id of the user.
* @apiSuccess {String} data.userEmail Email of the user.
* @apiSuccess {Boolean} data.staff Indicates if the user is a staff.
* @apiSuccess {String} data.token Token of the session, used to verify the session when making other requests.
* @apiSuccess {String} data.rememberToken Token of the remember session for automatic login .
*
*/

View File

@ -1,14 +1,15 @@
<?php
/**
* @api {post} /user/logout Log out the current user.
* @api {post} /user/logout Log out
* @apiVersion 4.0.0
*
* @apiName Log out
*
* @apiGroup User
*
* @apiDescription This path log out the current user.
* @apiDescription This path logs out the current user.
*
* @apiPermission Any
* @apiPermission any
*
* @apiSuccess {Object} data Empty object
*

View File

@ -3,19 +3,20 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /user/recover-password Change the password of the user using a token sended from the email.
* @api {post} /user/recover-password Recover password
* @apiVersion 4.0.0
*
* @apiName Recover password
*
* @apiGroup User
*
* @apiDescription This path change the password of the user usign a token sended from the email.
* @apiDescription This path changes the password of the user using a token sent by the email.
*
* @apiPermission Any
* @apiPermission any
*
* @apiParam {String} email The email of the user who forgot the password.
* @apiParam {String} password The new password of the user.
* @apiParam {String} token The token that was sended to the email of the user.
* @apiParam {String} token The token sent by email to the user.
*
* @apiUse INVALID_EMAIL
* @apiUse INVALID_PASSWORD

View File

@ -3,17 +3,18 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /user/send-recover-password Send a token to the email of the user to change his password
* @api {post} /user/send-recover-password Send password recovery
* @apiVersion 4.0.0
*
* @apiName Send recover password
* @apiName Send password recovery
*
* @apiGroup User
*
* @apiDescription This path send a token to the email of the user to change his password.
* @apiDescription This path sends a token to the email of the user to change his password.
*
* @apiPermission Any
* @apiPermission any
*
* @apiParam {String} email The email of the user who forgot the password.
* @apiParam {String} email The email of the user who forgot the password.
*
* @apiUse INVALID_EMAIL
* @apiUse USER_SYSTEM_DISABLED

View File

@ -4,20 +4,21 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /user/signup Sign up a new user.
* @api {post} /user/signup Sign up
* @apiVersion 4.0.0
*
* @apiName Sign up
*
* @apiGroup User
*
* @apiDescription This path sign up a user on the system.
* @apiDescription This path signs up an user on the system.
*
* @apiPermission Any
* @apiPermission any
*
* @apiParam {String} name The name of the new user.
* @apiParam {String} email The email of the new user.
* @apiParam {String} password The password of the new user.
* @apiParam {String} apyKey Key to sign up a user if the user system is disabled.
* @apiParam {String} name The name of the new user.
* @apiParam {String} email The email of the new user.
* @apiParam {String} password The password of the new user.
* @apiParam {String} apiKey APIKey to sign up an user if the user system is disabled.
*
* @apiUse INVALID_NAME
* @apiUse INVALID_EMAIL

View File

@ -2,17 +2,18 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/un-ban Take a user out of banned list.
* @api {post} /user/un-ban Un ban
* @apiVersion 4.0.0
*
* @apiName Un ban
*
* @apiGroup User
*
* @apiDescription This path take a user out of banned list.
* @apiDescription This path takes an email out of banned list.
*
* @apiPermission Staff level 1
* @apiPermission staff1
*
* @apiParam {String} email The email of the user who was banned.
* @apiParam {String} email The email of the user who was banned.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_EMAIL

View File

@ -2,18 +2,19 @@
use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/verify Verify the email of a new user.
* @api {post} /user/verify Verify email
* @apiVersion 4.0.0
*
* @apiName Verify
* @apiName Verify email
*
* @apiGroup User
*
* @apiDescription This path verify the email of a new user.
* @apiDescription This path verifies the email of a new user.
*
* @apiPermission any
*
* @apiParam {String} email The email of the user.
* @apiParam {String} token The key of validation the user.
* @apiParam {String} token The validation token sent by email to the user.
*
* @apiUse INVALID_EMAIL
* @apiUse USER_SYSTEM_DISABLED