Guillermo - things [skip ci]

This commit is contained in:
AntonyAntonio 2017-04-21 03:09:24 -03:00
parent 3f2157ac4e
commit ce63b407e0
71 changed files with 394 additions and 331 deletions

View File

@ -14,12 +14,11 @@ DataValidator::with('CustomValidations', true);
* @apiPermission Staff level 2 * @apiPermission Staff level 2
* *
* @apiParam {String} name Name of the new topic. * @apiParam {String} name Name of the new topic.
* @apiParam {String} icon Icon of the new topic.
* @apiParam {String} iconColor Icon's color of the new topic.
* *
* @apiParam {string} icon Icon of the new topic. * @apiUse NO_PERMISSION
* * @apiUse INVALID_NAME
* @apiParam {string} iconColor Icon's color of the new topic.
*
* @apiError {String} message
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -14,14 +14,14 @@ DataValidator::with('CustomValidations', true);
* @apiPermission Staff level 2 * @apiPermission Staff level 2
* *
* @apiParam {String} title Title of the new article. * @apiParam {String} title Title of the new article.
* @apiParam {String} content Content of the new article.
* @apiParam {Number} position Position of the new article.
* @apiParam {Number} topicId Id of the articles's topic.
* *
* @apiParam {string} content Content of the new article. * @apiUse NO_PERMISSION
* * @apiUse INVALID_NAME
* @apiParam {number} position Position of the new article. * @apiUse INVALID_CONTENT
* * @apiUse INVALID_TOPIC
* @apiParam {number} topicId Id of the articles's topic.
*
* @apiError {String} message
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -13,11 +13,12 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff level 2 * @apiPermission Staff level 2
* *
* @apiParam {number} topicId Id of the topic. * @apiParam {Number} topicId Id of the topic.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_TOPIC
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -13,11 +13,12 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff level 2 * @apiPermission Staff level 2
* *
* @apiParam {number} articleId Id of the article. * @apiParam {Number} articleId Id of the article.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_TOPIC
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -13,17 +13,15 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff level 2 * @apiPermission Staff level 2
* *
* @apiParam {number} topicId Id of the topic. * @apiParam {Number} topicId Id of the topic.
*
* @apiParam {String} name The new name 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} icon The new icon of the topic. * @apiUse NO_PERMISSION
* @apiUse INVALID_TOPIC
* *
* @apiParam {string} iconColor The new Icon's color of the topic. * @apiSuccess {Object} data Empty object
*
* @apiError {String} message
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -13,19 +13,16 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff level 2 * @apiPermission Staff level 2
* *
* @apiParam {number} articleId Id of the article. * @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. * @apiUse NO_PERMISSION
* @apiUse INVALID_TOPIC
* *
* @apiParam {string} content The new content of the article. * @apiSuccess {Object} data Empty object
*
* @apiParam {string} title The new title of the article.
*
* @apiParam {number} position The new position of the article.
*
* @apiError {String} message
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -3,15 +3,17 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true); DataValidator::with('CustomValidations', true);
/** /**
* @api {post} /article/get-all Get all articles. * @api {post} /article/get-all Retrieve all articles.
* *
* @apiName Get all * @apiName Get all
* *
* @apiGroup article * @apiGroup article
* *
* @apiDescription This path give back all the articles. * @apiDescription This path retrieves all the articles.
* *
* @apiPermission any * @apiPermission any or user
*
* @apiUse NO_PERMISSION
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true); DataValidator::with('CustomValidations', true);
/** /**
* @api {post} /staff/add Add a new staff member. * @api {post} /staff/add Add a new staff member.
* *
* @apiName Add * @apiName Add
* *
@ -14,18 +14,18 @@ DataValidator::with('CustomValidations', true);
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {String} name The name of the new staff member. * @apiParam {String} name The name of the new staff member.
*
* @apiParam {String} email The email 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 {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} level The level of the new staff member. * @apiUse NO_PERMISSION
* * @apiUse INVALID_NAME
* @apiParam {string} profilePic The profile pic of the new staff member. * @apiUse INVALID_EMAIL
* * @apiUse INVALID_PASSWORD
* @apiParam {string} departments The departments that will have assigned the new staff member. * @apiUse INVALID_LEVEL
* * @apiUse ALREADY_A_STAFF
* @apiError {String} message
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -13,11 +13,14 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {number} ticketNumber The number of the ticket to assign. * @apiParam {Number} ticketNumber The number of the ticket to assign.
* *
* @apiError {string} message * @apiUse NO_PERMISSION
* @apiUse INVALID_TICKET
* @apiUse TICKET_ALREADY_ASSIGNED
* @apiUse INVALID_DEPARTMENT
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -13,11 +13,12 @@ use RedBeanPHP\Facade as RedBean;
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {number} staffId The id of the staff member. * @apiParam {Number} staffId The id of the staff member.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_STAFF
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -2,7 +2,7 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /staff/edit Edit a staff member. * @api {post} /staff/edit Edit a staff member.
* *
* @apiName Edit * @apiName Edit
* *
@ -12,19 +12,16 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {number} staffId Id of the staff. * @apiParam {Number} staffId Id of the staff.
*
* @apiParam {String} departments The name of the departments to change. * @apiParam {String} departments The name of the departments to change.
*
* @apiParam {String} email The new email of the staff member. * @apiParam {String} email The new email of the staff member.
*
* @apiParam {String} password The new password 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 {number} level The new level of the staff member. * @apiUse NO_PERMISSION
* @apiUse INVALID_STAFF
* *
* @apiError {String} message * @apiSuccess {Object} data Empty object
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -2,19 +2,20 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /staff/get-all-tickets Give back all tickets. * @api {post} /staff/get-all-tickets Retrieve all tickets.
* *
* @apiName Get all tickets * @apiName Get all tickets
* *
* @apiGroup staff * @apiGroup staff
* *
* @apiDescription This path give back all tickets created. * @apiDescription This path retrieves all tickets created.
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {number} page The page's number that it's looking for. * @apiParam {Number} page The page's number that it's looking for.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_PAGE
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -2,16 +2,18 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /staff/get-all Get information about all the staff members. * @api {post} /staff/get-all Retrieve information about all the staff members.
* *
* @apiName Get all * @apiName Get all
* *
* @apiGroup staff * @apiGroup staff
* *
* @apiDescription This path give back information about all the staff member. * @apiDescription This path retrieves information about all the staff member.
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiUse NO_PERMISSION
*
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *
*/ */

