Guillermo - data system [skip ci]
This commit is contained in:
parent
be3d74ab92
commit
e3683ba1a4
|
@ -1,6 +1,25 @@
|
|||
<?php
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/add-api-key Create a new api-key.
|
||||
*
|
||||
* @apiName Add api-key
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path create a new api-key.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {string} name Number of the new api-key.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class AddAPIKeyController extends Controller {
|
||||
const PATH = '/add-api-key';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,6 +1,25 @@
|
|||
<?php
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/add-department Create a new department.
|
||||
*
|
||||
* @apiName Add department
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path create a new department.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {string} name Number of the new department.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class AddDepartmentController extends Controller {
|
||||
const PATH = '/add-department';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
<?php
|
||||
use Ifsnop\Mysqldump as IMysqldump;
|
||||
|
||||
/**
|
||||
* @api {post} /system/backup-database Do a backup of the database.
|
||||
*
|
||||
* @apiName Backup database
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path do a backup of the database.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class BackupDatabaseController extends Controller {
|
||||
const PATH = '/backup-database';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @api {post} /system/check-requirements Checks and give back the current requirements.
|
||||
*
|
||||
* @apiName Check requirements
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path checks and give back the current requirements.
|
||||
*
|
||||
* @apiPermission any
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class CheckRequirementsController extends Controller {
|
||||
const PATH = '/check-requirements';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,5 +1,22 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @api {post} /system/csv-import Recieves a csv file with a list of users to signup .
|
||||
*
|
||||
* @apiName csv import
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path recieves 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.
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class CSVImportController extends Controller {
|
||||
const PATH = '/csv-import';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
<?php
|
||||
use RedBeanPHP\Facade as RedBean;
|
||||
|
||||
/**
|
||||
* @api {post} /system/delete-all-users Delete all users in database.
|
||||
*
|
||||
* @apiName Delete all users
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path delete all users in database.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {string} password The password of the current staff.
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class DeleteAllUsersController extends Controller {
|
||||
const PATH = '/delete-all-users';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,6 +1,25 @@
|
|||
<?php
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/delete-api-key Delete a api-key.
|
||||
*
|
||||
* @apiName Delete api-key
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path delete a api-key.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {string} name Name of the api-key to delete.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class DeleteAPIKeyController extends Controller {
|
||||
const PATH = '/delete-api-key';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -2,6 +2,27 @@
|
|||
use Respect\Validation\Validator as DataValidator;
|
||||
DataValidator::with('CustomValidations', true);
|
||||
|
||||
/**
|
||||
* @api {post} /system/delete-department Delete a department.
|
||||
*
|
||||
* @apiName Delete department
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path delete a department.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {number} departmentId Id of the department to delete.
|
||||
*
|
||||
* @apiParam {number} transferDepartmentId Id of the department where the tickets will be transfer to.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class DeleteDepartmentController extends Controller {
|
||||
const PATH = '/delete-department';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @api {post} /system/disable-registration Disable the registration.
|
||||
*
|
||||
* @apiName Disable registration
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path disable the registration.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {string} password The password of the current staff.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class DisableRegistrationController extends Controller {
|
||||
const PATH = '/disable-registration';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @api {post} /system/disable-user-system Disable the user system.
|
||||
*
|
||||
* @apiName Disable user system
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path disable the user system.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {string} password The password of the current staff.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class DisableUserSystemController extends Controller {
|
||||
const PATH = '/disable-user-system';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -2,6 +2,26 @@
|
|||
use Respect\Validation\Validator as DataValidator;
|
||||
DataValidator::with('CustomValidations', true);
|
||||
|
||||
/**
|
||||
* @api {post} /system/edit-department Edit a department.
|
||||
*
|
||||
* @apiName Edit department
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path edit a department created.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {string} name The new name of the department.
|
||||
*
|
||||
* @apiParam {number} departmentId The Id of the department.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class EditDepartmentController extends Controller {
|
||||
const PATH = '/edit-department';
|
||||
|
|
|
@ -1,6 +1,31 @@
|
|||
<?php
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/edit-mail-template Edit a mail template.
|
||||
*
|
||||
* @apiName Edit mail template
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path edit a mail template.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class EditMailTemplateController extends Controller {
|
||||
const PATH = '/edit-mail-template';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,5 +1,28 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @api {post} /system/edit-settings Edit the settings of the system.
|
||||
*
|
||||
* @apiName Edit settings
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path edit the settings of the system.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @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.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class EditSettingsController extends Controller {
|
||||
const PATH = '/edit-settings';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,6 +1,25 @@
|
|||
<?php
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/enable-registration Enable the registration.
|
||||
*
|
||||
* @apiName Enable registration
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path enable the registration.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {string} password The password of the current staff.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class EnableRegistrationController extends Controller {
|
||||
const PATH = '/enable-registration';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @api {post} /system/enable-user-system Enable user system.
|
||||
*
|
||||
* @apiName Enable user system
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path enable the user system.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {string} password The password of the current staff.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class EnableUserSystemController extends Controller {
|
||||
const PATH = '/enable-user-system';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
<?php
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/get-api-keys Get api keys.
|
||||
*
|
||||
* @apiName Get api keys
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path give back the all api keys.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class GetAPIKeysController extends Controller {
|
||||
const PATH = '/get-api-keys';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,6 +1,25 @@
|
|||
<?php
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/get-logs Get logs.
|
||||
*
|
||||
* @apiName Get logs
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path give back the all logs.
|
||||
*
|
||||
* @apiPermission Staff level 1
|
||||
*
|
||||
* @apiParam {number} page The page of logs.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class GetLogsController extends Controller {
|
||||
const PATH = '/get-logs';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
<?php
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/get-mail-templates Get mail templates.
|
||||
*
|
||||
* @apiName Get mail templates
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path give back the all mail templates.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class GetMailTemplatesController extends Controller {
|
||||
const PATH = '/get-mail-templates';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,5 +1,22 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @api {post} /system/get-settings Get settings.
|
||||
*
|
||||
* @apiName Get settings
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path returns 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.
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class GetSettingsController extends Controller {
|
||||
const PATH = '/get-settings';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,6 +1,27 @@
|
|||
<?php
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/get-stats Get stats.
|
||||
*
|
||||
* @apiName Get stats
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path give back stats.
|
||||
*
|
||||
* @apiPermission Staff level 1
|
||||
*
|
||||
* @apiParam {String} period Period of search.
|
||||
*
|
||||
* @apiParam {number} staffId Id of the current staff.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class GetStatsController extends Controller {
|
||||
const PATH = '/get-stats';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -2,6 +2,29 @@
|
|||
use Respect\Validation\Validator as DataValidator;
|
||||
DataValidator::with('CustomValidations', true);
|
||||
|
||||
/**
|
||||
* @api {post} /system/init-admin Create the main administrator account.
|
||||
*
|
||||
* @apiName Init admin
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path create the main administrator account.
|
||||
*
|
||||
* @apiPermission any
|
||||
*
|
||||
* @apiParam {String} name Name of the administrator.
|
||||
*
|
||||
* @apiParam {string} email Email of the administrator.
|
||||
*
|
||||
* @apiParam {string} password Password of the administrator.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class InitAdminController extends Controller {
|
||||
const PATH = '/init-admin';
|
||||
const METHOD = 'POST';
|
||||
|
|
|
@ -1,6 +1,27 @@
|
|||
<?php
|
||||
use Respect\Validation\Validator as DataValidator;
|
||||
|
||||
/**
|
||||
* @api {post} /system/recover-mail-template Recover mail template.
|
||||
*
|
||||
* @apiName Recover mail template
|
||||
*
|
||||
* @apiGroup system
|
||||
*
|
||||
* @apiDescription This path recover olds mail templates.
|
||||
*
|
||||
* @apiPermission Staff level 3
|
||||
*
|
||||
* @apiParam {String} templateType type of the template.
|
||||
*
|
||||
* @apiParam {string} language language of the template.
|
||||
*
|
||||
* @apiError {String} message
|
||||
*
|
||||
* @apiSuccess {Object} data
|
||||
*
|
||||
*/
|
||||
|
||||
class RecoverMailTemplateController extends Controller {
|
||||
const PATH = '/recover-mail-template';
|
||||
const METHOD = 'POST';
|
||||
|
|
Loading…
Reference in New Issue