fix linting issues
This commit is contained in:
parent
8d0581e401
commit
d41aff1861
|
@ -10,38 +10,38 @@ class Auth
|
|||
/**
|
||||
* User Roles.
|
||||
*/
|
||||
const USER_ROLE_ALL = 'all';
|
||||
const USER_ROLE_GUEST = 'guest';
|
||||
const USER_ROLE_MEMBER = 'member';
|
||||
const USER_ROLE_ADMIN = 'admin';
|
||||
const USER_ROLE_DEVELOPER = 'developer';
|
||||
const USER_ROLE_OWNER = 'owner';
|
||||
const USER_ROLE_APP = 'app';
|
||||
const USER_ROLE_SYSTEM = 'system';
|
||||
public const USER_ROLE_ALL = 'all';
|
||||
public const USER_ROLE_GUEST = 'guest';
|
||||
public const USER_ROLE_MEMBER = 'member';
|
||||
public const USER_ROLE_ADMIN = 'admin';
|
||||
public const USER_ROLE_DEVELOPER = 'developer';
|
||||
public const USER_ROLE_OWNER = 'owner';
|
||||
public const USER_ROLE_APP = 'app';
|
||||
public const USER_ROLE_SYSTEM = 'system';
|
||||
|
||||
/**
|
||||
* Token Types.
|
||||
*/
|
||||
const TOKEN_TYPE_LOGIN = 1; // Deprecated
|
||||
const TOKEN_TYPE_VERIFICATION = 2;
|
||||
const TOKEN_TYPE_RECOVERY = 3;
|
||||
const TOKEN_TYPE_INVITE = 4;
|
||||
const TOKEN_TYPE_MAGIC_URL = 5;
|
||||
public const TOKEN_TYPE_LOGIN = 1; // Deprecated
|
||||
public const TOKEN_TYPE_VERIFICATION = 2;
|
||||
public const TOKEN_TYPE_RECOVERY = 3;
|
||||
public const TOKEN_TYPE_INVITE = 4;
|
||||
public const TOKEN_TYPE_MAGIC_URL = 5;
|
||||
|
||||
/**
|
||||
* Session Providers.
|
||||
*/
|
||||
const SESSION_PROVIDER_EMAIL = 'email';
|
||||
const SESSION_PROVIDER_ANONYMOUS = 'anonymous';
|
||||
const SESSION_PROVIDER_MAGIC_URL = 'magic-url';
|
||||
public const SESSION_PROVIDER_EMAIL = 'email';
|
||||
public const SESSION_PROVIDER_ANONYMOUS = 'anonymous';
|
||||
public const SESSION_PROVIDER_MAGIC_URL = 'magic-url';
|
||||
|
||||
/**
|
||||
* Token Expiration times.
|
||||
*/
|
||||
const TOKEN_EXPIRATION_LOGIN_LONG = 31536000; /* 1 year */
|
||||
const TOKEN_EXPIRATION_LOGIN_SHORT = 3600; /* 1 hour */
|
||||
const TOKEN_EXPIRATION_RECOVERY = 3600; /* 1 hour */
|
||||
const TOKEN_EXPIRATION_CONFIRM = 3600 * 24 * 7; /* 7 days */
|
||||
public const TOKEN_EXPIRATION_LOGIN_LONG = 31536000; /* 1 year */
|
||||
public const TOKEN_EXPIRATION_LOGIN_SHORT = 3600; /* 1 hour */
|
||||
public const TOKEN_EXPIRATION_RECOVERY = 3600; /* 1 hour */
|
||||
public const TOKEN_EXPIRATION_CONFIRM = 3600 * 24 * 7; /* 7 days */
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
|
|
@ -9,8 +9,8 @@ use Appwrite\Auth\OAuth2;
|
|||
|
||||
class Tradeshift extends OAuth2
|
||||
{
|
||||
const TRADESHIFT_SANDBOX_API_DOMAIN = 'api-sandbox.tradeshift.com';
|
||||
const TRADESHIFT_API_DOMAIN = 'api.tradeshift.com';
|
||||
public const TRADESHIFT_SANDBOX_API_DOMAIN = 'api-sandbox.tradeshift.com';
|
||||
public const TRADESHIFT_API_DOMAIN = 'api.tradeshift.com';
|
||||
|
||||
private array $apiDomain = [
|
||||
'sandbox' => self::TRADESHIFT_SANDBOX_API_DOMAIN,
|
||||
|
|
|
@ -8,29 +8,29 @@ use Utopia\Database\Document;
|
|||
|
||||
class Event
|
||||
{
|
||||
const DATABASE_QUEUE_NAME = 'v1-database';
|
||||
const DATABASE_CLASS_NAME = 'DatabaseV1';
|
||||
public const DATABASE_QUEUE_NAME = 'v1-database';
|
||||
public const DATABASE_CLASS_NAME = 'DatabaseV1';
|
||||
|
||||
const DELETE_QUEUE_NAME = 'v1-deletes';
|
||||
const DELETE_CLASS_NAME = 'DeletesV1';
|
||||
public const DELETE_QUEUE_NAME = 'v1-deletes';
|
||||
public const DELETE_CLASS_NAME = 'DeletesV1';
|
||||
|
||||
const AUDITS_QUEUE_NAME = 'v1-audits';
|
||||
const AUDITS_CLASS_NAME = 'AuditsV1';
|
||||
public const AUDITS_QUEUE_NAME = 'v1-audits';
|
||||
public const AUDITS_CLASS_NAME = 'AuditsV1';
|
||||
|
||||
const MAILS_QUEUE_NAME = 'v1-mails';
|
||||
const MAILS_CLASS_NAME = 'MailsV1';
|
||||
public const MAILS_QUEUE_NAME = 'v1-mails';
|
||||
public const MAILS_CLASS_NAME = 'MailsV1';
|
||||
|
||||
const FUNCTIONS_QUEUE_NAME = 'v1-functions';
|
||||
const FUNCTIONS_CLASS_NAME = 'FunctionsV1';
|
||||
public const FUNCTIONS_QUEUE_NAME = 'v1-functions';
|
||||
public const FUNCTIONS_CLASS_NAME = 'FunctionsV1';
|
||||
|
||||
const WEBHOOK_QUEUE_NAME = 'v1-webhooks';
|
||||
const WEBHOOK_CLASS_NAME = 'WebhooksV1';
|
||||
public const WEBHOOK_QUEUE_NAME = 'v1-webhooks';
|
||||
public const WEBHOOK_CLASS_NAME = 'WebhooksV1';
|
||||
|
||||
const CERTIFICATES_QUEUE_NAME = 'v1-certificates';
|
||||
const CERTIFICATES_CLASS_NAME = 'CertificatesV1';
|
||||
public const CERTIFICATES_QUEUE_NAME = 'v1-certificates';
|
||||
public const CERTIFICATES_CLASS_NAME = 'CertificatesV1';
|
||||
|
||||
const BUILDS_QUEUE_NAME = 'v1-builds';
|
||||
const BUILDS_CLASS_NAME = 'BuildsV1';
|
||||
public const BUILDS_QUEUE_NAME = 'v1-builds';
|
||||
public const BUILDS_CLASS_NAME = 'BuildsV1';
|
||||
|
||||
protected string $queue = '';
|
||||
protected string $class = '';
|
||||
|
|
|
@ -32,135 +32,135 @@ class Exception extends \Exception
|
|||
*/
|
||||
|
||||
/** General */
|
||||
const GENERAL_UNKNOWN = 'general_unknown';
|
||||
const GENERAL_MOCK = 'general_mock';
|
||||
const GENERAL_ACCESS_FORBIDDEN = 'general_access_forbidden';
|
||||
const GENERAL_UNKNOWN_ORIGIN = 'general_unknown_origin';
|
||||
const GENERAL_SERVICE_DISABLED = 'general_service_disabled';
|
||||
const GENERAL_UNAUTHORIZED_SCOPE = 'general_unauthorized_scope';
|
||||
const GENERAL_RATE_LIMIT_EXCEEDED = 'general_rate_limit_exceeded';
|
||||
const GENERAL_SMTP_DISABLED = 'general_smtp_disabled';
|
||||
const GENERAL_ARGUMENT_INVALID = 'general_argument_invalid';
|
||||
const GENERAL_QUERY_LIMIT_EXCEEDED = 'general_query_limit_exceeded';
|
||||
const GENERAL_QUERY_INVALID = 'general_query_invalid';
|
||||
const GENERAL_ROUTE_NOT_FOUND = 'general_route_not_found';
|
||||
const GENERAL_CURSOR_NOT_FOUND = 'general_cursor_not_found';
|
||||
const GENERAL_SERVER_ERROR = 'general_server_error';
|
||||
const GENERAL_PROTOCOL_UNSUPPORTED = 'general_protocol_unsupported';
|
||||
public const GENERAL_UNKNOWN = 'general_unknown';
|
||||
public const GENERAL_MOCK = 'general_mock';
|
||||
public const GENERAL_ACCESS_FORBIDDEN = 'general_access_forbidden';
|
||||
public const GENERAL_UNKNOWN_ORIGIN = 'general_unknown_origin';
|
||||
public const GENERAL_SERVICE_DISABLED = 'general_service_disabled';
|
||||
public const GENERAL_UNAUTHORIZED_SCOPE = 'general_unauthorized_scope';
|
||||
public const GENERAL_RATE_LIMIT_EXCEEDED = 'general_rate_limit_exceeded';
|
||||
public const GENERAL_SMTP_DISABLED = 'general_smtp_disabled';
|
||||
public const GENERAL_ARGUMENT_INVALID = 'general_argument_invalid';
|
||||
public const GENERAL_QUERY_LIMIT_EXCEEDED = 'general_query_limit_exceeded';
|
||||
public const GENERAL_QUERY_INVALID = 'general_query_invalid';
|
||||
public const GENERAL_ROUTE_NOT_FOUND = 'general_route_not_found';
|
||||
public const GENERAL_CURSOR_NOT_FOUND = 'general_cursor_not_found';
|
||||
public const GENERAL_SERVER_ERROR = 'general_server_error';
|
||||
public const GENERAL_PROTOCOL_UNSUPPORTED = 'general_protocol_unsupported';
|
||||
|
||||
/** Users */
|
||||
const USER_COUNT_EXCEEDED = 'user_count_exceeded';
|
||||
const USER_JWT_INVALID = 'user_jwt_invalid';
|
||||
const USER_ALREADY_EXISTS = 'user_already_exists';
|
||||
const USER_BLOCKED = 'user_blocked';
|
||||
const USER_INVALID_TOKEN = 'user_invalid_token';
|
||||
const USER_PASSWORD_RESET_REQUIRED = 'user_password_reset_required';
|
||||
const USER_EMAIL_NOT_WHITELISTED = 'user_email_not_whitelisted';
|
||||
const USER_IP_NOT_WHITELISTED = 'user_ip_not_whitelisted';
|
||||
const USER_INVALID_CREDENTIALS = 'user_invalid_credentials';
|
||||
const USER_ANONYMOUS_CONSOLE_PROHIBITED = 'user_anonymous_console_prohibited';
|
||||
const USER_SESSION_ALREADY_EXISTS = 'user_session_already_exists';
|
||||
const USER_NOT_FOUND = 'user_not_found';
|
||||
const USER_EMAIL_ALREADY_EXISTS = 'user_email_already_exists';
|
||||
const USER_PASSWORD_MISMATCH = 'user_password_mismatch';
|
||||
const USER_SESSION_NOT_FOUND = 'user_session_not_found';
|
||||
const USER_UNAUTHORIZED = 'user_unauthorized';
|
||||
const USER_AUTH_METHOD_UNSUPPORTED = 'user_auth_method_unsupported';
|
||||
public const USER_COUNT_EXCEEDED = 'user_count_exceeded';
|
||||
public const USER_JWT_INVALID = 'user_jwt_invalid';
|
||||
public const USER_ALREADY_EXISTS = 'user_already_exists';
|
||||
public const USER_BLOCKED = 'user_blocked';
|
||||
public const USER_INVALID_TOKEN = 'user_invalid_token';
|
||||
public const USER_PASSWORD_RESET_REQUIRED = 'user_password_reset_required';
|
||||
public const USER_EMAIL_NOT_WHITELISTED = 'user_email_not_whitelisted';
|
||||
public const USER_IP_NOT_WHITELISTED = 'user_ip_not_whitelisted';
|
||||
public const USER_INVALID_CREDENTIALS = 'user_invalid_credentials';
|
||||
public const USER_ANONYMOUS_CONSOLE_PROHIBITED = 'user_anonymous_console_prohibited';
|
||||
public const USER_SESSION_ALREADY_EXISTS = 'user_session_already_exists';
|
||||
public const USER_NOT_FOUND = 'user_not_found';
|
||||
public const USER_EMAIL_ALREADY_EXISTS = 'user_email_already_exists';
|
||||
public const USER_PASSWORD_MISMATCH = 'user_password_mismatch';
|
||||
public const USER_SESSION_NOT_FOUND = 'user_session_not_found';
|
||||
public const USER_UNAUTHORIZED = 'user_unauthorized';
|
||||
public const USER_AUTH_METHOD_UNSUPPORTED = 'user_auth_method_unsupported';
|
||||
|
||||
/** Teams */
|
||||
const TEAM_NOT_FOUND = 'team_not_found';
|
||||
const TEAM_INVITE_ALREADY_EXISTS = 'team_invite_already_exists';
|
||||
const TEAM_INVITE_NOT_FOUND = 'team_invite_not_found';
|
||||
const TEAM_INVALID_SECRET = 'team_invalid_secret';
|
||||
const TEAM_MEMBERSHIP_MISMATCH = 'team_membership_mismatch';
|
||||
const TEAM_INVITE_MISMATCH = 'team_invite_mismatch';
|
||||
public const TEAM_NOT_FOUND = 'team_not_found';
|
||||
public const TEAM_INVITE_ALREADY_EXISTS = 'team_invite_already_exists';
|
||||
public const TEAM_INVITE_NOT_FOUND = 'team_invite_not_found';
|
||||
public const TEAM_INVALID_SECRET = 'team_invalid_secret';
|
||||
public const TEAM_MEMBERSHIP_MISMATCH = 'team_membership_mismatch';
|
||||
public const TEAM_INVITE_MISMATCH = 'team_invite_mismatch';
|
||||
|
||||
/** Membership */
|
||||
const MEMBERSHIP_NOT_FOUND = 'membership_not_found';
|
||||
public const MEMBERSHIP_NOT_FOUND = 'membership_not_found';
|
||||
|
||||
/** Avatars */
|
||||
const AVATAR_SET_NOT_FOUND = 'avatar_set_not_found';
|
||||
const AVATAR_NOT_FOUND = 'avatar_not_found';
|
||||
const AVATAR_IMAGE_NOT_FOUND = 'avatar_image_not_found';
|
||||
const AVATAR_REMOTE_URL_FAILED = 'avatar_remote_url_failed';
|
||||
const AVATAR_ICON_NOT_FOUND = 'avatar_icon_not_found';
|
||||
public const AVATAR_SET_NOT_FOUND = 'avatar_set_not_found';
|
||||
public const AVATAR_NOT_FOUND = 'avatar_not_found';
|
||||
public const AVATAR_IMAGE_NOT_FOUND = 'avatar_image_not_found';
|
||||
public const AVATAR_REMOTE_URL_FAILED = 'avatar_remote_url_failed';
|
||||
public const AVATAR_ICON_NOT_FOUND = 'avatar_icon_not_found';
|
||||
|
||||
/** Storage */
|
||||
const STORAGE_FILE_NOT_FOUND = 'storage_file_not_found';
|
||||
const STORAGE_DEVICE_NOT_FOUND = 'storage_device_not_found';
|
||||
const STORAGE_FILE_EMPTY = 'storage_file_empty';
|
||||
const STORAGE_FILE_TYPE_UNSUPPORTED = 'storage_file_type_unsupported';
|
||||
const STORAGE_INVALID_FILE_SIZE = 'storage_invalid_file_size';
|
||||
const STORAGE_INVALID_FILE = 'storage_invalid_file';
|
||||
const STORAGE_BUCKET_ALREADY_EXISTS = 'storage_bucket_already_exists';
|
||||
const STORAGE_BUCKET_NOT_FOUND = 'storage_bucket_not_found';
|
||||
const STORAGE_INVALID_CONTENT_RANGE = 'storage_invalid_content_range';
|
||||
const STORAGE_INVALID_RANGE = 'storage_invalid_range';
|
||||
public const STORAGE_FILE_NOT_FOUND = 'storage_file_not_found';
|
||||
public const STORAGE_DEVICE_NOT_FOUND = 'storage_device_not_found';
|
||||
public const STORAGE_FILE_EMPTY = 'storage_file_empty';
|
||||
public const STORAGE_FILE_TYPE_UNSUPPORTED = 'storage_file_type_unsupported';
|
||||
public const STORAGE_INVALID_FILE_SIZE = 'storage_invalid_file_size';
|
||||
public const STORAGE_INVALID_FILE = 'storage_invalid_file';
|
||||
public const STORAGE_BUCKET_ALREADY_EXISTS = 'storage_bucket_already_exists';
|
||||
public const STORAGE_BUCKET_NOT_FOUND = 'storage_bucket_not_found';
|
||||
public const STORAGE_INVALID_CONTENT_RANGE = 'storage_invalid_content_range';
|
||||
public const STORAGE_INVALID_RANGE = 'storage_invalid_range';
|
||||
|
||||
/** Functions */
|
||||
const FUNCTION_NOT_FOUND = 'function_not_found';
|
||||
const FUNCTION_RUNTIME_UNSUPPORTED = 'function_runtime_unsupported';
|
||||
public const FUNCTION_NOT_FOUND = 'function_not_found';
|
||||
public const FUNCTION_RUNTIME_UNSUPPORTED = 'function_runtime_unsupported';
|
||||
|
||||
/** Deployments */
|
||||
const DEPLOYMENT_NOT_FOUND = 'deployment_not_found';
|
||||
public const DEPLOYMENT_NOT_FOUND = 'deployment_not_found';
|
||||
|
||||
/** Builds */
|
||||
const BUILD_NOT_FOUND = 'build_not_found';
|
||||
const BUILD_NOT_READY = 'build_not_ready';
|
||||
const BUILD_IN_PROGRESS = 'build_in_progress';
|
||||
public const BUILD_NOT_FOUND = 'build_not_found';
|
||||
public const BUILD_NOT_READY = 'build_not_ready';
|
||||
public const BUILD_IN_PROGRESS = 'build_in_progress';
|
||||
|
||||
/** Execution */
|
||||
const EXECUTION_NOT_FOUND = 'execution_not_found';
|
||||
public const EXECUTION_NOT_FOUND = 'execution_not_found';
|
||||
|
||||
/** Collections */
|
||||
const COLLECTION_NOT_FOUND = 'collection_not_found';
|
||||
const COLLECTION_ALREADY_EXISTS = 'collection_already_exists';
|
||||
const COLLECTION_LIMIT_EXCEEDED = 'collection_limit_exceeded';
|
||||
public const COLLECTION_NOT_FOUND = 'collection_not_found';
|
||||
public const COLLECTION_ALREADY_EXISTS = 'collection_already_exists';
|
||||
public const COLLECTION_LIMIT_EXCEEDED = 'collection_limit_exceeded';
|
||||
|
||||
/** Documents */
|
||||
const DOCUMENT_NOT_FOUND = 'document_not_found';
|
||||
const DOCUMENT_INVALID_STRUCTURE = 'document_invalid_structure';
|
||||
const DOCUMENT_MISSING_PAYLOAD = 'document_missing_payload';
|
||||
const DOCUMENT_ALREADY_EXISTS = 'document_already_exists';
|
||||
public const DOCUMENT_NOT_FOUND = 'document_not_found';
|
||||
public const DOCUMENT_INVALID_STRUCTURE = 'document_invalid_structure';
|
||||
public const DOCUMENT_MISSING_PAYLOAD = 'document_missing_payload';
|
||||
public const DOCUMENT_ALREADY_EXISTS = 'document_already_exists';
|
||||
|
||||
/** Attribute */
|
||||
const ATTRIBUTE_NOT_FOUND = 'attribute_not_found';
|
||||
const ATTRIBUTE_UNKNOWN = 'attribute_unknown';
|
||||
const ATTRIBUTE_NOT_AVAILABLE = 'attribute_not_available';
|
||||
const ATTRIBUTE_FORMAT_UNSUPPORTED = 'attribute_format_unsupported';
|
||||
const ATTRIBUTE_DEFAULT_UNSUPPORTED = 'attribute_default_unsupported';
|
||||
const ATTRIBUTE_ALREADY_EXISTS = 'attribute_already_exists';
|
||||
const ATTRIBUTE_LIMIT_EXCEEDED = 'attribute_limit_exceeded';
|
||||
const ATTRIBUTE_VALUE_INVALID = 'attribute_value_invalid';
|
||||
public const ATTRIBUTE_NOT_FOUND = 'attribute_not_found';
|
||||
public const ATTRIBUTE_UNKNOWN = 'attribute_unknown';
|
||||
public const ATTRIBUTE_NOT_AVAILABLE = 'attribute_not_available';
|
||||
public const ATTRIBUTE_FORMAT_UNSUPPORTED = 'attribute_format_unsupported';
|
||||
public const ATTRIBUTE_DEFAULT_UNSUPPORTED = 'attribute_default_unsupported';
|
||||
public const ATTRIBUTE_ALREADY_EXISTS = 'attribute_already_exists';
|
||||
public const ATTRIBUTE_LIMIT_EXCEEDED = 'attribute_limit_exceeded';
|
||||
public const ATTRIBUTE_VALUE_INVALID = 'attribute_value_invalid';
|
||||
|
||||
/** Indexes */
|
||||
const INDEX_NOT_FOUND = 'index_not_found';
|
||||
const INDEX_LIMIT_EXCEEDED = 'index_limit_exceeded';
|
||||
const INDEX_ALREADY_EXISTS = 'index_already_exists';
|
||||
public const INDEX_NOT_FOUND = 'index_not_found';
|
||||
public const INDEX_LIMIT_EXCEEDED = 'index_limit_exceeded';
|
||||
public const INDEX_ALREADY_EXISTS = 'index_already_exists';
|
||||
|
||||
/** Projects */
|
||||
const PROJECT_NOT_FOUND = 'project_not_found';
|
||||
const PROJECT_UNKNOWN = 'project_unknown';
|
||||
const PROJECT_PROVIDER_DISABLED = 'project_provider_disabled';
|
||||
const PROJECT_PROVIDER_UNSUPPORTED = 'project_provider_unsupported';
|
||||
const PROJECT_INVALID_SUCCESS_URL = 'project_invalid_success_url';
|
||||
const PROJECT_INVALID_FAILURE_URL = 'project_invalid_failure_url';
|
||||
const PROJECT_MISSING_USER_ID = 'project_missing_user_id';
|
||||
const PROJECT_RESERVED_PROJECT = 'project_reserved_project';
|
||||
public const PROJECT_NOT_FOUND = 'project_not_found';
|
||||
public const PROJECT_UNKNOWN = 'project_unknown';
|
||||
public const PROJECT_PROVIDER_DISABLED = 'project_provider_disabled';
|
||||
public const PROJECT_PROVIDER_UNSUPPORTED = 'project_provider_unsupported';
|
||||
public const PROJECT_INVALID_SUCCESS_URL = 'project_invalid_success_url';
|
||||
public const PROJECT_INVALID_FAILURE_URL = 'project_invalid_failure_url';
|
||||
public const PROJECT_MISSING_USER_ID = 'project_missing_user_id';
|
||||
public const PROJECT_RESERVED_PROJECT = 'project_reserved_project';
|
||||
|
||||
/** Webhooks */
|
||||
const WEBHOOK_NOT_FOUND = 'webhook_not_found';
|
||||
public const WEBHOOK_NOT_FOUND = 'webhook_not_found';
|
||||
|
||||
/** Keys */
|
||||
const KEY_NOT_FOUND = 'key_not_found';
|
||||
public const KEY_NOT_FOUND = 'key_not_found';
|
||||
|
||||
/** Platform */
|
||||
const PLATFORM_NOT_FOUND = 'platform_not_found';
|
||||
public const PLATFORM_NOT_FOUND = 'platform_not_found';
|
||||
|
||||
/** Domain */
|
||||
const DOMAIN_NOT_FOUND = 'domain_not_found';
|
||||
const DOMAIN_ALREADY_EXISTS = 'domain_already_exists';
|
||||
const DOMAIN_VERIFICATION_FAILED = 'domain_verification_failed';
|
||||
public const DOMAIN_NOT_FOUND = 'domain_not_found';
|
||||
public const DOMAIN_ALREADY_EXISTS = 'domain_already_exists';
|
||||
public const DOMAIN_VERIFICATION_FAILED = 'domain_verification_failed';
|
||||
|
||||
|
||||
private $type = '';
|
||||
|
|
|
@ -81,8 +81,8 @@ abstract class Worker
|
|||
throw new Exception("Please implement shutdown method in worker");
|
||||
}
|
||||
|
||||
const DATABASE_PROJECT = 'project';
|
||||
const DATABASE_CONSOLE = 'console';
|
||||
public const DATABASE_PROJECT = 'project';
|
||||
public const DATABASE_CONSOLE = 'console';
|
||||
|
||||
/**
|
||||
* A wrapper around 'init' function with non-worker-specific code
|
||||
|
|
|
@ -76,116 +76,116 @@ use Appwrite\Utopia\Response\Model\UsageUsers;
|
|||
class Response extends SwooleResponse
|
||||
{
|
||||
// General
|
||||
const MODEL_NONE = 'none';
|
||||
const MODEL_ANY = 'any';
|
||||
const MODEL_LOG = 'log';
|
||||
const MODEL_LOG_LIST = 'logList';
|
||||
const MODEL_ERROR = 'error';
|
||||
const MODEL_METRIC = 'metric';
|
||||
const MODEL_METRIC_LIST = 'metricList';
|
||||
const MODEL_ERROR_DEV = 'errorDev';
|
||||
const MODEL_BASE_LIST = 'baseList';
|
||||
const MODEL_USAGE_DATABASE = 'usageDatabase';
|
||||
const MODEL_USAGE_COLLECTION = 'usageCollection';
|
||||
const MODEL_USAGE_USERS = 'usageUsers';
|
||||
const MODEL_USAGE_BUCKETS = 'usageBuckets';
|
||||
const MODEL_USAGE_STORAGE = 'usageStorage';
|
||||
const MODEL_USAGE_FUNCTIONS = 'usageFunctions';
|
||||
const MODEL_USAGE_PROJECT = 'usageProject';
|
||||
public const MODEL_NONE = 'none';
|
||||
public const MODEL_ANY = 'any';
|
||||
public const MODEL_LOG = 'log';
|
||||
public const MODEL_LOG_LIST = 'logList';
|
||||
public const MODEL_ERROR = 'error';
|
||||
public const MODEL_METRIC = 'metric';
|
||||
public const MODEL_METRIC_LIST = 'metricList';
|
||||
public const MODEL_ERROR_DEV = 'errorDev';
|
||||
public const MODEL_BASE_LIST = 'baseList';
|
||||
public const MODEL_USAGE_DATABASE = 'usageDatabase';
|
||||
public const MODEL_USAGE_COLLECTION = 'usageCollection';
|
||||
public const MODEL_USAGE_USERS = 'usageUsers';
|
||||
public const MODEL_USAGE_BUCKETS = 'usageBuckets';
|
||||
public const MODEL_USAGE_STORAGE = 'usageStorage';
|
||||
public const MODEL_USAGE_FUNCTIONS = 'usageFunctions';
|
||||
public const MODEL_USAGE_PROJECT = 'usageProject';
|
||||
|
||||
// Database
|
||||
const MODEL_COLLECTION = 'collection';
|
||||
const MODEL_COLLECTION_LIST = 'collectionList';
|
||||
const MODEL_INDEX = 'index';
|
||||
const MODEL_INDEX_LIST = 'indexList';
|
||||
const MODEL_DOCUMENT = 'document';
|
||||
const MODEL_DOCUMENT_LIST = 'documentList';
|
||||
public const MODEL_COLLECTION = 'collection';
|
||||
public const MODEL_COLLECTION_LIST = 'collectionList';
|
||||
public const MODEL_INDEX = 'index';
|
||||
public const MODEL_INDEX_LIST = 'indexList';
|
||||
public const MODEL_DOCUMENT = 'document';
|
||||
public const MODEL_DOCUMENT_LIST = 'documentList';
|
||||
|
||||
// Database Attributes
|
||||
const MODEL_ATTRIBUTE = 'attribute';
|
||||
const MODEL_ATTRIBUTE_LIST = 'attributeList';
|
||||
const MODEL_ATTRIBUTE_STRING = 'attributeString';
|
||||
const MODEL_ATTRIBUTE_INTEGER = 'attributeInteger';
|
||||
const MODEL_ATTRIBUTE_FLOAT = 'attributeFloat';
|
||||
const MODEL_ATTRIBUTE_BOOLEAN = 'attributeBoolean';
|
||||
const MODEL_ATTRIBUTE_EMAIL = 'attributeEmail';
|
||||
const MODEL_ATTRIBUTE_ENUM = 'attributeEnum';
|
||||
const MODEL_ATTRIBUTE_IP = 'attributeIp';
|
||||
const MODEL_ATTRIBUTE_URL = 'attributeUrl';
|
||||
public const MODEL_ATTRIBUTE = 'attribute';
|
||||
public const MODEL_ATTRIBUTE_LIST = 'attributeList';
|
||||
public const MODEL_ATTRIBUTE_STRING = 'attributeString';
|
||||
public const MODEL_ATTRIBUTE_INTEGER = 'attributeInteger';
|
||||
public const MODEL_ATTRIBUTE_FLOAT = 'attributeFloat';
|
||||
public const MODEL_ATTRIBUTE_BOOLEAN = 'attributeBoolean';
|
||||
public const MODEL_ATTRIBUTE_EMAIL = 'attributeEmail';
|
||||
public const MODEL_ATTRIBUTE_ENUM = 'attributeEnum';
|
||||
public const MODEL_ATTRIBUTE_IP = 'attributeIp';
|
||||
public const MODEL_ATTRIBUTE_URL = 'attributeUrl';
|
||||
|
||||
// Users
|
||||
const MODEL_USER = 'user';
|
||||
const MODEL_USER_LIST = 'userList';
|
||||
const MODEL_SESSION = 'session';
|
||||
const MODEL_SESSION_LIST = 'sessionList';
|
||||
const MODEL_TOKEN = 'token';
|
||||
const MODEL_JWT = 'jwt';
|
||||
const MODEL_PREFERENCES = 'preferences';
|
||||
public const MODEL_USER = 'user';
|
||||
public const MODEL_USER_LIST = 'userList';
|
||||
public const MODEL_SESSION = 'session';
|
||||
public const MODEL_SESSION_LIST = 'sessionList';
|
||||
public const MODEL_TOKEN = 'token';
|
||||
public const MODEL_JWT = 'jwt';
|
||||
public const MODEL_PREFERENCES = 'preferences';
|
||||
|
||||
// Storage
|
||||
const MODEL_FILE = 'file';
|
||||
const MODEL_FILE_LIST = 'fileList';
|
||||
const MODEL_BUCKET = 'bucket';
|
||||
const MODEL_BUCKET_LIST = 'bucketList';
|
||||
public const MODEL_FILE = 'file';
|
||||
public const MODEL_FILE_LIST = 'fileList';
|
||||
public const MODEL_BUCKET = 'bucket';
|
||||
public const MODEL_BUCKET_LIST = 'bucketList';
|
||||
|
||||
// Locale
|
||||
const MODEL_LOCALE = 'locale';
|
||||
const MODEL_COUNTRY = 'country';
|
||||
const MODEL_COUNTRY_LIST = 'countryList';
|
||||
const MODEL_CONTINENT = 'continent';
|
||||
const MODEL_CONTINENT_LIST = 'continentList';
|
||||
const MODEL_CURRENCY = 'currency';
|
||||
const MODEL_CURRENCY_LIST = 'currencyList';
|
||||
const MODEL_LANGUAGE = 'language';
|
||||
const MODEL_LANGUAGE_LIST = 'languageList';
|
||||
const MODEL_PHONE = 'phone';
|
||||
const MODEL_PHONE_LIST = 'phoneList';
|
||||
public const MODEL_LOCALE = 'locale';
|
||||
public const MODEL_COUNTRY = 'country';
|
||||
public const MODEL_COUNTRY_LIST = 'countryList';
|
||||
public const MODEL_CONTINENT = 'continent';
|
||||
public const MODEL_CONTINENT_LIST = 'continentList';
|
||||
public const MODEL_CURRENCY = 'currency';
|
||||
public const MODEL_CURRENCY_LIST = 'currencyList';
|
||||
public const MODEL_LANGUAGE = 'language';
|
||||
public const MODEL_LANGUAGE_LIST = 'languageList';
|
||||
public const MODEL_PHONE = 'phone';
|
||||
public const MODEL_PHONE_LIST = 'phoneList';
|
||||
|
||||
// Teams
|
||||
const MODEL_TEAM = 'team';
|
||||
const MODEL_TEAM_LIST = 'teamList';
|
||||
const MODEL_MEMBERSHIP = 'membership';
|
||||
const MODEL_MEMBERSHIP_LIST = 'membershipList';
|
||||
public const MODEL_TEAM = 'team';
|
||||
public const MODEL_TEAM_LIST = 'teamList';
|
||||
public const MODEL_MEMBERSHIP = 'membership';
|
||||
public const MODEL_MEMBERSHIP_LIST = 'membershipList';
|
||||
|
||||
// Functions
|
||||
const MODEL_FUNCTION = 'function';
|
||||
const MODEL_FUNCTION_LIST = 'functionList';
|
||||
const MODEL_RUNTIME = 'runtime';
|
||||
const MODEL_RUNTIME_LIST = 'runtimeList';
|
||||
const MODEL_DEPLOYMENT = 'deployment';
|
||||
const MODEL_DEPLOYMENT_LIST = 'deploymentList';
|
||||
const MODEL_EXECUTION = 'execution';
|
||||
const MODEL_EXECUTION_LIST = 'executionList';
|
||||
const MODEL_BUILD = 'build';
|
||||
const MODEL_BUILD_LIST = 'buildList'; // Not used anywhere yet
|
||||
const MODEL_FUNC_PERMISSIONS = 'funcPermissions';
|
||||
public const MODEL_FUNCTION = 'function';
|
||||
public const MODEL_FUNCTION_LIST = 'functionList';
|
||||
public const MODEL_RUNTIME = 'runtime';
|
||||
public const MODEL_RUNTIME_LIST = 'runtimeList';
|
||||
public const MODEL_DEPLOYMENT = 'deployment';
|
||||
public const MODEL_DEPLOYMENT_LIST = 'deploymentList';
|
||||
public const MODEL_EXECUTION = 'execution';
|
||||
public const MODEL_EXECUTION_LIST = 'executionList';
|
||||
public const MODEL_BUILD = 'build';
|
||||
public const MODEL_BUILD_LIST = 'buildList'; // Not used anywhere yet
|
||||
public const MODEL_FUNC_PERMISSIONS = 'funcPermissions';
|
||||
|
||||
// Project
|
||||
const MODEL_PROJECT = 'project';
|
||||
const MODEL_PROJECT_LIST = 'projectList';
|
||||
const MODEL_WEBHOOK = 'webhook';
|
||||
const MODEL_WEBHOOK_LIST = 'webhookList';
|
||||
const MODEL_KEY = 'key';
|
||||
const MODEL_KEY_LIST = 'keyList';
|
||||
const MODEL_PLATFORM = 'platform';
|
||||
const MODEL_PLATFORM_LIST = 'platformList';
|
||||
const MODEL_DOMAIN = 'domain';
|
||||
const MODEL_DOMAIN_LIST = 'domainList';
|
||||
public const MODEL_PROJECT = 'project';
|
||||
public const MODEL_PROJECT_LIST = 'projectList';
|
||||
public const MODEL_WEBHOOK = 'webhook';
|
||||
public const MODEL_WEBHOOK_LIST = 'webhookList';
|
||||
public const MODEL_KEY = 'key';
|
||||
public const MODEL_KEY_LIST = 'keyList';
|
||||
public const MODEL_PLATFORM = 'platform';
|
||||
public const MODEL_PLATFORM_LIST = 'platformList';
|
||||
public const MODEL_DOMAIN = 'domain';
|
||||
public const MODEL_DOMAIN_LIST = 'domainList';
|
||||
|
||||
// Health
|
||||
const MODEL_HEALTH_STATUS = 'healthStatus';
|
||||
const MODEL_HEALTH_VERSION = 'healthVersion';
|
||||
const MODEL_HEALTH_QUEUE = 'healthQueue';
|
||||
const MODEL_HEALTH_TIME = 'healthTime';
|
||||
const MODEL_HEALTH_ANTIVIRUS = 'healthAntivirus';
|
||||
public const MODEL_HEALTH_STATUS = 'healthStatus';
|
||||
public const MODEL_HEALTH_VERSION = 'healthVersion';
|
||||
public const MODEL_HEALTH_QUEUE = 'healthQueue';
|
||||
public const MODEL_HEALTH_TIME = 'healthTime';
|
||||
public const MODEL_HEALTH_ANTIVIRUS = 'healthAntivirus';
|
||||
|
||||
// Deprecated
|
||||
const MODEL_PERMISSIONS = 'permissions';
|
||||
const MODEL_RULE = 'rule';
|
||||
const MODEL_TASK = 'task';
|
||||
public const MODEL_PERMISSIONS = 'permissions';
|
||||
public const MODEL_RULE = 'rule';
|
||||
public const MODEL_TASK = 'task';
|
||||
|
||||
// Tests (keep last)
|
||||
const MODEL_MOCK = 'mock';
|
||||
public const MODEL_MOCK = 'mock';
|
||||
|
||||
/**
|
||||
* @var Filter
|
||||
|
@ -302,7 +302,7 @@ class Response extends SwooleResponse
|
|||
/**
|
||||
* HTTP content types
|
||||
*/
|
||||
const CONTENT_TYPE_YAML = 'application/x-yaml';
|
||||
public const CONTENT_TYPE_YAML = 'application/x-yaml';
|
||||
|
||||
/**
|
||||
* List of defined output objects
|
||||
|
|
|
@ -6,11 +6,11 @@ use Utopia\Database\Document;
|
|||
|
||||
abstract class Model
|
||||
{
|
||||
const TYPE_STRING = 'string';
|
||||
const TYPE_INTEGER = 'integer';
|
||||
const TYPE_FLOAT = 'double';
|
||||
const TYPE_BOOLEAN = 'boolean';
|
||||
const TYPE_JSON = 'json';
|
||||
public const TYPE_STRING = 'string';
|
||||
public const TYPE_INTEGER = 'integer';
|
||||
public const TYPE_FLOAT = 'double';
|
||||
public const TYPE_BOOLEAN = 'boolean';
|
||||
public const TYPE_JSON = 'json';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
|
|
|
@ -8,15 +8,15 @@ use Utopia\CLI\Console;
|
|||
|
||||
class Executor
|
||||
{
|
||||
const METHOD_GET = 'GET';
|
||||
const METHOD_POST = 'POST';
|
||||
const METHOD_PUT = 'PUT';
|
||||
const METHOD_PATCH = 'PATCH';
|
||||
const METHOD_DELETE = 'DELETE';
|
||||
const METHOD_HEAD = 'HEAD';
|
||||
const METHOD_OPTIONS = 'OPTIONS';
|
||||
const METHOD_CONNECT = 'CONNECT';
|
||||
const METHOD_TRACE = 'TRACE';
|
||||
public const METHOD_GET = 'GET';
|
||||
public const METHOD_POST = 'POST';
|
||||
public const METHOD_PUT = 'PUT';
|
||||
public const METHOD_PATCH = 'PATCH';
|
||||
public const METHOD_DELETE = 'DELETE';
|
||||
public const METHOD_HEAD = 'HEAD';
|
||||
public const METHOD_OPTIONS = 'OPTIONS';
|
||||
public const METHOD_CONNECT = 'CONNECT';
|
||||
public const METHOD_TRACE = 'TRACE';
|
||||
|
||||
private $endpoint;
|
||||
|
||||
|
|
Loading…
Reference in a new issue