View File

@ -3,16 +3,18 @@ use RedBeanPHP\Facade as RedBean;
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /staff/get-new-tickets Get new tickets. * @api {post} /staff/get-new-tickets Retrieve new tickets.
* *
* @apiName Get new tickets * @apiName Get new tickets
* *
* @apiGroup staff * @apiGroup staff
* *
* @apiDescription This path give back new tickets. * @apiDescription This path retrieves new tickets.
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiUse NO_PERMISSION
*
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *
*/ */

View File

@ -2,16 +2,18 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /staff/get-tickets Get own tickets. * @api {post} /staff/get-tickets Retrieve own tickets.
* *
* @apiName Get tickets * @apiName Get tickets
* *
* @apiGroup staff * @apiGroup staff
* *
* @apiDescription This path give back the tickets of current staff member. * @apiDescription This path retrieves the tickets of current staff member.
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiUse NO_PERMISSION
*
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *
*/ */

View File

@ -3,19 +3,19 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true); DataValidator::with('CustomValidations', true);
/** /**
* @api {post} /staff/get Get information about a staff member. * @api {post} /staff/get Retrieve information about a staff member.
* *
* @apiName Get * @apiName Get
* *
* @apiGroup staff * @apiGroup staff
* *
* @apiDescription This path give back information about a staff member . * @apiDescription This path retrieves information about a staff member .
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {number} staffId The id of the staff member searched. * @apiParam {Number} staffId The id of the staff member searched.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -2,19 +2,20 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /staff/last-events Give back the last events. * @api {post} /staff/last-events Retrieve the last events.
* *
* @apiName Last events * @apiName Last events
* *
* @apiGroup staff * @apiGroup staff
* *
* @apiDescription This path give back the last events. * @apiDescription This path retrieves the last events.
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {number} page The page's number of the list. * @apiParam {Number} page The page's number of the list.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_PAGE
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -2,7 +2,7 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /staff/search-tickets Search some tickets. * @api {post} /staff/search-tickets Search some tickets.
* *
* @apiName Search tickets * @apiName Search tickets
* *
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {String} query key to search. * @apiParam {String} query Key to search.
* @apiParam {Number} page The number of page.
* *
* @apiParam {number} page The number of page. * @apiUse NO_PERMISSION
* * @apiUse INVALID_QUERY
* @apiError {String} message * @apiUse INVALID_PAGE
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true); DataValidator::with('CustomValidations', true);
/** /**
* @api {post} /staff/un-assign-ticket Un-assign a ticket. * @api {post} /staff/un-assign-ticket Un-assign a ticket.
* *
* @apiName Un-assign ticket * @apiName Un-assign ticket
* *
@ -13,11 +13,12 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {number} ticketNumber Ticket number to un-assign. * @apiParam {Number} ticketNumber Ticket number to un-assign.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_TICKET
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -12,9 +12,11 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} name Number of the new api-key. * @apiParam {String} name Name of the new api-key.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_NAME
* @apiUse NAME_ALREADY_USED
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -12,9 +12,10 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} name Number of the new department. * @apiParam {String} name Name of the new department.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_NAME
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -12,7 +12,7 @@ use Ifsnop\Mysqldump as IMysqldump;
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiSuccess {Object} data * @apiUse NO_PERMISSION
* *
*/ */

