diff --git a/app/init/constants.php b/app/init/constants.php index 2c94041276..5c75dc4ce2 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -262,7 +262,6 @@ const METRIC_SITES_ID_INBOUND = 'sites.{siteInternalId}.inbound'; const METRIC_SITES_ID_OUTBOUND = 'sites.{siteInternalId}.outbound'; // Resource types - const RESOURCE_TYPE_PROJECTS = 'projects'; const RESOURCE_TYPE_FUNCTIONS = 'functions'; const RESOURCE_TYPE_SITES = 'sites'; @@ -274,18 +273,12 @@ const RESOURCE_TYPE_SUBSCRIBERS = 'subscribers'; const RESOURCE_TYPE_MESSAGES = 'messages'; // Resource types for Tokens - const TOKENS_RESOURCE_TYPE_FILES = 'files'; const TOKENS_RESOURCE_TYPE_SITES = 'sites'; const TOKENS_RESOURCE_TYPE_FUNCTIONS = 'functions'; const TOKENS_RESOURCE_TYPE_DATABASES = 'databases'; -// schedules types -const SCHEDULE_TYPE_EXECUTION = 'execution'; -const SCHEDULE_TYPE_FUNCTION = 'function'; -const SCHEDULE_TYPE_MESSAGE = 'message'; - -// collections types -const COLLECTION_TYPE_EXECUTIONS = 'executions'; -const COLLECTION_TYPE_FUNCTIONS = 'functions'; -const COLLECTION_TYPE_MESSAGES = 'messages'; +// Resource types for Schedules +const SCHEDULE_RESOURCE_TYPE_EXECUTION = 'execution'; +const SCHEDULE_RESOURCE_TYPE_FUNCTION = 'function'; +const SCHEDULE_RESOURCE_TYPE_MESSAGE = 'message'; diff --git a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php index 77cc056280..83a3f51b03 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleExecutions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleExecutions.php @@ -24,12 +24,12 @@ class ScheduleExecutions extends ScheduleBase public static function getSupportedResource(): string { - return SCHEDULE_TYPE_EXECUTION; + return SCHEDULE_RESOURCE_TYPE_EXECUTION; } public static function getCollectionId(): string { - return COLLECTION_TYPE_EXECUTIONS; + return RESOURCE_TYPE_EXECUTIONS; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void diff --git a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php index 09c7296f93..7fda2f75df 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleFunctions.php +++ b/src/Appwrite/Platform/Tasks/ScheduleFunctions.php @@ -28,12 +28,12 @@ class ScheduleFunctions extends ScheduleBase public static function getSupportedResource(): string { - return SCHEDULE_TYPE_FUNCTION; + return SCHEDULE_RESOURCE_TYPE_FUNCTION; } public static function getCollectionId(): string { - return COLLECTION_TYPE_FUNCTIONS; + return RESOURCE_TYPE_FUNCTIONS; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void diff --git a/src/Appwrite/Platform/Tasks/ScheduleMessages.php b/src/Appwrite/Platform/Tasks/ScheduleMessages.php index 87e5ba5730..57f6dd8002 100644 --- a/src/Appwrite/Platform/Tasks/ScheduleMessages.php +++ b/src/Appwrite/Platform/Tasks/ScheduleMessages.php @@ -17,12 +17,12 @@ class ScheduleMessages extends ScheduleBase public static function getSupportedResource(): string { - return SCHEDULE_TYPE_MESSAGE; + return SCHEDULE_RESOURCE_TYPE_MESSAGE; } public static function getCollectionId(): string { - return COLLECTION_TYPE_MESSAGES; + return RESOURCE_TYPE_MESSAGES; } protected function enqueueResources(Database $dbForPlatform, callable $getProjectDB): void