diff --git a/Dockerfile b/Dockerfile index 99ec62ba52..19013ab0a0 100755 --- a/Dockerfile +++ b/Dockerfile @@ -76,41 +76,42 @@ RUN chmod +x /usr/local/bin/dev-generate-translations # Executables RUN chmod +x /usr/local/bin/doctor && \ - chmod +x /usr/local/bin/maintenance && \ - chmod +x /usr/local/bin/usage && \ chmod +x /usr/local/bin/install && \ - chmod +x /usr/local/bin/upgrade && \ + chmod +x /usr/local/bin/maintenance && \ chmod +x /usr/local/bin/migrate && \ chmod +x /usr/local/bin/realtime && \ - chmod +x /usr/local/bin/schedule && \ + chmod +x /usr/local/bin/schedule-functions && \ + chmod +x /usr/local/bin/schedule-messages && \ chmod +x /usr/local/bin/sdks && \ chmod +x /usr/local/bin/specs && \ chmod +x /usr/local/bin/ssl && \ chmod +x /usr/local/bin/test && \ + chmod +x /usr/local/bin/upgrade && \ + chmod +x /usr/local/bin/usage && \ chmod +x /usr/local/bin/vars && \ chmod +x /usr/local/bin/worker-audits && \ + chmod +x /usr/local/bin/worker-builds && \ chmod +x /usr/local/bin/worker-certificates && \ chmod +x /usr/local/bin/worker-databases && \ chmod +x /usr/local/bin/worker-deletes && \ chmod +x /usr/local/bin/worker-functions && \ - chmod +x /usr/local/bin/worker-builds && \ + chmod +x /usr/local/bin/worker-hamster && \ chmod +x /usr/local/bin/worker-mails && \ chmod +x /usr/local/bin/worker-messaging && \ - chmod +x /usr/local/bin/worker-webhooks && \ chmod +x /usr/local/bin/worker-migrations && \ - chmod +x /usr/local/bin/worker-hamster + chmod +x /usr/local/bin/worker-webhooks # Cloud Executabless -RUN chmod +x /usr/local/bin/hamster && \ - chmod +x /usr/local/bin/volume-sync && \ +RUN chmod +x /usr/local/bin/calc-tier-stats && \ + chmod +x /usr/local/bin/calc-users-stats && \ + chmod +x /usr/local/bin/clear-card-cache && \ + chmod +x /usr/local/bin/delete-orphaned-projects && \ + chmod +x /usr/local/bin/get-migration-stats && \ + chmod +x /usr/local/bin/hamster && \ + chmod +x /usr/local/bin/patch-delete-project-collections && \ chmod +x /usr/local/bin/patch-delete-schedule-updated-at-attribute && \ chmod +x /usr/local/bin/patch-recreate-repositories-documents && \ - chmod +x /usr/local/bin/patch-delete-project-collections && \ - chmod +x /usr/local/bin/delete-orphaned-projects && \ - chmod +x /usr/local/bin/clear-card-cache && \ - chmod +x /usr/local/bin/calc-users-stats && \ - chmod +x /usr/local/bin/calc-tier-stats && \ - chmod +x /usr/local/bin/get-migration-stats + chmod +x /usr/local/bin/volume-sync # Letsencrypt Permissions RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/ diff --git a/app/config/collections.php b/app/config/collections.php index 07d99fd1bc..932d1267c3 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -1644,7 +1644,7 @@ $commonCollections = [ [ '$id' => ID::custom('_key_enabled_type'), 'type' => Database::INDEX_KEY, - 'attributes' => ['enabled','type'], + 'attributes' => ['enabled', 'type'], 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], @@ -1751,6 +1751,28 @@ $commonCollections = [ 'array' => false, 'filters' => ['datetime'], ], + [ + '$id' => ID::custom('scheduleInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('scheduleId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => ID::custom('deliveredAt'), 'type' => Database::VAR_DATETIME, @@ -1968,6 +1990,17 @@ $commonCollections = [ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('search'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], ], 'indexes' => [ [ @@ -2011,7 +2044,14 @@ $commonCollections = [ 'attributes' => ['topicInternalId'], 'lengths' => [], 'orders' => [], - ] + ], + [ + '$id' => ID::custom('_fulltext_search'), + 'type' => Database::INDEX_FULLTEXT, + 'attributes' => ['search'], + 'lengths' => [], + 'orders' => [], + ], ], ], @@ -4289,6 +4329,17 @@ $consoleCollections = array_merge([ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('resourceCollection'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => ID::custom('resourceInternalId'), 'type' => Database::VAR_STRING, @@ -4695,6 +4746,39 @@ $consoleCollections = array_merge([ 'array' => false, 'filters' => [], ], + [ + '$id' => ID::custom('enabled'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => false, + 'default' => true, + 'array' => false, + ], + [ + '$id' => ID::custom('logs'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 1000000, + 'signed' => true, + 'required' => false, + 'default' => '', + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('attempts'), + 'type' => Database::VAR_INTEGER, + 'format' => '', + 'size' => 0, + 'signed' => true, + 'required' => false, + 'default' => 0, + 'array' => false, + 'filters' => [], + ], ], 'indexes' => [ [ diff --git a/app/config/errors.php b/app/config/errors.php index 49281e1f73..d35dc9c622 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -4,6 +4,7 @@ * List of server wide error codes and their respective messages. */ +use Appwrite\Enum\MessageStatus; use Appwrite\Extend\Exception; return [ @@ -812,7 +813,7 @@ return [ ], Exception::PROVIDER_INCORRECT_TYPE => [ 'name' => Exception::PROVIDER_INCORRECT_TYPE, - 'description' => 'Provider with the requested ID is of incorrect type: ', + 'description' => 'Provider with the requested ID is of the incorrect type.', 'code' => 400, ], @@ -863,18 +864,27 @@ return [ ], Exception::MESSAGE_TARGET_NOT_EMAIL => [ 'name' => Exception::MESSAGE_TARGET_NOT_EMAIL, - 'description' => 'Message with the target ID is not an email target:', + 'description' => 'Message with the target ID is not an email target.', 'code' => 400, ], Exception::MESSAGE_TARGET_NOT_SMS => [ 'name' => Exception::MESSAGE_TARGET_NOT_SMS, - 'description' => 'Message with the target ID is not an SMS target:', + 'description' => 'Message with the target ID is not an SMS target.', 'code' => 400, ], Exception::MESSAGE_TARGET_NOT_PUSH => [ 'name' => Exception::MESSAGE_TARGET_NOT_PUSH, - 'description' => 'Message with the target ID is not a push target:', + 'description' => 'Message with the target ID is not a push target.', 'code' => 400, ], - + Exception::MESSAGE_MISSING_SCHEDULE => [ + 'name' => Exception::MESSAGE_MISSING_SCHEDULE, + 'description' => 'Message can not have status ' . MessageStatus::SCHEDULED . ' without a schedule.', + 'code' => 400, + ], + Exception::SCHEDULE_NOT_FOUND => [ + 'name' => Exception::SCHEDULE_NOT_FOUND, + 'description' => 'Schedule with the requested ID could not be found.', + 'code' => 404, + ], ]; diff --git a/app/config/locale/templates/email-base-styled.tpl b/app/config/locale/templates/email-base-styled.tpl index 483809cbf9..8e8bc7f6cd 100644 --- a/app/config/locale/templates/email-base-styled.tpl +++ b/app/config/locale/templates/email-base-styled.tpl @@ -6,6 +6,11 @@ rel="stylesheet" />