View File

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

View File

@ -1,17 +1,19 @@
<?php <?php
/** /**
* @api {post} /system/csv-import Recieves a csv file with a list of users to signup . * @api {post} /system/csv-import Receives a csv file with a list of users to signup .
* *
* @apiName csv import * @apiName CSV import
* *
* @apiGroup system * @apiGroup system
* *
* @apiDescription This path recieves a csv file with a list of users to signup. * @apiDescription This path receives a csv file with a list of users to signup.
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @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
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -12,9 +12,12 @@ use RedBeanPHP\Facade as RedBean;
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} password The password of the current staff. * @apiParam {String} password The password of the current staff.
* *
* @apiSuccess {Object} data * @apiUse NO_PERMISSION
* @apiUse INVALID_PASSWORD
*
* @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} name Name of the api-key to delete. * @apiParam {String} name Name of the api-key to delete.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_NAME
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -13,13 +13,14 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {number} departmentId Id of the department to delete. * @apiParam {Number} departmentId Id of the department to delete.
* @apiParam {Number} transferDepartmentId Id of the department where the tickets will be transfer to.
* *
* @apiParam {number} transferDepartmentId Id of the department where the tickets will be transfer to. * @apiUse NO_PERMISSION
* @apiUse INVALID_DEPARTMENT
* @apiUse SAME_DEPARTMENT
* *
* @apiError {String} message * @apiSuccess {Object} data Empty object
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -11,11 +11,12 @@
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} password The password of the current staff. * @apiParam {String} password The password of the current staff.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_PASSWORD
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -11,11 +11,13 @@
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} password The password of the current staff. * @apiParam {String} password The password of the current staff.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_PASSWORD
* @apiUse SYSTEM_USER_IS_ALREADY_DISABLED
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -13,13 +13,15 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} name The new name of the department. * @apiParam {String} name The new name of the department.
* *
* @apiParam {number} departmentId The Id of the department. * @apiParam {Number} departmentId The Id of the department.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_NAME
* @apiUse INVALID_DEPARTMENT
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -12,17 +12,18 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} templateType The new type of the template. * @apiParam {String} templateType The new type of the template.
* @apiParam {String} language The new language of the template.
* @apiParam {String} subject The new subject of the template.
* @apiParam {String} body The new content of the template.
* *
* @apiParam {string} language The new language of the template. * @apiUse NO_PERMISSION
* @apiUse INVALID_TEMPLATE
* @apiUse INVALID_LANGUAGE
* @apiUse INVALID_SUBJECT
* @apiUse INVALID_BODY
* *
* @apiParam {string} subject The new subject of the template. * @apiSuccess {Object} data Empty object
*
* @apiParam {string} body The new content of the template.
*
* @apiError {String} message
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -11,15 +11,13 @@
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} allowedLanguages The list of languages allowed. * @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 {string} supportedLanguages The list of languages supported. * @apiUse NO_PERMISSION
* *
* @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. * @apiSuccess {Object} data Empty object
*
* @apiError {String} message
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} password The password of the current staff. * @apiParam {String} password The password of the current staff.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_PASSWORD
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -11,11 +11,13 @@
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {string} password The password of the current staff. * @apiParam {String} password The password of the current staff.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_PASSWORD
* @apiUse SYSTEM_USER_IS_ALREADY_ENABLED
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -2,16 +2,18 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /system/get-api-keys Get api keys. * @api {post} /system/get-api-keys Retrieve api keys.
* *
* @apiName Get api keys * @apiName Get api keys
* *
* @apiGroup system * @apiGroup system
* *
* @apiDescription This path give back the all api keys. * @apiDescription This path retrieves the all api keys.
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiUse NO_PERMISSION
*
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *
*/ */

