Guillermo - things [skip ci]
This commit is contained in:
parent
3f2157ac4e
commit
ce63b407e0
|
@ -14,12 +14,11 @@ DataValidator::with('CustomValidations', true);
|
|||
* @apiPermission Staff level 2
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiParam {string} iconColor Icon's color of the new topic.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_NAME
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -14,14 +14,14 @@ DataValidator::with('CustomValidations', true);
|
|||
* @apiPermission Staff level 2
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiParam {number} position Position of the new article.
|
||||
*
|
||||
* @apiParam {number} topicId Id of the articles's topic.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_NAME
|
||||
* @apiUse INVALID_CONTENT
|
||||
* @apiUse INVALID_TOPIC
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -13,11 +13,12 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,11 +13,12 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,17 +13,15 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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} 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.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,19 +13,16 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_TOPIC
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,16 +3,18 @@ use Respect\Validation\Validator as DataValidator;
|
|||
DataValidator::with('CustomValidations', true);
|
||||
|
||||
/**
|
||||
* @api {post} /article/get-all Get all articles.
|
||||
* @api {post} /article/get-all Retrieve all articles.
|
||||
*
|
||||
* @apiName Get all
|
||||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
|
|||
DataValidator::with('CustomValidations', true);
|
||||
|
||||
/**
|
||||
* @api {post} /staff/add Add a new staff member.
|
||||
* @api {post} /staff/add Add a new staff member.
|
||||
*
|
||||
* @apiName Add
|
||||
*
|
||||
|
@ -14,18 +14,18 @@ DataValidator::with('CustomValidations', true);
|
|||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @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 {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 {string} profilePic The profile pic of the new staff member.
|
||||
*
|
||||
* @apiParam {string} departments The departments that will have assigned the new staff member.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_NAME
|
||||
* @apiUse INVALID_EMAIL
|
||||
* @apiUse INVALID_PASSWORD
|
||||
* @apiUse INVALID_LEVEL
|
||||
* @apiUse ALREADY_A_STAFF
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -13,11 +13,14 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_TICKET
|
||||
* @apiUse TICKET_ALREADY_ASSIGNED
|
||||
* @apiUse INVALID_DEPARTMENT
|
||||
*
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,11 +13,12 @@ use RedBeanPHP\Facade as RedBean;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /staff/edit Edit a staff member.
|
||||
* @api {post} /staff/edit Edit a staff member.
|
||||
*
|
||||
* @apiName Edit
|
||||
*
|
||||
|
@ -12,19 +12,16 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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} 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 {Number} level The new level of the staff member.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_STAFF
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,19 +2,20 @@
|
|||
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
|
||||
*
|
||||
* @apiGroup staff
|
||||
*
|
||||
* @apiDescription This path give back all tickets created.
|
||||
* @apiDescription This path retrieves all tickets created.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
|
|
|
@ -2,15 +2,17 @@
|
|||
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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -3,16 +3,18 @@ use RedBeanPHP\Facade as RedBean;
|
|||
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
|
||||
*
|
||||
* @apiGroup staff
|
||||
*
|
||||
* @apiDescription This path give back new tickets.
|
||||
* @apiDescription This path retrieves new tickets.
|
||||
*
|
||||
* @apiPermission Staff level 1
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -2,16 +2,18 @@
|
|||
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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -3,19 +3,19 @@ use Respect\Validation\Validator as DataValidator;
|
|||
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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
|
|
|
@ -2,19 +2,20 @@
|
|||
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
|
||||
*
|
||||
* @apiGroup staff
|
||||
*
|
||||
* @apiDescription This path give back the last events.
|
||||
* @apiDescription This path retrieves the last events.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
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
|
||||
*
|
||||
|
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_QUERY
|
||||
* @apiUse INVALID_PAGE
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@ 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 a ticket.
|
||||
*
|
||||
* @apiName Un-assign ticket
|
||||
*
|
||||
|
@ -13,11 +13,12 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -12,9 +12,11 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
|
|
|
@ -12,9 +12,10 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
|
|
|
@ -12,7 +12,7 @@ use Ifsnop\Mysqldump as IMysqldump;
|
|||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?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
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path checks and give back the current requirements.
|
||||
* @apiDescription This path checks and retrieves the current requirements.
|
||||
*
|
||||
* @apiPermission any
|
||||
*
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
<?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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -12,9 +12,12 @@ use RedBeanPHP\Facade as RedBean;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,13 +13,14 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -11,11 +11,12 @@
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -11,11 +11,13 @@
|
|||
*
|
||||
* @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
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_PASSWORD
|
||||
* @apiUse SYSTEM_USER_IS_ALREADY_DISABLED
|
||||
*
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,13 +13,15 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -12,17 +12,18 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiParam {string} body The new content of the template.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -11,15 +11,13 @@
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -11,11 +11,13 @@
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,16 +2,18 @@
|
|||
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
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path give back the all api keys.
|
||||
* @apiDescription This path retrieves the all api keys.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -2,19 +2,20 @@
|
|||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/get-logs Get logs.
|
||||
* @api {post} /system/get-logs retrieve logs.
|
||||
*
|
||||
* @apiName Get logs
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path give back the all logs.
|
||||
* @apiDescription This path retrieves the all logs.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
|
|
|
@ -2,16 +2,18 @@
|
|||
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
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path give back the all mail templates.
|
||||
* @apiDescription This path retrieves the all mail templates.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @api {post} /system/get-settings Get settings.
|
||||
* @api {post} /system/get-settings Retrieve settings.
|
||||
*
|
||||
* @apiName Get settings
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path returns one or more settings.
|
||||
* @apiDescription This path retrieves one or more settings.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/get-stats Get stats.
|
||||
* @api {post} /system/get-stats Retrieve stats.
|
||||
*
|
||||
* @apiName Get stats
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path give back stats.
|
||||
* @apiDescription This path retrieves stats.
|
||||
*
|
||||
* @apiPermission Staff level 1
|
||||
*
|
||||
* @apiParam {String} period Period of search.
|
||||
*
|
||||
* @apiParam {number} staffId Id of the current staff.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiParam {Number} staffId Id of the current staff.
|
||||
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_PERIOD
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -14,14 +14,15 @@ DataValidator::with('CustomValidations', true);
|
|||
* @apiPermission any
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiParam {string} password Password of the administrator.
|
||||
* @apiUse INVALID_NAME
|
||||
* @apiUse INVALID_EMAIL
|
||||
* @apiUse INVALID_PASSWORD
|
||||
* @apiUse INIT_SETTINGS_DONE
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,12 +13,13 @@ use Respect\Validation\Validator as DataValidator;
|
|||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @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
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -14,11 +14,10 @@ DataValidator::with('CustomValidations', true);
|
|||
* @apiPermission Staff Level 2
|
||||
*
|
||||
* @apiParam {String} name Name of the response.
|
||||
*
|
||||
* @apiParam {String} content Content of the response.
|
||||
*
|
||||
* @apiParam {String} language Language of the response.
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_NAME
|
||||
* @apiUse INVALID_CONTENT
|
||||
* @apiUse INVALID_LANGUAGE
|
||||
|
|
|
@ -13,13 +13,14 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -12,13 +12,14 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,13 +13,14 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiParam {string} captcha Encrypted value generated by google captcha client.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse INVALID_TICKET
|
||||
* @apiUse INVALID_EMAIL
|
||||
* @apiUse INVALID_CAPTCHA
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -13,11 +13,12 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @apiPermission user
|
||||
*
|
||||
* @apiParam {number} ticketNumber The number of a ticket.
|
||||
* @apiParam {Number} ticketNumber The number of a ticket.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_TICKET
|
||||
*
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,15 +13,15 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,19 +13,19 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_TITLE
|
||||
* @apiUse INVALID_CONTENT
|
||||
* @apiUse INVALID_DEPARTMENT
|
||||
* @apiUse INVALID_LANGUAGE
|
||||
* @apiUse INVALID_CAPTCHA
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -13,11 +13,12 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -13,17 +13,15 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiParam {string} name The new name of the custom response.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
|
|||
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
|
||||
*
|
||||
|
@ -13,9 +13,10 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @apiPermission Staff level 1
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {[CustomResponse](#api-Data_Structures-ObjectCustomresponse)[]} data List of custom responses.
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
*/
|
||||
|
||||
class GetCustomResponsesController extends Controller {
|
||||
|
|
|
@ -8,18 +8,18 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @apiGroup Ticket
|
||||
*
|
||||
* @apiDescription This path gives back information about a ticket.
|
||||
* @apiDescription This path retrieves information about a ticket.
|
||||
*
|
||||
* @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 NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)} data Information about the requested ticket.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_TICKET
|
||||
*
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -12,9 +12,10 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
|
|
|
@ -14,7 +14,9 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @apiParam {String} email Email of user to ban.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_EMAIL
|
||||
* @apiUse ALREADY_BANNED
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* @api {post} /user/check-session Check if session exist or not.
|
||||
*
|
||||
* @apiName check session
|
||||
* @apiName Check session
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -11,8 +11,6 @@
|
|||
*
|
||||
* @apiPermission Any
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -5,7 +5,7 @@ use RedBeanPHP\Facade as RedBean;
|
|||
/**
|
||||
* @api {post} /user/delete Delete a user.
|
||||
*
|
||||
* @apiName delete
|
||||
* @apiName Delete
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -13,9 +13,11 @@ use RedBeanPHP\Facade as RedBean;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
|
|
|
@ -4,7 +4,7 @@ use Respect\Validation\Validator as DataValidator;
|
|||
/**
|
||||
* @api {post} /user/edit-email Edit email of an user.
|
||||
*
|
||||
* @apiName edit-email
|
||||
* @apiName Edit-email
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_EMAIL
|
||||
*
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ use Respect\Validation\Validator as DataValidator;
|
|||
/**
|
||||
* @api {post} /user/edit-password Edit password of an user.
|
||||
*
|
||||
* @apiName edit-password
|
||||
* @apiName Edit-password
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -12,13 +12,14 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,19 +3,21 @@ use Respect\Validation\Validator as DataValidator;
|
|||
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
|
||||
*
|
||||
* @apiDescription This path give back information about an specific user.
|
||||
* @apiDescription This path retrieves information about an specific user.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
|
|
|
@ -2,25 +2,25 @@
|
|||
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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiParam {bool} desc Parameter to order the user ascending or descending way.
|
||||
*
|
||||
* @apiParam {string} search Key to find some specific users.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_PAGE
|
||||
* @apiUse INVALID_ORDER
|
||||
* @apiUse USER_SYSTEM_DISABLED
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -3,17 +3,18 @@ use Respect\Validation\Validator as DataValidator;
|
|||
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
|
||||
*
|
||||
* @apiDescription This path give back the information of a user.
|
||||
* @apiDescription This path retrieve the information of a user.
|
||||
*
|
||||
* @apiPermission User
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_CREDENTIALS
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -2,16 +2,18 @@
|
|||
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
|
||||
*
|
||||
* @apiDescription This path give back the list of banned users.
|
||||
* @apiDescription This path retrieves the list of banned users.
|
||||
*
|
||||
* @apiPermission Staff level 1
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/**
|
||||
* @api {post} /user/login Login a user.
|
||||
*
|
||||
* @apiName login
|
||||
* @apiName Login
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -11,19 +11,17 @@
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiParam {string} password The password of the user to login.
|
||||
*
|
||||
* @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
|
||||
* @apiUse USER_SYSTEM_DISABLED
|
||||
* @apiUse SESSION_EXISTS
|
||||
* @apiUse UNVERIFIED_USER
|
||||
* @apiUse INVALID_CREDENTIALS
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @api {post} /user/logout Log out the current user.
|
||||
*
|
||||
* @apiName log out
|
||||
* @apiName Log out
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
* @apiPermission Any
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
class LogoutController extends Controller {
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* @apiName recover password
|
||||
* @apiName Recover password
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -13,15 +13,16 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {Object} data Empty object
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@ 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 a token to the email of the user to change his password
|
||||
*
|
||||
* @apiName send recover password
|
||||
* @apiName Send recover password
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -13,11 +13,13 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ 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 a new user.
|
||||
*
|
||||
* @apiName sign up
|
||||
* @apiName Sign up
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -14,15 +14,19 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiParam {string} password The password of the new user.
|
||||
*
|
||||
* @apiParam {string} apyKey Key to sign up a user if the user system is disabled.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse INVALID_NAME
|
||||
* @apiUse INVALID_EMAIL
|
||||
* @apiUse INVALID_PASSWORD
|
||||
* @apiUse INVALID_CAPTCHA
|
||||
* @apiUse USER_SYSTEM_DISABLED
|
||||
* @apiUse USER_EXISTS
|
||||
* @apiUse ALREADY_BANNED
|
||||
* @apiUse NO_PERMISSION
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -4,7 +4,7 @@ use Respect\Validation\Validator as DataValidator;
|
|||
/**
|
||||
* @api {post} /user/un-ban Take a user out of banned list.
|
||||
*
|
||||
* @apiName un ban
|
||||
* @apiName Un ban
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ use Respect\Validation\Validator as DataValidator;
|
|||
/**
|
||||
* @api {post} /user/verify Verify the email of a new user.
|
||||
*
|
||||
* @apiName verify
|
||||
* @apiName Verify
|
||||
*
|
||||
* @apiGroup User
|
||||
*
|
||||
|
@ -12,11 +12,12 @@ use Respect\Validation\Validator as DataValidator;
|
|||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiError {String} message
|
||||
* @apiUse INVALID_EMAIL
|
||||
* @apiUse USER_SYSTEM_DISABLED
|
||||
* @apiUse INVALID_TOKEN
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
<?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 {
|
||||
const TABLE = 'topic';
|
||||
|
|
Loading…
Reference in New Issue