opensupports/server/data/ERRORS.php

386 lines
12 KiB
PHP
Raw Normal View History

<?php
2017-04-20 05:55:38 +02:00
/**
* @apiDefine INVALID_CREDENTIALS
* @apiError {String} INVALID_CREDENTIALS Login credentials does not match.
*/
/**
* @apiDefine SESSION_EXISTS
* @apiError {String} SESSION_EXISTS The session already exists.
*/
/**
* @apiDefine USER_EXISTS
* @apiError {String} USER_EXISTS The user already exists.
*/
2018-12-12 05:23:58 +01:00
/**
* @apiDefine TAG_EXISTS
* @apiError {String} TAG_EXISTS The tag already exists.
*/
/**
2017-04-20 05:55:38 +02:00
* @apiDefine NO_PERMISSION
* @apiError {String} NO_PERMISSION You have no permission to perform this operation.
*/
/**
* @apiDefine INVALID_TITLE
* @apiError {String} INVALID_TITLE The title is invalid, probably too short.
*/
/**
* @apiDefine INVALID_CONTENT
* @apiError {String} INVALID_CONTENT The content is invalid, probably to short.
*/
/**
* @apiDefine INVALID_EMAIL
* @apiError {String} INVALID_EMAIL The email is invalid or already exists.
*/
/**
* @apiDefine INVALID_PASSWORD
* @apiError {String} INVALID_PASSWORD The password is invalid, probably too short.
*/
/**
* @apiDefine INVALID_NAME
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_NAME The name is invalid, probably too short.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_DESCRIPTION
* @apiError {String} INVALID_DESCRIPTION The description is invalid.
*/
2017-04-20 05:55:38 +02:00
/**
* @apiDefine INVALID_SETTING
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_SETTING The setting are invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_DEPARTMENT
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_DEPARTMENT The dapartment is invalid, probably too short.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_TICKET
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_TICKET The ticket is invalid.
2017-04-20 05:55:38 +02:00
*/
2018-12-12 05:23:58 +01:00
/**
* @apiDefine INVALID_TAG
* @apiError {String} INVALID_TAG The tag is invalid.
*/
/**
2017-04-20 05:55:38 +02:00
* @apiDefine INIT_SETTINGS_DONE
2017-04-21 05:34:20 +02:00
* @apiError {String} INIT_SETTINGS_DONE The init settings are already done.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_OLD_PASSWORD
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_OLD_PASSWORD The old password is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_CAPTCHA
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_CAPTCHA The captcha is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_TICKET_EVENT
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_TICKET_EVENT The ticket event is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_LANGUAGE
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_LANGUAGE The language is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine TICKET_ALREADY_ASSIGNED
2017-04-21 05:34:20 +02:00
* @apiError {String} TICKET_ALREADY_ASSIGNED The ticket is already assigned.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_PRIORITY
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_PRIORITY The priority is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_PAGE
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_PAGE The page is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_QUERY
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_QUERY The query is invalid.
2017-04-20 05:55:38 +02:00
*/
2020-01-24 02:26:32 +01:00
/**
* @apiDefine INVALID_TAG_FILTER
* @apiError {String} INVALID_TAG_FILTER The tag filter is invalid.
*/
/**
* @apiDefine INVALID_CLOSED_FILTER
* @apiError {String} INVALID_CLOSED_FILTER The closed filter is invalid.
*/
/**
* @apiDefine INVALID_UNREAD_STAFF_FILTER
* @apiError {String} INVALID_UNREAD_STAFF_FILTER The unread-staff filter is invalid.
*/
/**
* @apiDefine INVALID_PRIORITY_FILTER
* @apiError {String} INVALID_PRIORITY_FILTER The priority filter is invalid.
*/
/**
* @apiDefine INVALID_DATE_RANGE_FILTER
* @apiError {String} INVALID_DATE_RANGE_FILTER The date-range filter is invalid.
*/
/**
* @apiDefine INVALID_DEPARTMENT_FILTER
* @apiError {String} INVALID_DEPARTMENT_FILTER The department filter is invalid.
*/
/**
* @apiDefine INVALID_AUTHOR_FILTER
* @apiError {String} INVALID_AUTHOR_FILTER The author filter is invalid.
*/
/**
* @apiDefine INVALID_OWNER_FILTER
* @apiError {String} INVALID_OWNER_FILTER The owner filter is invalid.
*/
/**
* @apiDefine INVALID_ASSIGNED_FILTER
* @apiError {String} INVALID_ASSIGNED_FILTER The assigned filter is invalid.
*/
/**
* @apiDefine INVALID_QUERY_FILTER
* @apiError {String} INVALID_QUERY_FILTER The query filter is invalid.
*/
2020-01-24 02:26:32 +01:00
/**
* @apiDefine INVALID_ORDER_BY
* @apiError {String} INVALID_ORDER_BY The order-by is invalid.
*/
2017-04-20 05:55:38 +02:00
/**
* @apiDefine INVALID_TOPIC
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_TOPIC The topic is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_SEARCH
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_SEARCH The search is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_ORDER
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_ORDER The order is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_USER
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_USER The user is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine ALREADY_BANNED
2017-04-21 05:34:20 +02:00
* @apiError {String} ALREADY_BANNED It's already banned.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_LEVEL
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_LEVEL The level is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine ALREADY_A_STAFF
2017-04-21 05:34:20 +02:00
* @apiError {String} ALREADY_A_STAFF It's already a staff.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_STAFF
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_STAFF The staff is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine SAME_DEPARTMENT
2017-04-21 05:34:20 +02:00
* @apiError {String} SAME_DEPARTMENT It's the same department.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_TOKEN
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_TOKEN The token is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine UNVERIFIED_USER
2017-04-21 05:34:20 +02:00
* @apiError {String} UNVERIFIED_USER The user is not verified.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_TEMPLATE
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_TEMPLATE The template is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_SUBJECT
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_SUBJECT The subject is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_BODY
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_BODY The body is invalid.
2017-04-20 05:55:38 +02:00
*/
2018-12-24 01:44:59 +01:00
/**
* @apiDefine USER_SYSTEM_ENABLED
* @apiError {String} USER_SYSTEM_ENABLED The user system is enabled.
*/
2017-04-20 05:55:38 +02:00
/**
* @apiDefine USER_SYSTEM_DISABLED
2017-04-21 05:34:20 +02:00
* @apiError {String} USER_SYSTEM_DISABLED The user system is disabled.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine SYSTEM_USER_IS_ALREADY_DISABLED
2017-04-21 05:34:20 +02:00
* @apiError {String} SYSTEM_USER_IS_ALREADY_DISABLED The system user is already disabled.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine SYSTEM_USER_IS_ALREADY_ENABLED
2017-04-21 05:34:20 +02:00
* @apiError {String} SYSTEM_USER_IS_ALREADY_ENABLED The system user is already enabled.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_PERIOD
2017-04-21 05:34:20 +02:00
* @apiError {String} INVALID_PERIOD The period is invalid.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine NAME_ALREADY_USED
2017-04-21 05:34:20 +02:00
* @apiError {String} NAME_ALREADY_USED The name is already used.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine INVALID_FILE
2018-09-20 22:19:47 +02:00
* @apiError {String} INVALID_FILE The file is invalid or max size exceeded.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine DATABASE_CONNECTION
2017-04-21 05:34:20 +02:00
* @apiError {String} DATABASE_CONNECTION It's a database connection error.
2017-04-20 05:55:38 +02:00
*/
/**
* @apiDefine DATABASE_CREATION
2017-04-21 05:34:20 +02:00
* @apiError {String} DATABASE_CREATION It's a database creation error.
2017-04-20 05:55:38 +02:00
*/
2017-06-10 09:17:54 +02:00
/**
* @apiDefine SMTP_CONNECTION
* @apiError {String} SMTP_CONNECTION Could not connect with SMTP server.
*/
2018-09-28 00:46:30 +02:00
/**
* @apiDefine ALREADY_DISABLED
* @apiError {String} ALREADY_DISABLED User is already disabled
*/
/**
* @apiDefine ALREADY_ENABLED
* @apiError {String} ALREADY_ENABLED User is already enabled
*/
/**
* @apiDefine USER_DISABLED
* @apiError {String} USER_DISABLED User is disabled
*/
/**
* @apiDefine INVALID_TEXT_1
* @apiError {String} INVALID_TEXT_1 text1 of mail template has an invalid syntax or missing variables
*/
/**
* @apiDefine INVALID_TEXT_2
* @apiError {String} INVALID_TEXT_2 text2 of mail template has an invalid syntax or missing variables
*/
/**
* @apiDefine INVALID_TEXT_3
* @apiError {String} INVALID_TEXT_3 text3 of mail template has an invalid syntax or missing variables
*/
2018-11-29 22:37:04 +01:00
/**
* @apiDefine DEPARTMENT_PRIVATE_TICKETS
* @apiError {String} DEPARTMENT_PRIVATE_TICKETS There are tickets for in department created by non-staff and it can't be private
*/
2018-12-24 01:44:59 +01:00
/**
* @apiDefine EMAIL_POLLING
2019-02-03 20:47:29 +01:00
* @apiError {String} EMAIL_POLLING Email polling was unsuccesful
*/
/**
* @apiDefine IMAP_CONNECTION
* @apiError {String} IMAP_CONNECTION Imap connection was unsuccesfull
*/
/**
* @apiDefine CUSTOM_FIELD_ALREADY_EXISTS
* @apiError {String} CUSTOM_FIELD_ALREADY_EXISTS Custom field already exists
*/
/**
* @apiDefine INVALID_CUSTOM_FIELD
* @apiError {String} INVALID_CUSTOM_FIELD Custom field id is invalid
*/
/**
* @apiDefine INVALID_CUSTOM_FIELD_TYPE
* @apiError {String} INVALID_CUSTOM_FIELD_TYPE The type is invalid
*/
/**
* @apiDefine INVALID_CUSTOM_FIELD_OPTIONS
* @apiError {String} INVALID_CUSTOM_FIELD_OPTIONS Options are not a json array
*/
/**
* @apiDefine INVALID_CUSTOM_FIELD_OPTION
* @apiError {String} INVALID_CUSTOM_FIELD_OPTION Option is not in the list of possibles
2018-12-24 01:44:59 +01:00
*/
2019-03-06 16:41:53 +01:00
/**
* @apiDefine UNAVAILABLE_STATS
* @apiError {String} UNAVAILABLE_STATS Stats are currently unavailable
*/
/**
* @apiDefine INVALID_COLOR
* @apiError {String} INVALID_COLOR The color should be in hexadecimal, preceded by a '#'
*/
2019-11-16 20:07:02 +01:00
/**
* @apiDefine INVALID_API_KEY_TYPE
* @apiError {String} INVALID_API_KEY_TYPE Api key type is not one of the availables
*/
2017-04-20 05:55:38 +02:00
class ERRORS {
const INVALID_CREDENTIALS = 'INVALID_CREDENTIALS';
const SESSION_EXISTS = 'SESSION_EXISTS';
const USER_EXISTS = 'USER_EXISTS';
2018-12-12 05:23:58 +01:00
const TAG_EXISTS = 'TAG_EXISTS';
const NO_PERMISSION = 'NO_PERMISSION';
const INVALID_TITLE = 'INVALID_TITLE';
const INVALID_CONTENT = 'INVALID_CONTENT';
const INVALID_EMAIL = 'INVALID_EMAIL';
const INVALID_PASSWORD = 'INVALID_PASSWORD';
const INVALID_NAME = 'INVALID_NAME';
const INVALID_DESCRIPTION = 'INVALID_DESCRIPTION';
const INVALID_SETTING = 'INVALID_SETTING';
const INVALID_DEPARTMENT = 'INVALID_DEPARTMENT';
const INVALID_TICKET = 'INVALID_TICKET';
2018-12-12 05:23:58 +01:00
const INVALID_TAG = 'INVALID_TAG';
const INIT_SETTINGS_DONE = 'INIT_SETTINGS_DONE';
const INVALID_OLD_PASSWORD = 'INVALID_OLD_PASSWORD';
const INVALID_CAPTCHA = 'INVALID_CAPTCHA';
2016-09-29 19:34:20 +02:00
const INVALID_TICKET_EVENT = 'INVALID_TICKET_EVENT';
const INVALID_LANGUAGE = 'INVALID_LANGUAGE';
2018-03-09 19:17:28 +01:00
const INVALID_SUPPORTED_LANGUAGES = 'INVALID_SUPPORTED_LANGUAGES';
const TICKET_ALREADY_ASSIGNED = 'TICKET_ALREADY_ASSIGNED';
const INVALID_PRIORITY = 'INVALID_PRIORITY';
const INVALID_PAGE = 'INVALID_PAGE';
const INVALID_QUERY = 'INVALID_QUERY';
2019-11-10 20:14:30 +01:00
const INVALID_TAG_FILTER = 'INVALID_TAG_FILTER';
const INVALID_CLOSED_FILTER = 'INVALID_CLOSED_FILTER';
const INVALID_UNREAD_STAFF_FILTER = 'INVALID_UNREAD_STAFF_FILTER';
const INVALID_PRIORITY_FILTER = 'INVALID_PRIORITY_FILTER';
const INVALID_DATE_RANGE_FILTER = 'INVALID_DATE_RANGE_FILTER';
const INVALID_DEPARTMENT_FILTER = 'INVALID_DEPARTMENT_FILTER';
const INVALID_AUTHOR_FILTER = 'INVALID_AUTHOR_FILTER';
2020-01-24 02:26:32 +01:00
const INVALID_OWNER_FILTER = 'INVALID_OWNER_FILTER';
2019-11-10 20:14:30 +01:00
const INVALID_ASSIGNED_FILTER = 'INVALID_ASSIGNED_FILTER';
const INVALID_QUERY_FILTER = 'INVALID_QUERY_FILTER';
2019-11-10 20:14:30 +01:00
const INVALID_ORDER_BY = 'INVALID_ORDER_BY';
2016-11-23 02:27:05 +01:00
const INVALID_TOPIC = 'INVALID_TOPIC';
2016-11-30 07:33:46 +01:00
const INVALID_SEARCH = 'INVALID_SEARCH';
const INVALID_ORDER = 'INVALID_ORDER';
2016-11-30 18:13:57 +01:00
const INVALID_USER = 'INVALID_USER';
const ALREADY_BANNED = 'ALREADY_BANNED';
2016-12-06 03:17:18 +01:00
const INVALID_LEVEL = 'INVALID_LEVEL';
const ALREADY_A_STAFF = 'ALREADY_A_STAFF';
2016-12-07 21:24:42 +01:00
const INVALID_STAFF = 'INVALID_STAFF';
const SAME_DEPARTMENT = 'SAME_DEPARTMENT';
const INVALID_TOKEN = 'INVALID_TOKEN';
const UNVERIFIED_USER = 'UNVERIFIED_USER';
const INVALID_TEMPLATE = 'INVALID_TEMPLATE';
const INVALID_SUBJECT = 'INVALID_SUBJECT';
const INVALID_BODY = 'INVALID_BODY';
2018-12-24 01:44:59 +01:00
const USER_SYSTEM_ENABLED = 'USER_SYSTEM_ENABLED';
const USER_SYSTEM_DISABLED = 'USER_SYSTEM_DISABLED';
const SYSTEM_USER_IS_ALREADY_DISABLED = 'SYSTEM_USER_IS_ALREADY_DISABLED';
const SYSTEM_USER_IS_ALREADY_ENABLED = 'SYSTEM_USER_IS_ALREADY_ENABLED';
const INVALID_PERIOD = 'INVALID_PERIOD';
const NAME_ALREADY_USED = 'NAME_ALREADY_USED';
const INVALID_FILE = 'INVALID_FILE';
const DATABASE_CONNECTION = 'DATABASE_CONNECTION';
const DATABASE_CREATION = 'DATABASE_CREATION';
2017-06-10 09:17:54 +02:00
const SMTP_CONNECTION = 'SMTP_CONNECTION';
2018-12-24 01:44:59 +01:00
const IMAP_CONNECTION = 'IMAP_CONNECTION';
2018-09-28 00:46:30 +02:00
const ALREADY_DISABLED = 'ALREADY_DISABLED';
const ALREADY_ENABLED = 'ALREADY_ENABLED';
const USER_DISABLED = 'USER_DISABLED';
const INVALID_TEXT_1 = 'INVALID_TEXT_1';
const INVALID_TEXT_2 = 'INVALID_TEXT_2';
const INVALID_TEXT_3 = 'INVALID_TEXT_3';
2018-11-29 22:37:04 +01:00
const DEPARTMENT_PRIVATE_TICKETS = 'DEPARTMENT_PRIVATE_TICKETS';
2018-12-24 01:44:59 +01:00
const EMAIL_POLLING = 'EMAIL_POLLING';
2019-02-03 20:47:29 +01:00
const CUSTOM_FIELD_ALREADY_EXISTS = 'CUSTOM_FIELD_ALREADY_EXISTS';
const INVALID_CUSTOM_FIELD = 'INVALID_CUSTOM_FIELD';
const INVALID_CUSTOM_FIELD_TYPE = 'INVALID_CUSTOM_FIELD_TYPE';
const INVALID_CUSTOM_FIELD_OPTIONS = 'INVALID_CUSTOM_FIELD_OPTIONS';
const INVALID_CUSTOM_FIELD_OPTION = 'INVALID_CUSTOM_FIELD_OPTION';
2019-03-06 16:41:53 +01:00
const UNAVAILABLE_STATS = 'UNAVAILABLE_STATS';
const INVALID_COLOR = 'INVALID_COLOR';
2019-11-16 20:07:02 +01:00
const INVALID_API_KEY_TYPE = 'INVALID_API_KEY_TYPE';
}