View File

@ -2,19 +2,20 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /system/get-logs Get logs. * @api {post} /system/get-logs retrieve logs.
* *
* @apiName Get logs * @apiName Get logs
* *
* @apiGroup system * @apiGroup system
* *
* @apiDescription This path give back the all logs. * @apiDescription This path retrieves the all logs.
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {number} page The page of logs. * @apiParam {Number} page The page of logs.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_PAGE
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -2,16 +2,18 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /system/get-mail-templates Get mail templates. * @api {post} /system/get-mail-templates Retrieve mail templates.
* *
* @apiName Get mail templates * @apiName Get mail templates
* *
* @apiGroup system * @apiGroup system
* *
* @apiDescription This path give back the all mail templates. * @apiDescription This path retrieves the all mail templates.
* *
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiUse NO_PERMISSION
*
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *
*/ */

View File

@ -1,17 +1,17 @@
<?php <?php
/** /**
* @api {post} /system/get-settings Get settings. * @api {post} /system/get-settings Retrieve settings.
* *
* @apiName Get settings * @apiName Get settings
* *
* @apiGroup system * @apiGroup system
* *
* @apiDescription This path returns one or more settings. * @apiDescription This path retrieves one or more settings.
* *
* @apiPermission any * @apiPermission any
* *
* @apiParam {bool} allSettings A bool that means if you want a regular settings list or a complety settings list. * @apiParam {Boolean} allSettings A bool that means if you want a regular settings list or a complety settings list.
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -2,21 +2,21 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /system/get-stats Get stats. * @api {post} /system/get-stats Retrieve stats.
* *
* @apiName Get stats * @apiName Get stats
* *
* @apiGroup system * @apiGroup system
* *
* @apiDescription This path give back stats. * @apiDescription This path retrieves stats.
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {String} period Period of search. * @apiParam {String} period Period of search.
* * @apiParam {Number} staffId Id of the current staff.
* @apiParam {number} staffId Id of the current staff.
* * @apiUse NO_PERMISSION
* @apiError {String} message * @apiUse INVALID_PERIOD
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -14,14 +14,15 @@ DataValidator::with('CustomValidations', true);
* @apiPermission any * @apiPermission any
* *
* @apiParam {String} name Name of the administrator. * @apiParam {String} name Name of the administrator.
* @apiParam {String} email Email of the administrator.
* @apiParam {String} password Password of the administrator.
* *
* @apiParam {string} email Email of the administrator. * @apiUse INVALID_NAME
* @apiUse INVALID_EMAIL
* @apiUse INVALID_PASSWORD
* @apiUse INIT_SETTINGS_DONE
* *
* @apiParam {string} password Password of the administrator. * @apiSuccess {Object} data Empty object
*
* @apiError {String} message
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -13,12 +13,13 @@ use Respect\Validation\Validator as DataValidator;
* @apiPermission Staff level 3 * @apiPermission Staff level 3
* *
* @apiParam {String} templateType type of the template. * @apiParam {String} templateType type of the template.
* @apiParam {String} language language of the template.
* *
* @apiParam {string} language language of the template. * @apiUse NO_PERMISSION
* @apiUse INVALID_TEMPLATE
* @apiUse INVALID_LANGUAGE
* *
* @apiError {String} message * @apiSuccess {Object} data Empty object
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -14,11 +14,10 @@ DataValidator::with('CustomValidations', true);
* @apiPermission Staff Level 2 * @apiPermission Staff Level 2
* *
* @apiParam {String} name Name of the response. * @apiParam {String} name Name of the response.
*
* @apiParam {String} content Content of the response. * @apiParam {String} content Content of the response.
*
* @apiParam {String} language Language of the response. * @apiParam {String} language Language of the response.
* *
* @apiUse NO_PERMISSION
* @apiUse INVALID_NAME * @apiUse INVALID_NAME
* @apiUse INVALID_CONTENT * @apiUse INVALID_CONTENT
* @apiUse INVALID_LANGUAGE * @apiUse INVALID_LANGUAGE

View File

@ -13,13 +13,14 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff Level 1 * @apiPermission Staff Level 1
* *
* @apiParam {number} ticketNumber The number of a ticket. * @apiParam {Number} ticketNumber The number of a ticket.
* @apiParam {Number} departmentId The id of the new department of the ticket.
* *
* @apiParam {number} departmentId The id of the new department of the ticket. * @apiUse NO_PERMISSION
* @apiUse INVALID_TICKET
* @apiUse INVALID_DEPARTMENT
* *
* @apiError {String} message * @apiSuccess {Object} data Empty object
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -12,13 +12,14 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission Staff Level 1 * @apiPermission Staff Level 1
* *
* @apiParam {number} ticketNumber The number of a ticket. * @apiParam {Number} ticketNumber The number of a ticket.
* @apiParam {String} priority The new priority of the ticket.
* *
* @apiParam {string} priority The new priority of the ticket. * @apiUse NO_PERMISSION
* @apiUse INVALID_TICKET
* @apiUse INVALID_PRIORITY
* *
* @apiError {String} message * @apiSuccess {Object} data Empty object
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -13,13 +13,14 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission any * @apiPermission any
* *
* @apiParam {number} ticketNumber The number of a ticket. * @apiParam {Number} ticketNumber The number of a ticket.
* @apiParam {String} email Email of the person who created the ticket.
* @apiParam {String} captcha Encrypted value generated by google captcha client.
* *
* @apiParam {string} email Email of the person who created the ticket. * @apiUse INVALID_TICKET
* * @apiUse INVALID_EMAIL
* @apiParam {string} captcha Encrypted value generated by google captcha client. * @apiUse INVALID_CAPTCHA
* * @apiUse NO_PERMISSION
* @apiError {String} message
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -13,11 +13,12 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission user * @apiPermission user
* *
* @apiParam {number} ticketNumber The number of a ticket. * @apiParam {Number} ticketNumber The number of a ticket.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_TICKET
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -13,15 +13,15 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission user * @apiPermission user
* *
* @apiParam {string} content Content of the comment. * @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.
* *
* @apiParam {number} ticketNumber The number of the ticket to comment. * @apiUse NO_PERMISSION
* @apiUse INVALID_CONTENT
* @apiUse INVALID_TICKET
* *
* @apiParam {string} csrf_token Token of the session. * @apiSuccess {Object} data Empty object
*
* @apiError {String} message
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -13,19 +13,19 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission user * @apiPermission user
* *
* @apiParam {string} title Title of the ticket. * @apiParam {String} title Title of the ticket.
* @apiParam {String} content Content of the ticket.
* @apiParam {Number} departmentId The id of the department of the current ticket.
* @apiParam {String} language The language of the ticket.
* @apiParam {String} email The email of the user who created the ticket.
* @apiParam {String} name The Name of the author of the ticket.
* *
* @apiParam {string} content Content of the ticket. * @apiUse NO_PERMISSION
* * @apiUse INVALID_TITLE
* @apiParam {number} departmentId The id of the department of the current ticket. * @apiUse INVALID_CONTENT
* * @apiUse INVALID_DEPARTMENT
* @apiParam {string} language The language of the ticket. * @apiUse INVALID_LANGUAGE
* * @apiUse INVALID_CAPTCHA
* @apiParam {string} email The email of the user who created the ticket.
*
* @apiParam {string} name The Name of the author of the ticket.
*
* @apiError {String} message
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -13,11 +13,12 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission user * @apiPermission user
* *
* @apiParam {number} id Id of the custom response to delete. * @apiParam {Number} id Id of the custom response to delete.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse NO_PERMISSION
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -13,17 +13,15 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff level 2 * @apiPermission Staff level 2
* *
* @apiParam {number} id Id of the custom response to edit. * @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. * @apiUse NO_PERMISSION
* @apiUse INVALID_NAME
* *
* @apiParam {string} language The new language of the custom response. * @apiSuccess {Object} data Empty object
*
* @apiParam {string} name The new name of the custom response.
*
* @apiError {String} message
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true); DataValidator::with('CustomValidations', true);
/** /**
* @api {post} /ticket/get-custom-responses give back customs responses. * @api {post} /ticket/get-custom-responses Retrieve customs responses.
* *
* @apiName Get custom responses * @apiName Get custom responses
* *
@ -13,9 +13,10 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiUse NO_PERMISSION
*
* @apiSuccess {[CustomResponse](#api-Data_Structures-ObjectCustomresponse)[]} data List of custom responses. * @apiSuccess {[CustomResponse](#api-Data_Structures-ObjectCustomresponse)[]} data List of custom responses.
* *
* @apiUse NO_PERMISSION
*/ */
class GetCustomResponsesController extends Controller { class GetCustomResponsesController extends Controller {

View File

@ -8,18 +8,18 @@ DataValidator::with('CustomValidations', true);
* *
* @apiGroup Ticket * @apiGroup Ticket
* *
* @apiDescription This path gives back information about a ticket. * @apiDescription This path retrieves information about a ticket.
* *
* @apiPermission any * @apiPermission any
* *
* @apiParam {number} ticketNumber The number of the ticket. * @apiParam {Number} ticketNumber The number of the ticket.
* @apiParam {String} csrf_token Token of the current session.
* *
* @apiParam {string} csrf_token Token of the current session.
*
* @apiUse NO_PERMISSION
* @apiUse INVALID_TICKET * @apiUse INVALID_TICKET
* @apiUse NO_PERMISSION
* *
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)} data Information about the requested ticket. * @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)} data Information about the requested ticket.
*
*/ */

