Guillermo - things [skip ci]
This commit is contained in:
parent
7792d6b527
commit
3f2157ac4e
|
@ -13,8 +13,9 @@ DataValidator::with('CustomValidations', true);
|
|||
*
|
||||
* @apiPermission Staff level 1
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
* @apiSuccess {[CustomResponse](#api-Data_Structures-ObjectCustomresponse)[]} data List of custom responses.
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
*/
|
||||
|
||||
class GetCustomResponsesController extends Controller {
|
||||
|
|
|
@ -33,143 +33,143 @@
|
|||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_NAME
|
||||
* @apiError {String} INVALID_NAME Common error
|
||||
* @apiError {String} INVALID_NAME The name is invalid, probably too short.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_SETTING
|
||||
* @apiError {String} INVALID_SETTING Common error
|
||||
* @apiError {String} INVALID_SETTING The setting are invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_DEPARTMENT
|
||||
* @apiError {String} INVALID_DEPARTMENT Common error
|
||||
* @apiError {String} INVALID_DEPARTMENT The dapartment is invalid, probably too short.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_TICKET
|
||||
* @apiError {String} INVALID_TICKET Common error
|
||||
* @apiError {String} INVALID_TICKET The ticket is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INIT_SETTINGS_DONE
|
||||
* @apiError {String} INIT_SETTINGS_DONE Common error
|
||||
* @apiError {String} INIT_SETTINGS_DONE The init settings are already done.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_OLD_PASSWORD
|
||||
* @apiError {String} INVALID_OLD_PASSWORD Common error
|
||||
* @apiError {String} INVALID_OLD_PASSWORD The old password is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_CAPTCHA
|
||||
* @apiError {String} INVALID_CAPTCHA Common error
|
||||
* @apiError {String} INVALID_CAPTCHA The captcha is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_TICKET_EVENT
|
||||
* @apiError {String} INVALID_TICKET_EVENT Common error
|
||||
* @apiError {String} INVALID_TICKET_EVENT The ticket event is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_LANGUAGE
|
||||
* @apiError {String} INVALID_LANGUAGE Common error
|
||||
* @apiError {String} INVALID_LANGUAGE The language is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine TICKET_ALREADY_ASSIGNED
|
||||
* @apiError {String} TICKET_ALREADY_ASSIGNED Common error
|
||||
* @apiError {String} TICKET_ALREADY_ASSIGNED The ticket is already assigned.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_PRIORITY
|
||||
* @apiError {String} INVALID_PRIORITY Common error
|
||||
* @apiError {String} INVALID_PRIORITY The priority is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_PAGE
|
||||
* @apiError {String} INVALID_PAGE Common error
|
||||
* @apiError {String} INVALID_PAGE The page is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_QUERY
|
||||
* @apiError {String} INVALID_QUERY Common error
|
||||
* @apiError {String} INVALID_QUERY The query is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_TOPIC
|
||||
* @apiError {String} INVALID_TOPIC Common error
|
||||
* @apiError {String} INVALID_TOPIC The topic is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_SEARCH
|
||||
* @apiError {String} INVALID_SEARCH Common error
|
||||
* @apiError {String} INVALID_SEARCH The search is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_ORDER
|
||||
* @apiError {String} INVALID_ORDER Common error
|
||||
* @apiError {String} INVALID_ORDER The order is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_USER
|
||||
* @apiError {String} INVALID_USER Common error
|
||||
* @apiError {String} INVALID_USER The user is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine ALREADY_BANNED
|
||||
* @apiError {String} ALREADY_BANNED Common error
|
||||
* @apiError {String} ALREADY_BANNED It's already banned.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_LEVEL
|
||||
* @apiError {String} INVALID_LEVEL Common error
|
||||
* @apiError {String} INVALID_LEVEL The level is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine ALREADY_A_STAFF
|
||||
* @apiError {String} ALREADY_A_STAFF Common error
|
||||
* @apiError {String} ALREADY_A_STAFF It's already a staff.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_STAFF
|
||||
* @apiError {String} INVALID_STAFF Common error
|
||||
* @apiError {String} INVALID_STAFF The staff is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine SAME_DEPARTMENT
|
||||
* @apiError {String} SAME_DEPARTMENT Common error
|
||||
* @apiError {String} SAME_DEPARTMENT It's the same department.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_TOKEN
|
||||
* @apiError {String} INVALID_TOKEN Common error
|
||||
* @apiError {String} INVALID_TOKEN The token is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine UNVERIFIED_USER
|
||||
* @apiError {String} UNVERIFIED_USER Common error
|
||||
* @apiError {String} UNVERIFIED_USER The user is not verified.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_TEMPLATE
|
||||
* @apiError {String} INVALID_TEMPLATE Common error
|
||||
* @apiError {String} INVALID_TEMPLATE The template is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_SUBJECT
|
||||
* @apiError {String} INVALID_SUBJECT Common error
|
||||
* @apiError {String} INVALID_SUBJECT The subject is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_BODY
|
||||
* @apiError {String} INVALID_BODY Common error
|
||||
* @apiError {String} INVALID_BODY The body is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine USER_SYSTEM_DISABLED
|
||||
* @apiError {String} USER_SYSTEM_DISABLED Common error
|
||||
* @apiError {String} USER_SYSTEM_DISABLED The user system is disabled.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine SYSTEM_USER_IS_ALREADY_DISABLED
|
||||
* @apiError {String} SYSTEM_USER_IS_ALREADY_DISABLED Common error
|
||||
* @apiError {String} SYSTEM_USER_IS_ALREADY_DISABLED The system user is already disabled.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine SYSTEM_USER_IS_ALREADY_ENABLED
|
||||
* @apiError {String} SYSTEM_USER_IS_ALREADY_ENABLED Common error
|
||||
* @apiError {String} SYSTEM_USER_IS_ALREADY_ENABLED The system user is already enabled.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_PERIOD
|
||||
* @apiError {String} INVALID_PERIOD Common error
|
||||
* @apiError {String} INVALID_PERIOD The period is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine NAME_ALREADY_USED
|
||||
* @apiError {String} NAME_ALREADY_USED Common error
|
||||
* @apiError {String} NAME_ALREADY_USED The name is already used.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine INVALID_FILE
|
||||
* @apiError {String} INVALID_FILE Common error
|
||||
* @apiError {String} INVALID_FILE The file is invalid.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine DATABASE_CONNECTION
|
||||
* @apiError {String} DATABASE_CONNECTION Common error
|
||||
* @apiError {String} DATABASE_CONNECTION It's a database connection error.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine DATABASE_CREATION
|
||||
* @apiError {String} DATABASE_CREATION Common error
|
||||
* @apiError {String} DATABASE_CREATION It's a database creation error.
|
||||
*/
|
||||
|
||||
class ERRORS {
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
<?php
|
||||
/**
|
||||
* @api {OBJECT} APIKey APIKey
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {String} name Name of the APIKey.
|
||||
* @apiParam {String} token Token of the APIKey.
|
||||
*/
|
||||
|
||||
class APIKey extends DataStore {
|
||||
const TABLE = 'apikey';
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @api {OBJECT} Article Article
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {Number} id Id of the article.
|
||||
* @apiParam {String} title Title of the article.
|
||||
* @apiParam {String} content Content of the article.
|
||||
* @apiParam {Number} lastEdited Last edit of the article.
|
||||
* @apiParam {Number} position Position of the article.
|
||||
*/
|
||||
|
||||
class Article extends DataStore {
|
||||
const TABLE = 'article';
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
<?php
|
||||
/**
|
||||
* @api {OBJECT} Article Article
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {Email} email Email of the user banned.
|
||||
*/
|
||||
|
||||
class Ban extends DataStore {
|
||||
const TABLE = 'ban';
|
||||
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
<?php
|
||||
/**
|
||||
* @api {OBJECT} CustomResponse CustomResponse
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {Number} id Id of the custom response.
|
||||
* @apiParam {String} content Content of the custom response.
|
||||
* @apiParam {String} name Name of the custom response.
|
||||
* @apiParam {String} language Language of the custom response.
|
||||
*/
|
||||
|
||||
class CustomResponse extends DataStore {
|
||||
const TABLE = 'customresponse';
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
<?php
|
||||
use RedBeanPHP\Facade as RedBean;
|
||||
|
||||
/**
|
||||
* @api {OBJECT} Department Department
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {Number} id Id of the custom response.
|
||||
* @apiParam {String} name Name of the custom response.
|
||||
* @apiParam {String} owners Owners of the department.
|
||||
*/
|
||||
|
||||
class Department extends DataStore {
|
||||
const TABLE = 'department';
|
||||
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
<?php
|
||||
use RedBeanPHP\Facade as RedBean;
|
||||
/**
|
||||
* @api {OBJECT} Log Log
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {String} type The type of the log.
|
||||
* @apiParam {String} to Destinatary of the log.
|
||||
* @apiParam {Object} author Author of the log.
|
||||
* @apiParam {String} author.name Name of the author.
|
||||
* @apiParam {Number} author.id Id of the author.
|
||||
* @apiParam {Boolean} author.staff Kind of author.
|
||||
* @apiParam {String} date Date of creation of the log.
|
||||
*/
|
||||
|
||||
class Log extends DataStore {
|
||||
const TABLE = 'log';
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
<?php
|
||||
use RedBeanPHP\Facade as RedBean;
|
||||
|
||||
/**
|
||||
* @api {OBJECT} MailTemplate MailTemplate
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {String} type The type of the mail template.
|
||||
* @apiParam {String} subject The subject of the mail template.
|
||||
* @apiParam {string} language The language of the mail template.
|
||||
* @apiParam {String} body The body of the mail template.
|
||||
*/
|
||||
|
||||
class MailTemplate extends DataStore {
|
||||
const TABLE = 'mailtemplate';
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* @api {OBJECT} Staff Staff
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {Number} id The type of the mail template.
|
||||
* @apiParam {String} name The subject of the mail template.
|
||||
* @apiParam {String} email The language of the mail template.
|
||||
* @apiParam {String} profilePic The body of the mail template.
|
||||
* @apiParam {Number} level The language of the mail template.
|
||||
* @apiParam {Object} departments The department of the staff.
|
||||
* @apiParam {Object} tickets The tickets of the staff.
|
||||
* @apiParam {Number} lastLogin The last login of the staff.
|
||||
*/
|
||||
|
||||
class Staff extends DataStore {
|
||||
const TABLE = 'staff';
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @api {OBJECT} Stat Stat
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {Number} date The date of the stat.
|
||||
* @apiParam {String} type The type of the stat.
|
||||
* @apiParam {Boolean} general The general of the stat.
|
||||
* @apiParam {String} value The value of the stat.
|
||||
*/
|
||||
|
||||
class Stat extends DataStore {
|
||||
const TABLE = 'stat';
|
||||
|
||||
|
|
|
@ -2,26 +2,26 @@
|
|||
/**
|
||||
* @api {OBJECT} Ticket Ticket
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {Number} ticketNumber Users age.
|
||||
* @apiParam {String} title Avatar-Image.
|
||||
* @apiParam {String} content Avatar-Image.
|
||||
* @apiParam {Object} department Avatar-Image.
|
||||
* @apiParam {Number} department.id Avatar-Image.
|
||||
* @apiParam {String} department.name Avatar-Image.
|
||||
* @apiParam {String} file Avatar-Image.
|
||||
* @apiParam {String} language Avatar-Image.
|
||||
* @apiParam {Boolean} unread Avatar-Image.
|
||||
* @apiParam {Boolean} unreadStaff Avatar-Image.
|
||||
* @apiParam {Boolean} closed Avatar-Image.
|
||||
* @apiParam {String} priority Avatar-Image.
|
||||
* @apiParam {Object} author Avatar-Image.
|
||||
* @apiParam {Number} author.id Avatar-Image.
|
||||
* @apiParam {String} author.name Avatar-Image.
|
||||
* @apiParam {String} author.email Avatar-Image.
|
||||
* @apiParam {Object} owner Avatar-Image.
|
||||
* @apiParam {Number} owner.id Avatar-Image.
|
||||
* @apiParam {String} owner.name Avatar-Image.
|
||||
* @apiParam {String} owner.email Avatar-Image.
|
||||
* @apiParam {Number} ticketNumber The number of the ticket.
|
||||
* @apiParam {String} title The title of the ticket.
|
||||
* @apiParam {String} content The content of the ticket.
|
||||
* @apiParam {Object} department The department of the ticket.
|
||||
* @apiParam {Number} department.id The id of the department of the ticket.
|
||||
* @apiParam {String} department.name The department's name of the ticket.
|
||||
* @apiParam {String} file The file of the ticket.
|
||||
* @apiParam {String} language The language of the ticket.
|
||||
* @apiParam {Boolean} unread The boolean to know if the user already readed or not.
|
||||
* @apiParam {Boolean} unreadStaff The boolean to know if the staff already readed or not.
|
||||
* @apiParam {Boolean} closed The boolean to know if the ticket is already closed or not.
|
||||
* @apiParam {String} priority The priority of the ticket.
|
||||
* @apiParam {Object} author The author of the ticket.
|
||||
* @apiParam {Number} author.id The id of the author of the ticket.
|
||||
* @apiParam {String} author.name The author's name of the ticket.
|
||||
* @apiParam {String} author.email The author's email of the ticket.
|
||||
* @apiParam {Object} owner The owner of the ticket.
|
||||
* @apiParam {Number} owner.id The owner's id of the ticket.
|
||||
* @apiParam {String} owner.name The owner's name of the ticket.
|
||||
* @apiParam {String} owner.email The owner's email of the ticket.
|
||||
* @apiParam {[TicketEvent](#api-Data_Structures-ObjectTicketevent)[]} events Events related to the ticket.
|
||||
*/
|
||||
use RedBeanPHP\Facade as RedBean;
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
/**
|
||||
* @api {OBJECT} TicketEvent TicketEvent
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {String} type Avatar-Image.
|
||||
* @apiParam {String} content Avatar-Image.
|
||||
* @apiParam {Object} author Avatar-Image.
|
||||
* @apiParam {Number} author.id Avatar-Image.
|
||||
* @apiParam {String} author.name Avatar-Image.
|
||||
* @apiParam {String} author.email Avatar-Image.
|
||||
* @apiParam {String} author.profilePic Avatar-Image.
|
||||
* @apiParam {Boolean} author.staff Avatar-Image.
|
||||
* @apiParam {String} date Avatar-Image.
|
||||
* @apiParam {String} file Avatar-Image.
|
||||
* @apiParam {String} type The type of the ticket event.
|
||||
* @apiParam {String} content The content of the ticket event.
|
||||
* @apiParam {Object} author The author of the ticket event.
|
||||
* @apiParam {Number} author.id The author's id of the ticket event.
|
||||
* @apiParam {String} author.name The author's name of the ticket event.
|
||||
* @apiParam {String} author.email The author's email of the ticket event.
|
||||
* @apiParam {String} author.profilePic The author's profilePic of the ticket event.
|
||||
* @apiParam {Boolean} author.staff The boolean to know if the author is staff or not.
|
||||
* @apiParam {String} date The date of the ticket event.
|
||||
* @apiParam {String} file The file of the ticket event.
|
||||
*/
|
||||
|
||||
class Ticketevent extends DataStore {
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
<?php
|
||||
use RedBeanPHP\Facade as RedBean;
|
||||
|
||||
/**
|
||||
* @api {OBJECT} User User
|
||||
* @apiGroup Data Structures
|
||||
* @apiParam {String} email The email of the user.
|
||||
* @apiParam {Number} id The id of the user.
|
||||
* @apiParam {String} name The name of the user.
|
||||
* @apiParam {Boolean} verified A boolean to know if the user is already verified or not.
|
||||
*/
|
||||
|
||||
class User extends DataStore {
|
||||
const TABLE = 'user';
|
||||
|
||||
|
|
Loading…
Reference in New Issue