View File

@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission user * @apiPermission user
* *
* @apiParam {string} ticketNumber Number of the ticket to be reopened. * @apiParam {String} ticketNumber Number of the ticket to be reopened.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_TICKET
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -12,9 +12,10 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission user * @apiPermission user
* *
* @apiParam {string} ticketNumber Number of the ticket. * @apiParam {String} ticketNumber Number of the ticket.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_TICKET
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -14,7 +14,9 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiParam {String} email Email of user to ban. * @apiParam {String} email Email of user to ban.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_EMAIL
* @apiUse ALREADY_BANNED
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -3,7 +3,7 @@
/** /**
* @api {post} /user/check-session Check if session exist or not. * @api {post} /user/check-session Check if session exist or not.
* *
* @apiName check session * @apiName Check session
* *
* @apiGroup User * @apiGroup User
* *
@ -11,8 +11,6 @@
* *
* @apiPermission Any * @apiPermission Any
* *
* @apiError {String} message
*
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *
*/ */

View File

@ -5,7 +5,7 @@ use RedBeanPHP\Facade as RedBean;
/** /**
* @api {post} /user/delete Delete a user. * @api {post} /user/delete Delete a user.
* *
* @apiName delete * @apiName Delete
* *
* @apiGroup User * @apiGroup User
* *
@ -13,9 +13,11 @@ use RedBeanPHP\Facade as RedBean;
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {number} userId The id of the user to delete. * @apiParam {Number} userId The id of the user to delete.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_USER
* @apiUse USER_SYSTEM_DISABLED
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -4,7 +4,7 @@ use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /user/edit-email Edit email of an user. * @api {post} /user/edit-email Edit email of an user.
* *
* @apiName edit-email * @apiName Edit-email
* *
* @apiGroup User * @apiGroup User
* *
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission User * @apiPermission User
* *
* @apiParam {string} newEmail The new email that the user wants to change. * @apiParam {String} newEmail The new email that the user wants to change.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_EMAIL
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -4,7 +4,7 @@ use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /user/edit-password Edit password of an user. * @api {post} /user/edit-password Edit password of an user.
* *
* @apiName edit-password * @apiName Edit-password
* *
* @apiGroup User * @apiGroup User
* *
@ -12,13 +12,14 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission User * @apiPermission User
* *
* @apiParam {string} newPassword The new password that the user wants to change. * @apiParam {String} newPassword The new password that the user wants to change.
* @apiParam {String} oldPassword The actual password of the user.
* *
* @apiParam {string} oldPassword The actual password of the user. * @apiUse NO_PERMISSION
* @apiUse INVALID_PASSWORD
* @apiUse INVALID_OLD_PASSWORD
* *
* @apiError {String} message * @apiSuccess {Object} data Empty object
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -3,19 +3,21 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true); DataValidator::with('CustomValidations', true);
/** /**
* @api {post} /user/get-user Give back the information of an specific user. * @api {post} /user/get-user Retrieve the information of an specific user.
* *
* @apiName get-user * @apiName Get-user
* *
* @apiGroup User * @apiGroup User
* *
* @apiDescription This path give back information about an specific user. * @apiDescription This path retrieves information about an specific user.
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {string} userId The id of the user to find information of. * @apiParam {String} userId The id of the user to find information of.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_USER
* @apiUse USER_SYSTEM_DISABLED
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -2,25 +2,25 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /user/get-users Give back the information of a list of users. * @api {post} /user/get-users Retrieve the information of a list of users.
* *
* @apiName get-users * @apiName Get-users
* *
* @apiGroup User * @apiGroup User
* *
* @apiDescription This path give back information about a list of users. * @apiDescription This path retrieves information about a list of users.
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {number} page Number of pages of users. * @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 {string} orderBy Parameter to order the users by tickets or id. * @apiUse NO_PERMISSION
* * @apiUse INVALID_PAGE
* @apiParam {bool} desc Parameter to order the user ascending or descending way. * @apiUse INVALID_ORDER
* * @apiUse USER_SYSTEM_DISABLED
* @apiParam {string} search Key to find some specific users.
*
* @apiError {String} message
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -3,17 +3,18 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true); DataValidator::with('CustomValidations', true);
/** /**
* @api {post} /user/get Give back the information of yourself. * @api {post} /user/get Retrieve the information of yourself.
* *
* @apiName get * @apiName Get
* *
* @apiGroup User * @apiGroup User
* *
* @apiDescription This path give back the information of a user. * @apiDescription This path retrieve the information of a user.
* *
* @apiPermission User * @apiPermission User
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_CREDENTIALS
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -2,16 +2,18 @@
use Respect\Validation\Validator as DataValidator; use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /user/list-ban Give back the list of banned users. * @api {post} /user/list-ban Retrieve the list of banned users.
* *
* @apiName list-ban * @apiName List-ban
* *
* @apiGroup User * @apiGroup User
* *
* @apiDescription This path give back the list of banned users. * @apiDescription This path retrieves the list of banned users.
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiUse NO_PERMISSION
*
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @api {post} /user/login Login a user. * @api {post} /user/login Login a user.
* *
* @apiName login * @apiName Login
* *
* @apiGroup User * @apiGroup User
* *
@ -11,19 +11,17 @@
* *
* @apiPermission Any * @apiPermission Any
* *
* @apiParam {bool} staff A bool that say if it want to login a staff or a normal user. * @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 {Number} userId The id of the user to login.
* @apiParam {String} rememberToken Token to login automatically.
* *
* @apiParam {string} email The email of the user to login. * @apiUse USER_SYSTEM_DISABLED
* * @apiUse SESSION_EXISTS
* @apiParam {string} password The password of the user to login. * @apiUse UNVERIFIED_USER
* * @apiUse INVALID_CREDENTIALS
* @apiParam {bool} remember A bool that say if the session wants to be remembered.
*
* @apiParam {number} userId The id of the user to login.
*
* @apiParam {string} rememberToken Token to login automatically.
*
* @apiError {String} message
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -2,7 +2,7 @@
/** /**
* @api {post} /user/logout Log out the current user. * @api {post} /user/logout Log out the current user.
* *
* @apiName log out * @apiName Log out
* *
* @apiGroup User * @apiGroup User
* *
@ -10,7 +10,7 @@
* *
* @apiPermission Any * @apiPermission Any
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */
class LogoutController extends Controller { class LogoutController extends Controller {

View File

@ -5,7 +5,7 @@ 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 Change the password of the user using a token sended from the email.
* *
* @apiName recover password * @apiName Recover password
* *
* @apiGroup User * @apiGroup User
* *
@ -13,15 +13,16 @@ DataValidator::with('CustomValidations', true);
* *
* @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.
* @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} password The new password of the user. * @apiUse INVALID_EMAIL
* @apiUse INVALID_PASSWORD
* @apiUse USER_SYSTEM_DISABLED
* @apiUse NO_PERMISSION
* *
* @apiParam {string} token The token that was sended to the email of the user. * @apiSuccess {Object} data Empty object
*
* @apiError {String} message
*
* @apiSuccess {Object} data
* *
*/ */

View File

@ -3,9 +3,9 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true); 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 a token to the email of the user to change his password
* *
* @apiName send recover password * @apiName Send recover password
* *
* @apiGroup User * @apiGroup User
* *
@ -13,11 +13,13 @@ DataValidator::with('CustomValidations', true);
* *
* @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.
* *
* @apiError {String} message * @apiUse INVALID_EMAIL
* @apiUse USER_SYSTEM_DISABLED
* @apiUse INVALID_EMAIL
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object.
* *
*/ */

View File

@ -4,9 +4,9 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true); DataValidator::with('CustomValidations', true);
/** /**
* @api {post} /user/signup Sign up a new user * @api {post} /user/signup Sign up a new user.
* *
* @apiName sign up * @apiName Sign up
* *
* @apiGroup User * @apiGroup User
* *
@ -14,15 +14,19 @@ DataValidator::with('CustomValidations', true);
* *
* @apiPermission Any * @apiPermission Any
* *
* @apiParam {string} name The name of the new user. * @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} email The email of the new user. * @apiUse INVALID_NAME
* * @apiUse INVALID_EMAIL
* @apiParam {string} password The password of the new user. * @apiUse INVALID_PASSWORD
* * @apiUse INVALID_CAPTCHA
* @apiParam {string} apyKey Key to sign up a user if the user system is disabled. * @apiUse USER_SYSTEM_DISABLED
* * @apiUse USER_EXISTS
* @apiError {String} message * @apiUse ALREADY_BANNED
* @apiUse NO_PERMISSION
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -4,7 +4,7 @@ use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /user/un-ban Take a user out of banned list. * @api {post} /user/un-ban Take a user out of banned list.
* *
* @apiName un ban * @apiName Un ban
* *
* @apiGroup User * @apiGroup User
* *
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission Staff level 1 * @apiPermission Staff level 1
* *
* @apiParam {string} email The email of the user who was banned. * @apiParam {String} email The email of the user who was banned.
* *
* @apiError {String} message * @apiUse NO_PERMISSION
* @apiUse INVALID_EMAIL
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data Empty object
* *
*/ */

View File

@ -4,7 +4,7 @@ use Respect\Validation\Validator as DataValidator;
/** /**
* @api {post} /user/verify Verify the email of a new user. * @api {post} /user/verify Verify the email of a new user.
* *
* @apiName verify * @apiName Verify
* *
* @apiGroup User * @apiGroup User
* *
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
* *
* @apiPermission any * @apiPermission any
* *
* @apiParam {string} email The email of the user. * @apiParam {String} email The email of the user.
* @apiParam {String} token The key of validation the user.
* *
* @apiParam {string} token The key of validation the user. * @apiUse INVALID_EMAIL
* * @apiUse USER_SYSTEM_DISABLED
* @apiError {String} message * @apiUse INVALID_TOKEN
* *
* @apiSuccess {Object} data * @apiSuccess {Object} data
* *

View File

@ -1,4 +1,13 @@
<?php <?php
/**
* @api {OBJECT} Topic Topic
* @apiGroup Data Structures
* @apiParam {Number} id Id of the topic.
* @apiParam {String} name Name of the topic.
* @apiParam {String} icon Icon of the topic.
* @apiParam {String} iconColor Icon's color of the topic.
* @apiParam {Object} articles Articles of the Topic.
*/
class Topic extends DataStore { class Topic extends DataStore {
const TABLE = 'topic'; const TABLE = 'topic';