chore: revert 1.6.x to 1.6.2

This commit is contained in:
Steven Nguyen
2025-10-02 21:48:38 +00:00
committed by GitHub
parent 1a0e82b4e4
commit faf2a3a425
150 changed files with 153515 additions and 10120 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ _APP_EXECUTOR_SECRET=your-secret-key
_APP_EXECUTOR_HOST=http://proxy/v1
_APP_FUNCTIONS_RUNTIMES=php-8.0,node-18.0,python-3.9,ruby-3.1
_APP_MAINTENANCE_INTERVAL=86400
_APP_MAINTENANCE_START_TIME=12:00
_APP_MAINTENANCE_DELAY=
_APP_MAINTENANCE_RETENTION_CACHE=2592000
_APP_MAINTENANCE_RETENTION_EXECUTION=1209600
_APP_MAINTENANCE_RETENTION_ABUSE=86400
+29 -26
View File
@@ -10,15 +10,11 @@ use Appwrite\Event\StatsUsage;
use Appwrite\Platform\Appwrite;
use Appwrite\Runtimes\Runtimes;
use Executor\Executor;
use Swoole\Runtime;
use Swoole\Timer;
use Utopia\Cache\Adapter\Pool as CachePool;
use Utopia\Cache\Adapter\Sharding;
use Utopia\Cache\Cache;
use Utopia\CLI\CLI;
use Utopia\CLI\Console;
use Utopia\Config\Config;
use Utopia\Database\Adapter\Pool as DatabasePool;
use Utopia\Database\Database;
use Utopia\Database\Document;
use Utopia\Database\Validator\Authorization;
@@ -26,13 +22,9 @@ use Utopia\DSN\DSN;
use Utopia\Logger\Log;
use Utopia\Platform\Service;
use Utopia\Pools\Group;
use Utopia\Queue\Broker\Pool as BrokerPool;
use Utopia\Queue\Publisher;
use Utopia\Registry\Registry;
use Utopia\System\System;
use Utopia\Telemetry\Adapter\None as NoTelemetry;
use function Swoole\Coroutine\run;
// Overwriting runtimes to be architecture agnostic for CLI
Config::setParam('runtimes', (new Runtimes('v4'))->getAll(supported: false));
@@ -49,7 +41,10 @@ CLI::setResource('cache', function ($pools) {
$adapters = [];
foreach ($list as $value) {
$adapters[] = new CachePool($pools->get($value));
$adapters[] = $pools
->get($value)
->pop()
->getResource();
}
return new Cache(new Sharding($adapters));
@@ -69,8 +64,12 @@ CLI::setResource('dbForPlatform', function ($pools, $cache) {
$attempts++;
try {
// Prepare database connection
$adapter = new DatabasePool($pools->get('console'));
$dbForPlatform = new Database($adapter, $cache);
$dbAdapter = $pools
->get('console')
->pop()
->getResource();
$dbForPlatform = new Database($dbAdapter, $cache);
$dbForPlatform
->setNamespace('_console')
@@ -88,6 +87,7 @@ CLI::setResource('dbForPlatform', function ($pools, $cache) {
$ready = true;
} catch (\Throwable $err) {
Console::warning($err->getMessage());
$pools->get('console')->reclaim();
sleep($sleep);
}
} while ($attempts < $maxAttempts && !$ready);
@@ -137,8 +137,12 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform
return $database;
}
$adapter = new DatabasePool($pools->get($dsn->getHost()));
$database = new Database($adapter, $cache);
$dbAdapter = $pools
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($dbAdapter, $cache);
$databases[$dsn->getHost()] = $database;
$sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', ''));
@@ -164,15 +168,21 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform
CLI::setResource('getLogsDB', function (Group $pools, Cache $cache) {
$database = null;
return function (?Document $project = null) use ($pools, $cache, $database) {
if ($database !== null && $project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
$database->setTenant($project->getInternalId());
return $database;
}
$adapter = new DatabasePool($pools->get('logs'));
$database = new Database($adapter, $cache);
$dbAdapter = $pools
->get('logs')
->pop()
->getResource();
$database = new Database(
$dbAdapter,
$cache
);
$database
->setSharedTables(true)
@@ -189,14 +199,14 @@ CLI::setResource('getLogsDB', function (Group $pools, Cache $cache) {
};
}, ['pools', 'cache']);
CLI::setResource('queueForStatsUsage', function (Publisher $publisher) {
CLI::setResource('queueForStatsUsage', function (Connection $publisher) {
return new StatsUsage($publisher);
}, ['publisher']);
CLI::setResource('queueForStatsResources', function (Publisher $publisher) {
return new StatsResources($publisher);
}, ['publisher']);
CLI::setResource('publisher', function (Group $pools) {
return new BrokerPool(publisher: $pools->get('publisher'));
return $pools->get('publisher')->pop()->getResource();
}, ['pools']);
CLI::setResource('queueForFunctions', function (Publisher $publisher) {
return new Func($publisher);
@@ -253,8 +263,6 @@ CLI::setResource('logError', function (Registry $register) {
CLI::setResource('executor', fn () => new Executor(fn (string $projectId, string $deploymentId) => System::getEnv('_APP_EXECUTOR_HOST')));
CLI::setResource('telemetry', fn () => new NoTelemetry());
$platform = new Appwrite();
$args = $platform->getEnv('argv');
@@ -278,11 +286,6 @@ $cli
'Task',
$taskName,
]);
Timer::clearAll();
});
$cli->shutdown()->action(fn () => Timer::clearAll());
Runtime::enableCoroutine(SWOOLE_HOOK_ALL);
run($cli->run(...));
$cli->run();
-14
View File
@@ -2352,20 +2352,6 @@ return [
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_expired'),
'type' => Database::INDEX_KEY,
'attributes' => ['expired'],
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_session_internal_id'),
'type' => Database::INDEX_KEY,
'attributes' => ['sessionInternalId'],
'lengths' => [],
'orders' => [],
],
],
],
+2 -51
View File
@@ -356,21 +356,7 @@ return [
'attributes' => ['pingedAt'],
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_database'),
'type' => Database::INDEX_KEY,
'attributes' => ['database'],
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_region_accessed_at'),
'type' => Database::INDEX_KEY,
'attributes' => ['region', 'accessedAt'],
'lengths' => [],
'orders' => [],
],
]
],
],
@@ -494,20 +480,6 @@ return [
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_project_id_region'),
'type' => Database::INDEX_KEY,
'attributes' => ['projectId', 'region'],
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_region_rt_active'),
'type' => Database::INDEX_KEY,
'attributes' => ['region', 'resourceType', 'active'],
'lengths' => [],
'orders' => [],
],
],
],
@@ -1175,13 +1147,6 @@ return [
'lengths' => [16],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_piid_riid_rt'),
'type' => Database::INDEX_KEY,
'attributes' => ['projectInternalId', 'resourceInternalId', 'resourceType'],
'lengths' => [],
'orders' => [],
],
],
],
@@ -1477,14 +1442,7 @@ return [
'attributes' => ['resourceType'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_piid_riid_rt'),
'type' => Database::INDEX_KEY,
'attributes' => ['projectInternalId', 'resourceInternalId', 'resourceType'],
'lengths' => [],
'orders' => [],
],
]
],
],
@@ -1632,13 +1590,6 @@ return [
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_piid_prid_rt'),
'type' => Database::INDEX_KEY,
'attributes' => ['projectInternalId', 'providerRepositoryId'],
'lengths' => [],
'orders' => [],
],
],
],
+1 -29
View File
@@ -1182,13 +1182,6 @@ return [
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_resource_internal_id'),
'type' => Database::INDEX_KEY,
'attributes' => ['resourceInternalId'],
'lengths' => [],
'orders' => [],
],
],
],
@@ -1337,14 +1330,7 @@ return [
'attributes' => ['deploymentId'],
'lengths' => [Database::LENGTH_KEY],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_deployment_internal_id'),
'type' => Database::INDEX_KEY,
'attributes' => ['deploymentInternalId'],
'lengths' => [],
'orders' => [],
],
]
],
],
@@ -1616,13 +1602,6 @@ return [
'lengths' => [],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_function_internal_id'),
'type' => Database::INDEX_KEY,
'attributes' => ['functionInternalId'],
'lengths' => [],
'orders' => [],
],
],
],
@@ -1741,13 +1720,6 @@ return [
'lengths' => [],
'orders' => [],
],
[
'$id' => ID::custom('_key_resource_internal_id_resource_type'),
'type' => Database::INDEX_KEY,
'attributes' => ['resourceInternalId', 'resourceType'],
'lengths' => [],
'orders' => [],
],
],
],
+1 -1
View File
@@ -81,7 +81,7 @@ return [
],
Exception::GENERAL_ROUTE_NOT_FOUND => [
'name' => Exception::GENERAL_ROUTE_NOT_FOUND,
'description' => 'Route not found. Please ensure the endpoint is configured correctly and that the API route is valid for this SDK version. Refer to the API docs for more details.',
'description' => 'The requested route was not found. Please refer to the API docs and try again.',
'code' => 404,
],
Exception::GENERAL_CURSOR_NOT_FOUND => [
+11 -11
View File
@@ -134,7 +134,7 @@ return [
[
'key' => 'react-native',
'name' => 'React Native',
'version' => '0.7.4',
'version' => '0.7.3',
'url' => 'https://github.com/appwrite/sdk-for-react-native',
'package' => 'https://npmjs.com/package/react-native-appwrite',
'enabled' => true,
@@ -245,7 +245,7 @@ return [
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '16.1.0-rc.1',
'version' => '16.0.0',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
@@ -263,7 +263,7 @@ return [
[
'key' => 'deno',
'name' => 'Deno',
'version' => '14.1.0-rc.1',
'version' => '14.0.0',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
@@ -281,7 +281,7 @@ return [
[
'key' => 'php',
'name' => 'PHP',
'version' => '14.1.0-rc.1',
'version' => '14.0.0',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
@@ -299,7 +299,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '10.1.0-rc.1',
'version' => '10.0.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
@@ -317,7 +317,7 @@ return [
[
'key' => 'ruby',
'name' => 'Ruby',
'version' => '15.1.0-rc.1',
'version' => '15.0.0',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
@@ -335,7 +335,7 @@ return [
[
'key' => 'go',
'name' => 'Go',
'version' => '0.6.0-rc.1',
'version' => '0.5.0',
'url' => 'https://github.com/appwrite/sdk-for-go',
'package' => 'https://github.com/appwrite/sdk-for-go',
'enabled' => true,
@@ -353,7 +353,7 @@ return [
[
'key' => 'dotnet',
'name' => '.NET',
'version' => '0.13.0-rc.1',
'version' => '0.12.0',
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
'package' => 'https://www.nuget.org/packages/Appwrite',
'enabled' => true,
@@ -371,7 +371,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '15.1.0-rc.1',
'version' => '15.0.0',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
@@ -389,7 +389,7 @@ return [
[
'key' => 'kotlin',
'name' => 'Kotlin',
'version' => '8.1.0-rc.1',
'version' => '8.0.0',
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
'enabled' => true,
@@ -411,7 +411,7 @@ return [
[
'key' => 'swift',
'name' => 'Swift',
'version' => '9.1.0-rc.1',
'version' => '9.0.0',
'url' => 'https://github.com/appwrite/sdk-for-swift',
'package' => 'https://github.com/appwrite/sdk-for-swift',
'enabled' => true,
+3
View File
@@ -65,6 +65,9 @@ return [
'tests' => false,
'optional' => true,
'icon' => '/images/services/databases.png',
'globalAttributes' => [
'databaseId'
]
],
'locale' => [
'key' => 'locale',
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+78 -92
View File
@@ -2646,10 +2646,7 @@
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md",
"rate-limit": 10,
"rate-time": 3600,
"rate-key": [
"url:{url},email:{param-email}",
"url:{url},ip:{ip}"
],
"rate-key": "url:{url},email:{param-email}",
"scope": "sessions.write",
"platforms": [
"server",
@@ -4430,7 +4427,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@@ -4462,31 +4459,6 @@
"server"
],
"packaging": false,
"methods": [
{
"name": "createDocument",
"parameters": [
"databaseId",
"collectionId",
"documentId",
"data",
"permissions"
],
"required": [
"databaseId",
"collectionId",
"documentId",
"data"
],
"responses": [
{
"code": 201,
"model": "#\/components\/schemas\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
}
],
"auth": {
"Project": []
}
@@ -4543,16 +4515,12 @@
"items": {
"type": "string"
}
},
"documents": {
"type": "array",
"description": "Array of documents data as JSON objects.",
"x-example": null,
"items": {
"type": "object"
}
}
}
},
"required": [
"documentId",
"data"
]
}
}
}
@@ -4776,7 +4744,7 @@
"x-appwrite": {
"method": "deleteDocument",
"group": "documents",
"weight": 115,
"weight": 113,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4860,7 +4828,7 @@
"x-appwrite": {
"method": "listExecutions",
"group": "executions",
"weight": 308,
"weight": 305,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4946,7 +4914,7 @@
"x-appwrite": {
"method": "createExecution",
"group": "executions",
"weight": 307,
"weight": 304,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5061,7 +5029,7 @@
"x-appwrite": {
"method": "getExecution",
"group": "executions",
"weight": 309,
"weight": 306,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5135,7 +5103,7 @@
"x-appwrite": {
"method": "query",
"group": "graphql",
"weight": 333,
"weight": 330,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5187,7 +5155,7 @@
"x-appwrite": {
"method": "mutation",
"group": "graphql",
"weight": 332,
"weight": 329,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5239,7 +5207,7 @@
"x-appwrite": {
"method": "get",
"group": null,
"weight": 120,
"weight": 117,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5291,7 +5259,7 @@
"x-appwrite": {
"method": "listCodes",
"group": null,
"weight": 121,
"weight": 118,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5343,7 +5311,7 @@
"x-appwrite": {
"method": "listContinents",
"group": null,
"weight": 125,
"weight": 122,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5395,7 +5363,7 @@
"x-appwrite": {
"method": "listCountries",
"group": null,
"weight": 122,
"weight": 119,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5447,7 +5415,7 @@
"x-appwrite": {
"method": "listCountriesEU",
"group": null,
"weight": 123,
"weight": 120,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5499,7 +5467,7 @@
"x-appwrite": {
"method": "listCountriesPhones",
"group": null,
"weight": 124,
"weight": 121,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5551,7 +5519,7 @@
"x-appwrite": {
"method": "listCurrencies",
"group": null,
"weight": 126,
"weight": 123,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5603,7 +5571,7 @@
"x-appwrite": {
"method": "listLanguages",
"group": null,
"weight": 127,
"weight": 124,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5655,7 +5623,7 @@
"x-appwrite": {
"method": "createSubscriber",
"group": "subscribers",
"weight": 378,
"weight": 375,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5738,7 +5706,7 @@
"x-appwrite": {
"method": "deleteSubscriber",
"group": "subscribers",
"weight": 382,
"weight": 379,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5813,7 +5781,7 @@
"x-appwrite": {
"method": "listFiles",
"group": "files",
"weight": 210,
"weight": 207,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5899,7 +5867,7 @@
"x-appwrite": {
"method": "createFile",
"group": "files",
"weight": 209,
"weight": 206,
"cookies": false,
"type": "upload",
"deprecated": false,
@@ -5997,7 +5965,7 @@
"x-appwrite": {
"method": "getFile",
"group": "files",
"weight": 211,
"weight": 208,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6069,7 +6037,7 @@
"x-appwrite": {
"method": "updateFile",
"group": "files",
"weight": 216,
"weight": 213,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6158,7 +6126,7 @@
"x-appwrite": {
"method": "deleteFile",
"group": "files",
"weight": 217,
"weight": 214,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6225,7 +6193,7 @@
"x-appwrite": {
"method": "getFileDownload",
"group": "files",
"weight": 213,
"weight": 210,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6292,7 +6260,7 @@
"x-appwrite": {
"method": "getFilePreview",
"group": "files",
"weight": 212,
"weight": 209,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6509,7 +6477,7 @@
"x-appwrite": {
"method": "getFileView",
"group": "files",
"weight": 214,
"weight": 211,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6583,7 +6551,7 @@
"x-appwrite": {
"method": "list",
"group": "teams",
"weight": 221,
"weight": 218,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6659,7 +6627,7 @@
"x-appwrite": {
"method": "create",
"group": "teams",
"weight": 220,
"weight": 217,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6744,7 +6712,7 @@
"x-appwrite": {
"method": "get",
"group": "teams",
"weight": 222,
"weight": 219,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6806,7 +6774,7 @@
"x-appwrite": {
"method": "updateName",
"group": "teams",
"weight": 224,
"weight": 221,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6880,7 +6848,7 @@
"x-appwrite": {
"method": "delete",
"group": "teams",
"weight": 226,
"weight": 223,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6944,7 +6912,7 @@
"x-appwrite": {
"method": "listMemberships",
"group": "memberships",
"weight": 228,
"weight": 225,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7030,7 +6998,7 @@
"x-appwrite": {
"method": "createMembership",
"group": "memberships",
"weight": 227,
"weight": 224,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7141,7 +7109,7 @@
"x-appwrite": {
"method": "getMembership",
"group": "memberships",
"weight": 229,
"weight": 226,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7213,7 +7181,7 @@
"x-appwrite": {
"method": "updateMembership",
"group": "memberships",
"weight": 230,
"weight": 227,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7300,7 +7268,7 @@
"x-appwrite": {
"method": "deleteMembership",
"group": "memberships",
"weight": 232,
"weight": 229,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7374,7 +7342,7 @@
"x-appwrite": {
"method": "updateMembershipStatus",
"group": "memberships",
"weight": 231,
"weight": 228,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7472,7 +7440,7 @@
"x-appwrite": {
"method": "getPrefs",
"group": "teams",
"weight": 223,
"weight": 220,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7533,7 +7501,7 @@
"x-appwrite": {
"method": "updatePrefs",
"group": "teams",
"weight": 225,
"weight": 222,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7596,67 +7564,85 @@
"tags": [
{
"name": "account",
"description": "The Account service allows you to authenticate and manage a user account."
"description": "The Account service allows you to authenticate and manage a user account.",
"x-globalAttributes": []
},
{
"name": "avatars",
"description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."
"description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.",
"x-globalAttributes": []
},
{
"name": "databases",
"description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents"
"description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents",
"x-globalAttributes": [
"databaseId"
]
},
{
"name": "locale",
"description": "The Locale service allows you to customize your app based on your users' location."
"description": "The Locale service allows you to customize your app based on your users' location.",
"x-globalAttributes": []
},
{
"name": "health",
"description": "The Health service allows you to both validate and monitor your Appwrite server's health."
"description": "The Health service allows you to both validate and monitor your Appwrite server's health.",
"x-globalAttributes": []
},
{
"name": "projects",
"description": "The Project service allows you to manage all the projects in your Appwrite server."
"description": "The Project service allows you to manage all the projects in your Appwrite server.",
"x-globalAttributes": []
},
{
"name": "project",
"description": "The Project service allows you to manage all the projects in your Appwrite server."
"description": "The Project service allows you to manage all the projects in your Appwrite server.",
"x-globalAttributes": []
},
{
"name": "storage",
"description": "The Storage service allows you to manage your project files."
"description": "The Storage service allows you to manage your project files.",
"x-globalAttributes": []
},
{
"name": "teams",
"description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"
"description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources",
"x-globalAttributes": []
},
{
"name": "users",
"description": "The Users service allows you to manage your project users."
"description": "The Users service allows you to manage your project users.",
"x-globalAttributes": []
},
{
"name": "functions",
"description": "The Functions Service allows you view, create and manage your Cloud Functions."
"description": "The Functions Service allows you view, create and manage your Cloud Functions.",
"x-globalAttributes": []
},
{
"name": "proxy",
"description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration."
"description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration.",
"x-globalAttributes": []
},
{
"name": "graphql",
"description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL."
"description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.",
"x-globalAttributes": []
},
{
"name": "console",
"description": "The Console service allows you to interact with console relevant informations."
"description": "The Console service allows you to interact with console relevant informations.",
"x-globalAttributes": []
},
{
"name": "migrations",
"description": "The Migrations service allows you to migrate third-party data to your Appwrite project."
"description": "The Migrations service allows you to migrate third-party data to your Appwrite project.",
"x-globalAttributes": []
},
{
"name": "messaging",
"description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)."
"description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.).",
"x-globalAttributes": []
}
],
"components": {
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+78 -92
View File
@@ -2646,10 +2646,7 @@
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md",
"rate-limit": 10,
"rate-time": 3600,
"rate-key": [
"url:{url},email:{param-email}",
"url:{url},ip:{ip}"
],
"rate-key": "url:{url},email:{param-email}",
"scope": "sessions.write",
"platforms": [
"server",
@@ -4430,7 +4427,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@@ -4462,31 +4459,6 @@
"server"
],
"packaging": false,
"methods": [
{
"name": "createDocument",
"parameters": [
"databaseId",
"collectionId",
"documentId",
"data",
"permissions"
],
"required": [
"databaseId",
"collectionId",
"documentId",
"data"
],
"responses": [
{
"code": 201,
"model": "#\/components\/schemas\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
}
],
"auth": {
"Project": []
}
@@ -4543,16 +4515,12 @@
"items": {
"type": "string"
}
},
"documents": {
"type": "array",
"description": "Array of documents data as JSON objects.",
"x-example": null,
"items": {
"type": "object"
}
}
}
},
"required": [
"documentId",
"data"
]
}
}
}
@@ -4776,7 +4744,7 @@
"x-appwrite": {
"method": "deleteDocument",
"group": "documents",
"weight": 115,
"weight": 113,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4860,7 +4828,7 @@
"x-appwrite": {
"method": "listExecutions",
"group": "executions",
"weight": 308,
"weight": 305,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4946,7 +4914,7 @@
"x-appwrite": {
"method": "createExecution",
"group": "executions",
"weight": 307,
"weight": 304,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5061,7 +5029,7 @@
"x-appwrite": {
"method": "getExecution",
"group": "executions",
"weight": 309,
"weight": 306,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5135,7 +5103,7 @@
"x-appwrite": {
"method": "query",
"group": "graphql",
"weight": 333,
"weight": 330,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5187,7 +5155,7 @@
"x-appwrite": {
"method": "mutation",
"group": "graphql",
"weight": 332,
"weight": 329,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5239,7 +5207,7 @@
"x-appwrite": {
"method": "get",
"group": null,
"weight": 120,
"weight": 117,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5291,7 +5259,7 @@
"x-appwrite": {
"method": "listCodes",
"group": null,
"weight": 121,
"weight": 118,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5343,7 +5311,7 @@
"x-appwrite": {
"method": "listContinents",
"group": null,
"weight": 125,
"weight": 122,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5395,7 +5363,7 @@
"x-appwrite": {
"method": "listCountries",
"group": null,
"weight": 122,
"weight": 119,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5447,7 +5415,7 @@
"x-appwrite": {
"method": "listCountriesEU",
"group": null,
"weight": 123,
"weight": 120,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5499,7 +5467,7 @@
"x-appwrite": {
"method": "listCountriesPhones",
"group": null,
"weight": 124,
"weight": 121,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5551,7 +5519,7 @@
"x-appwrite": {
"method": "listCurrencies",
"group": null,
"weight": 126,
"weight": 123,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5603,7 +5571,7 @@
"x-appwrite": {
"method": "listLanguages",
"group": null,
"weight": 127,
"weight": 124,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5655,7 +5623,7 @@
"x-appwrite": {
"method": "createSubscriber",
"group": "subscribers",
"weight": 378,
"weight": 375,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5738,7 +5706,7 @@
"x-appwrite": {
"method": "deleteSubscriber",
"group": "subscribers",
"weight": 382,
"weight": 379,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5813,7 +5781,7 @@
"x-appwrite": {
"method": "listFiles",
"group": "files",
"weight": 210,
"weight": 207,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5899,7 +5867,7 @@
"x-appwrite": {
"method": "createFile",
"group": "files",
"weight": 209,
"weight": 206,
"cookies": false,
"type": "upload",
"deprecated": false,
@@ -5997,7 +5965,7 @@
"x-appwrite": {
"method": "getFile",
"group": "files",
"weight": 211,
"weight": 208,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6069,7 +6037,7 @@
"x-appwrite": {
"method": "updateFile",
"group": "files",
"weight": 216,
"weight": 213,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6158,7 +6126,7 @@
"x-appwrite": {
"method": "deleteFile",
"group": "files",
"weight": 217,
"weight": 214,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6225,7 +6193,7 @@
"x-appwrite": {
"method": "getFileDownload",
"group": "files",
"weight": 213,
"weight": 210,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6292,7 +6260,7 @@
"x-appwrite": {
"method": "getFilePreview",
"group": "files",
"weight": 212,
"weight": 209,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6509,7 +6477,7 @@
"x-appwrite": {
"method": "getFileView",
"group": "files",
"weight": 214,
"weight": 211,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6583,7 +6551,7 @@
"x-appwrite": {
"method": "list",
"group": "teams",
"weight": 221,
"weight": 218,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6659,7 +6627,7 @@
"x-appwrite": {
"method": "create",
"group": "teams",
"weight": 220,
"weight": 217,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6744,7 +6712,7 @@
"x-appwrite": {
"method": "get",
"group": "teams",
"weight": 222,
"weight": 219,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6806,7 +6774,7 @@
"x-appwrite": {
"method": "updateName",
"group": "teams",
"weight": 224,
"weight": 221,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6880,7 +6848,7 @@
"x-appwrite": {
"method": "delete",
"group": "teams",
"weight": 226,
"weight": 223,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6944,7 +6912,7 @@
"x-appwrite": {
"method": "listMemberships",
"group": "memberships",
"weight": 228,
"weight": 225,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7030,7 +6998,7 @@
"x-appwrite": {
"method": "createMembership",
"group": "memberships",
"weight": 227,
"weight": 224,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7141,7 +7109,7 @@
"x-appwrite": {
"method": "getMembership",
"group": "memberships",
"weight": 229,
"weight": 226,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7213,7 +7181,7 @@
"x-appwrite": {
"method": "updateMembership",
"group": "memberships",
"weight": 230,
"weight": 227,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7300,7 +7268,7 @@
"x-appwrite": {
"method": "deleteMembership",
"group": "memberships",
"weight": 232,
"weight": 229,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7374,7 +7342,7 @@
"x-appwrite": {
"method": "updateMembershipStatus",
"group": "memberships",
"weight": 231,
"weight": 228,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7472,7 +7440,7 @@
"x-appwrite": {
"method": "getPrefs",
"group": "teams",
"weight": 223,
"weight": 220,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7533,7 +7501,7 @@
"x-appwrite": {
"method": "updatePrefs",
"group": "teams",
"weight": 225,
"weight": 222,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7596,67 +7564,85 @@
"tags": [
{
"name": "account",
"description": "The Account service allows you to authenticate and manage a user account."
"description": "The Account service allows you to authenticate and manage a user account.",
"x-globalAttributes": []
},
{
"name": "avatars",
"description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."
"description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.",
"x-globalAttributes": []
},
{
"name": "databases",
"description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents"
"description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents",
"x-globalAttributes": [
"databaseId"
]
},
{
"name": "locale",
"description": "The Locale service allows you to customize your app based on your users' location."
"description": "The Locale service allows you to customize your app based on your users' location.",
"x-globalAttributes": []
},
{
"name": "health",
"description": "The Health service allows you to both validate and monitor your Appwrite server's health."
"description": "The Health service allows you to both validate and monitor your Appwrite server's health.",
"x-globalAttributes": []
},
{
"name": "projects",
"description": "The Project service allows you to manage all the projects in your Appwrite server."
"description": "The Project service allows you to manage all the projects in your Appwrite server.",
"x-globalAttributes": []
},
{
"name": "project",
"description": "The Project service allows you to manage all the projects in your Appwrite server."
"description": "The Project service allows you to manage all the projects in your Appwrite server.",
"x-globalAttributes": []
},
{
"name": "storage",
"description": "The Storage service allows you to manage your project files."
"description": "The Storage service allows you to manage your project files.",
"x-globalAttributes": []
},
{
"name": "teams",
"description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"
"description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources",
"x-globalAttributes": []
},
{
"name": "users",
"description": "The Users service allows you to manage your project users."
"description": "The Users service allows you to manage your project users.",
"x-globalAttributes": []
},
{
"name": "functions",
"description": "The Functions Service allows you view, create and manage your Cloud Functions."
"description": "The Functions Service allows you view, create and manage your Cloud Functions.",
"x-globalAttributes": []
},
{
"name": "proxy",
"description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration."
"description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration.",
"x-globalAttributes": []
},
{
"name": "graphql",
"description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL."
"description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.",
"x-globalAttributes": []
},
{
"name": "console",
"description": "The Console service allows you to interact with console relevant informations."
"description": "The Console service allows you to interact with console relevant informations.",
"x-globalAttributes": []
},
{
"name": "migrations",
"description": "The Migrations service allows you to migrate third-party data to your Appwrite project."
"description": "The Migrations service allows you to migrate third-party data to your Appwrite project.",
"x-globalAttributes": []
},
{
"name": "messaging",
"description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)."
"description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.).",
"x-globalAttributes": []
}
],
"components": {
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+80 -95
View File
@@ -2765,10 +2765,7 @@
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md",
"rate-limit": 10,
"rate-time": 3600,
"rate-key": [
"url:{url},email:{param-email}",
"url:{url},ip:{ip}"
],
"rate-key": "url:{url},email:{param-email}",
"scope": "sessions.write",
"platforms": [
"server",
@@ -4574,7 +4571,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@@ -4602,31 +4599,6 @@
"server"
],
"packaging": false,
"methods": [
{
"name": "createDocument",
"parameters": [
"databaseId",
"collectionId",
"documentId",
"data",
"permissions"
],
"required": [
"databaseId",
"collectionId",
"documentId",
"data"
],
"responses": [
{
"code": 201,
"model": "#\/definitions\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
}
],
"auth": {
"Project": []
}
@@ -4664,13 +4636,13 @@
"documentId": {
"type": "string",
"description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.",
"default": "",
"default": null,
"x-example": "<DOCUMENT_ID>"
},
"data": {
"type": "object",
"description": "Document data as JSON object.",
"default": [],
"default": {},
"x-example": "{}"
},
"permissions": {
@@ -4681,17 +4653,12 @@
"items": {
"type": "string"
}
},
"documents": {
"type": "array",
"description": "Array of documents data as JSON objects.",
"default": [],
"x-example": null,
"items": {
"type": "object"
}
}
}
},
"required": [
"documentId",
"data"
]
}
}
]
@@ -4907,7 +4874,7 @@
"x-appwrite": {
"method": "deleteDocument",
"group": "documents",
"weight": 115,
"weight": 113,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4985,7 +4952,7 @@
"x-appwrite": {
"method": "listExecutions",
"group": "executions",
"weight": 308,
"weight": 305,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5068,7 +5035,7 @@
"x-appwrite": {
"method": "createExecution",
"group": "executions",
"weight": 307,
"weight": 304,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5185,7 +5152,7 @@
"x-appwrite": {
"method": "getExecution",
"group": "executions",
"weight": 309,
"weight": 306,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5257,7 +5224,7 @@
"x-appwrite": {
"method": "query",
"group": "graphql",
"weight": 333,
"weight": 330,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5331,7 +5298,7 @@
"x-appwrite": {
"method": "mutation",
"group": "graphql",
"weight": 332,
"weight": 329,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5403,7 +5370,7 @@
"x-appwrite": {
"method": "get",
"group": null,
"weight": 120,
"weight": 117,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5455,7 +5422,7 @@
"x-appwrite": {
"method": "listCodes",
"group": null,
"weight": 121,
"weight": 118,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5507,7 +5474,7 @@
"x-appwrite": {
"method": "listContinents",
"group": null,
"weight": 125,
"weight": 122,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5559,7 +5526,7 @@
"x-appwrite": {
"method": "listCountries",
"group": null,
"weight": 122,
"weight": 119,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5611,7 +5578,7 @@
"x-appwrite": {
"method": "listCountriesEU",
"group": null,
"weight": 123,
"weight": 120,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5663,7 +5630,7 @@
"x-appwrite": {
"method": "listCountriesPhones",
"group": null,
"weight": 124,
"weight": 121,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5715,7 +5682,7 @@
"x-appwrite": {
"method": "listCurrencies",
"group": null,
"weight": 126,
"weight": 123,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5767,7 +5734,7 @@
"x-appwrite": {
"method": "listLanguages",
"group": null,
"weight": 127,
"weight": 124,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5821,7 +5788,7 @@
"x-appwrite": {
"method": "createSubscriber",
"group": "subscribers",
"weight": 378,
"weight": 375,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5906,7 +5873,7 @@
"x-appwrite": {
"method": "deleteSubscriber",
"group": "subscribers",
"weight": 382,
"weight": 379,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5977,7 +5944,7 @@
"x-appwrite": {
"method": "listFiles",
"group": "files",
"weight": 210,
"weight": 207,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6060,7 +6027,7 @@
"x-appwrite": {
"method": "createFile",
"group": "files",
"weight": 209,
"weight": 206,
"cookies": false,
"type": "upload",
"deprecated": false,
@@ -6150,7 +6117,7 @@
"x-appwrite": {
"method": "getFile",
"group": "files",
"weight": 211,
"weight": 208,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6220,7 +6187,7 @@
"x-appwrite": {
"method": "updateFile",
"group": "files",
"weight": 216,
"weight": 213,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6309,7 +6276,7 @@
"x-appwrite": {
"method": "deleteFile",
"group": "files",
"weight": 217,
"weight": 214,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6379,7 +6346,7 @@
"x-appwrite": {
"method": "getFileDownload",
"group": "files",
"weight": 213,
"weight": 210,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6449,7 +6416,7 @@
"x-appwrite": {
"method": "getFilePreview",
"group": "files",
"weight": 212,
"weight": 209,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6647,7 +6614,7 @@
"x-appwrite": {
"method": "getFileView",
"group": "files",
"weight": 214,
"weight": 211,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6717,7 +6684,7 @@
"x-appwrite": {
"method": "list",
"group": "teams",
"weight": 221,
"weight": 218,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6792,7 +6759,7 @@
"x-appwrite": {
"method": "create",
"group": "teams",
"weight": 220,
"weight": 217,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6882,7 +6849,7 @@
"x-appwrite": {
"method": "get",
"group": "teams",
"weight": 222,
"weight": 219,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6944,7 +6911,7 @@
"x-appwrite": {
"method": "updateName",
"group": "teams",
"weight": 224,
"weight": 221,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7019,7 +6986,7 @@
"x-appwrite": {
"method": "delete",
"group": "teams",
"weight": 226,
"weight": 223,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7081,7 +7048,7 @@
"x-appwrite": {
"method": "listMemberships",
"group": "memberships",
"weight": 228,
"weight": 225,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7164,7 +7131,7 @@
"x-appwrite": {
"method": "createMembership",
"group": "memberships",
"weight": 227,
"weight": 224,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7277,7 +7244,7 @@
"x-appwrite": {
"method": "getMembership",
"group": "memberships",
"weight": 229,
"weight": 226,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7347,7 +7314,7 @@
"x-appwrite": {
"method": "updateMembership",
"group": "memberships",
"weight": 230,
"weight": 227,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7433,7 +7400,7 @@
"x-appwrite": {
"method": "deleteMembership",
"group": "memberships",
"weight": 232,
"weight": 229,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7505,7 +7472,7 @@
"x-appwrite": {
"method": "updateMembershipStatus",
"group": "memberships",
"weight": 231,
"weight": 228,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7599,7 +7566,7 @@
"x-appwrite": {
"method": "getPrefs",
"group": "teams",
"weight": 223,
"weight": 220,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7660,7 +7627,7 @@
"x-appwrite": {
"method": "updatePrefs",
"group": "teams",
"weight": 225,
"weight": 222,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7720,67 +7687,85 @@
"tags": [
{
"name": "account",
"description": "The Account service allows you to authenticate and manage a user account."
"description": "The Account service allows you to authenticate and manage a user account.",
"x-globalAttributes": []
},
{
"name": "avatars",
"description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."
"description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.",
"x-globalAttributes": []
},
{
"name": "databases",
"description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents"
"description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents",
"x-globalAttributes": [
"databaseId"
]
},
{
"name": "locale",
"description": "The Locale service allows you to customize your app based on your users' location."
"description": "The Locale service allows you to customize your app based on your users' location.",
"x-globalAttributes": []
},
{
"name": "health",
"description": "The Health service allows you to both validate and monitor your Appwrite server's health."
"description": "The Health service allows you to both validate and monitor your Appwrite server's health.",
"x-globalAttributes": []
},
{
"name": "projects",
"description": "The Project service allows you to manage all the projects in your Appwrite server."
"description": "The Project service allows you to manage all the projects in your Appwrite server.",
"x-globalAttributes": []
},
{
"name": "project",
"description": "The Project service allows you to manage all the projects in your Appwrite server."
"description": "The Project service allows you to manage all the projects in your Appwrite server.",
"x-globalAttributes": []
},
{
"name": "storage",
"description": "The Storage service allows you to manage your project files."
"description": "The Storage service allows you to manage your project files.",
"x-globalAttributes": []
},
{
"name": "teams",
"description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"
"description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources",
"x-globalAttributes": []
},
{
"name": "users",
"description": "The Users service allows you to manage your project users."
"description": "The Users service allows you to manage your project users.",
"x-globalAttributes": []
},
{
"name": "functions",
"description": "The Functions Service allows you view, create and manage your Cloud Functions."
"description": "The Functions Service allows you view, create and manage your Cloud Functions.",
"x-globalAttributes": []
},
{
"name": "proxy",
"description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration."
"description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration.",
"x-globalAttributes": []
},
{
"name": "graphql",
"description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL."
"description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.",
"x-globalAttributes": []
},
{
"name": "console",
"description": "The Console service allows you to interact with console relevant informations."
"description": "The Console service allows you to interact with console relevant informations.",
"x-globalAttributes": []
},
{
"name": "migrations",
"description": "The Migrations service allows you to migrate third-party data to your Appwrite project."
"description": "The Migrations service allows you to migrate third-party data to your Appwrite project.",
"x-globalAttributes": []
},
{
"name": "messaging",
"description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)."
"description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.).",
"x-globalAttributes": []
}
],
"definitions": {
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+80 -95
View File
@@ -2765,10 +2765,7 @@
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-token-email.md",
"rate-limit": 10,
"rate-time": 3600,
"rate-key": [
"url:{url},email:{param-email}",
"url:{url},ip:{ip}"
],
"rate-key": "url:{url},email:{param-email}",
"scope": "sessions.write",
"platforms": [
"server",
@@ -4574,7 +4571,7 @@
"tags": [
"databases"
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.",
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n",
"responses": {
"201": {
"description": "Document",
@@ -4602,31 +4599,6 @@
"server"
],
"packaging": false,
"methods": [
{
"name": "createDocument",
"parameters": [
"databaseId",
"collectionId",
"documentId",
"data",
"permissions"
],
"required": [
"databaseId",
"collectionId",
"documentId",
"data"
],
"responses": [
{
"code": 201,
"model": "#\/definitions\/document"
}
],
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
}
],
"auth": {
"Project": []
}
@@ -4664,13 +4636,13 @@
"documentId": {
"type": "string",
"description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.",
"default": "",
"default": null,
"x-example": "<DOCUMENT_ID>"
},
"data": {
"type": "object",
"description": "Document data as JSON object.",
"default": [],
"default": {},
"x-example": "{}"
},
"permissions": {
@@ -4681,17 +4653,12 @@
"items": {
"type": "string"
}
},
"documents": {
"type": "array",
"description": "Array of documents data as JSON objects.",
"default": [],
"x-example": null,
"items": {
"type": "object"
}
}
}
},
"required": [
"documentId",
"data"
]
}
}
]
@@ -4907,7 +4874,7 @@
"x-appwrite": {
"method": "deleteDocument",
"group": "documents",
"weight": 115,
"weight": 113,
"cookies": false,
"type": "",
"deprecated": false,
@@ -4985,7 +4952,7 @@
"x-appwrite": {
"method": "listExecutions",
"group": "executions",
"weight": 308,
"weight": 305,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5068,7 +5035,7 @@
"x-appwrite": {
"method": "createExecution",
"group": "executions",
"weight": 307,
"weight": 304,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5185,7 +5152,7 @@
"x-appwrite": {
"method": "getExecution",
"group": "executions",
"weight": 309,
"weight": 306,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5257,7 +5224,7 @@
"x-appwrite": {
"method": "query",
"group": "graphql",
"weight": 333,
"weight": 330,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5331,7 +5298,7 @@
"x-appwrite": {
"method": "mutation",
"group": "graphql",
"weight": 332,
"weight": 329,
"cookies": false,
"type": "graphql",
"deprecated": false,
@@ -5403,7 +5370,7 @@
"x-appwrite": {
"method": "get",
"group": null,
"weight": 120,
"weight": 117,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5455,7 +5422,7 @@
"x-appwrite": {
"method": "listCodes",
"group": null,
"weight": 121,
"weight": 118,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5507,7 +5474,7 @@
"x-appwrite": {
"method": "listContinents",
"group": null,
"weight": 125,
"weight": 122,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5559,7 +5526,7 @@
"x-appwrite": {
"method": "listCountries",
"group": null,
"weight": 122,
"weight": 119,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5611,7 +5578,7 @@
"x-appwrite": {
"method": "listCountriesEU",
"group": null,
"weight": 123,
"weight": 120,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5663,7 +5630,7 @@
"x-appwrite": {
"method": "listCountriesPhones",
"group": null,
"weight": 124,
"weight": 121,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5715,7 +5682,7 @@
"x-appwrite": {
"method": "listCurrencies",
"group": null,
"weight": 126,
"weight": 123,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5767,7 +5734,7 @@
"x-appwrite": {
"method": "listLanguages",
"group": null,
"weight": 127,
"weight": 124,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5821,7 +5788,7 @@
"x-appwrite": {
"method": "createSubscriber",
"group": "subscribers",
"weight": 378,
"weight": 375,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5906,7 +5873,7 @@
"x-appwrite": {
"method": "deleteSubscriber",
"group": "subscribers",
"weight": 382,
"weight": 379,
"cookies": false,
"type": "",
"deprecated": false,
@@ -5977,7 +5944,7 @@
"x-appwrite": {
"method": "listFiles",
"group": "files",
"weight": 210,
"weight": 207,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6060,7 +6027,7 @@
"x-appwrite": {
"method": "createFile",
"group": "files",
"weight": 209,
"weight": 206,
"cookies": false,
"type": "upload",
"deprecated": false,
@@ -6150,7 +6117,7 @@
"x-appwrite": {
"method": "getFile",
"group": "files",
"weight": 211,
"weight": 208,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6220,7 +6187,7 @@
"x-appwrite": {
"method": "updateFile",
"group": "files",
"weight": 216,
"weight": 213,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6309,7 +6276,7 @@
"x-appwrite": {
"method": "deleteFile",
"group": "files",
"weight": 217,
"weight": 214,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6379,7 +6346,7 @@
"x-appwrite": {
"method": "getFileDownload",
"group": "files",
"weight": 213,
"weight": 210,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6449,7 +6416,7 @@
"x-appwrite": {
"method": "getFilePreview",
"group": "files",
"weight": 212,
"weight": 209,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6647,7 +6614,7 @@
"x-appwrite": {
"method": "getFileView",
"group": "files",
"weight": 214,
"weight": 211,
"cookies": false,
"type": "location",
"deprecated": false,
@@ -6717,7 +6684,7 @@
"x-appwrite": {
"method": "list",
"group": "teams",
"weight": 221,
"weight": 218,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6792,7 +6759,7 @@
"x-appwrite": {
"method": "create",
"group": "teams",
"weight": 220,
"weight": 217,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6882,7 +6849,7 @@
"x-appwrite": {
"method": "get",
"group": "teams",
"weight": 222,
"weight": 219,
"cookies": false,
"type": "",
"deprecated": false,
@@ -6944,7 +6911,7 @@
"x-appwrite": {
"method": "updateName",
"group": "teams",
"weight": 224,
"weight": 221,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7019,7 +6986,7 @@
"x-appwrite": {
"method": "delete",
"group": "teams",
"weight": 226,
"weight": 223,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7081,7 +7048,7 @@
"x-appwrite": {
"method": "listMemberships",
"group": "memberships",
"weight": 228,
"weight": 225,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7164,7 +7131,7 @@
"x-appwrite": {
"method": "createMembership",
"group": "memberships",
"weight": 227,
"weight": 224,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7277,7 +7244,7 @@
"x-appwrite": {
"method": "getMembership",
"group": "memberships",
"weight": 229,
"weight": 226,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7347,7 +7314,7 @@
"x-appwrite": {
"method": "updateMembership",
"group": "memberships",
"weight": 230,
"weight": 227,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7433,7 +7400,7 @@
"x-appwrite": {
"method": "deleteMembership",
"group": "memberships",
"weight": 232,
"weight": 229,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7505,7 +7472,7 @@
"x-appwrite": {
"method": "updateMembershipStatus",
"group": "memberships",
"weight": 231,
"weight": 228,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7599,7 +7566,7 @@
"x-appwrite": {
"method": "getPrefs",
"group": "teams",
"weight": 223,
"weight": 220,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7660,7 +7627,7 @@
"x-appwrite": {
"method": "updatePrefs",
"group": "teams",
"weight": 225,
"weight": 222,
"cookies": false,
"type": "",
"deprecated": false,
@@ -7720,67 +7687,85 @@
"tags": [
{
"name": "account",
"description": "The Account service allows you to authenticate and manage a user account."
"description": "The Account service allows you to authenticate and manage a user account.",
"x-globalAttributes": []
},
{
"name": "avatars",
"description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."
"description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.",
"x-globalAttributes": []
},
{
"name": "databases",
"description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents"
"description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents",
"x-globalAttributes": [
"databaseId"
]
},
{
"name": "locale",
"description": "The Locale service allows you to customize your app based on your users' location."
"description": "The Locale service allows you to customize your app based on your users' location.",
"x-globalAttributes": []
},
{
"name": "health",
"description": "The Health service allows you to both validate and monitor your Appwrite server's health."
"description": "The Health service allows you to both validate and monitor your Appwrite server's health.",
"x-globalAttributes": []
},
{
"name": "projects",
"description": "The Project service allows you to manage all the projects in your Appwrite server."
"description": "The Project service allows you to manage all the projects in your Appwrite server.",
"x-globalAttributes": []
},
{
"name": "project",
"description": "The Project service allows you to manage all the projects in your Appwrite server."
"description": "The Project service allows you to manage all the projects in your Appwrite server.",
"x-globalAttributes": []
},
{
"name": "storage",
"description": "The Storage service allows you to manage your project files."
"description": "The Storage service allows you to manage your project files.",
"x-globalAttributes": []
},
{
"name": "teams",
"description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"
"description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources",
"x-globalAttributes": []
},
{
"name": "users",
"description": "The Users service allows you to manage your project users."
"description": "The Users service allows you to manage your project users.",
"x-globalAttributes": []
},
{
"name": "functions",
"description": "The Functions Service allows you view, create and manage your Cloud Functions."
"description": "The Functions Service allows you view, create and manage your Cloud Functions.",
"x-globalAttributes": []
},
{
"name": "proxy",
"description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration."
"description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration.",
"x-globalAttributes": []
},
{
"name": "graphql",
"description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL."
"description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL.",
"x-globalAttributes": []
},
{
"name": "console",
"description": "The Console service allows you to interact with console relevant informations."
"description": "The Console service allows you to interact with console relevant informations.",
"x-globalAttributes": []
},
{
"name": "migrations",
"description": "The Migrations service allows you to migrate third-party data to your Appwrite project."
"description": "The Migrations service allows you to migrate third-party data to your Appwrite project.",
"x-globalAttributes": []
},
{
"name": "messaging",
"description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)."
"description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.).",
"x-globalAttributes": []
}
],
"definitions": {
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1
View File
@@ -4,6 +4,7 @@ return [
// Accepted inputs files
"jpg" => "image/jpeg",
"jpeg" => "image/jpeg",
"gif" => "image/gif",
"png" => "image/png",
"heic" => "image/heic",
"webp" => "image/webp",
+1
View File
@@ -4,6 +4,7 @@ return [
// Accepted outputs files
"jpg" => "image/jpeg",
"jpeg" => "image/jpeg",
"gif" => "image/gif",
"png" => "image/png",
"webp" => "image/webp",
"heic" => "image/heic",
+1 -10
View File
@@ -1030,22 +1030,13 @@ return [
],
[
'name' => '_APP_MAINTENANCE_DELAY',
'description' => 'Deprecated with 1.6.2 use _APP_MAINTENANCE_START_TIME instead to run the maintenance at a specific time per day.',
'description' => 'Delay value containing the number of seconds that the Appwrite maintenance process should wait before executing system cleanups and optimizations. The default value is 0 seconds.',
'introduction' => '1.5.0',
'default' => '0',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_MAINTENANCE_START_TIME',
'description' => 'The time of day (in 24-hour format) when the maintenance process should start. The default value is 00:00.',
'introduction' => '1.6.2',
'default' => '00:00',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_MAINTENANCE_RETENTION_CACHE',
'description' => 'The maximum duration (in seconds) upto which to retain cached files. The default value is 2592000 seconds (30 days).',
+11 -10
View File
@@ -719,7 +719,9 @@ App::delete('/v1/account/sessions/:sessionId')
continue;
}
$dbForProject->deleteDocument('sessions', $session->getId());
$dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $session) {
return $dbForProject->deleteDocument('sessions', $session->getId());
});
unset($sessions[$key]);
@@ -1999,7 +2001,6 @@ App::post('/v1/account/tokens/magic-url')
$senderEmail = System::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM);
$senderName = System::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server');
$replyTo = "";
if ($smtpEnabled) {
@@ -2099,7 +2100,7 @@ App::post('/v1/account/tokens/email')
contentType: ContentType::JSON,
))
->label('abuse-limit', 10)
->label('abuse-key', ['url:{url},email:{param-email}', 'url:{url},ip:{ip}'])
->label('abuse-key', 'url:{url},email:{param-email}')
->param('userId', '', new CustomId(), 'User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('email', '', new Email(), 'User email.')
->param('phrase', false, new Boolean(), 'Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.', true)
@@ -2768,7 +2769,7 @@ App::patch('/v1/account/name')
$user->setAttribute('name', $name);
$user = $dbForProject->updateDocument('users', $user->getId(), $user);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
$queueForEvents->setParam('userId', $user->getId());
@@ -2843,7 +2844,7 @@ App::patch('/v1/account/password')
->setAttribute('hash', Auth::DEFAULT_ALGO)
->setAttribute('hashOptions', Auth::DEFAULT_ALGO_OPTIONS);
$user = $dbForProject->updateDocument('users', $user->getId(), $user);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
$queueForEvents->setParam('userId', $user->getId());
@@ -2928,7 +2929,7 @@ App::patch('/v1/account/email')
}
try {
$user = $dbForProject->updateDocument('users', $user->getId(), $user);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
/**
* @var Document $oldTarget
*/
@@ -3014,7 +3015,7 @@ App::patch('/v1/account/phone')
}
try {
$user = $dbForProject->updateDocument('users', $user->getId(), $user);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
/**
* @var Document $oldTarget
*/
@@ -3064,7 +3065,7 @@ App::patch('/v1/account/prefs')
$user->setAttribute('prefs', $prefs);
$user = $dbForProject->updateDocument('users', $user->getId(), $user);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
$queueForEvents->setParam('userId', $user->getId());
@@ -3102,7 +3103,7 @@ App::patch('/v1/account/status')
$user->setAttribute('status', false);
$user = $dbForProject->updateDocument('users', $user->getId(), $user);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
$queueForEvents
->setParam('userId', $user->getId())
@@ -3866,7 +3867,7 @@ App::patch('/v1/account/mfa')
$user->setAttribute('mfa', $mfa);
$user = $dbForProject->updateDocument('users', $user->getId(), $user);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
if ($mfa) {
$factors = $session->getAttribute('factors', []);
+3 -3
View File
@@ -187,7 +187,7 @@ App::get('/v1/avatars/credit-cards/:code')
->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-credit-cards'))), 'Credit Card Code. Possible values: ' . \implode(', ', \array_keys(Config::getParam('avatar-credit-cards'))) . '.')
->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true)
->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true)
->param('quality', -1, new Range(-1, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.', true)
->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true)
->inject('response')
->action(fn (string $code, int $width, int $height, int $quality, Response $response) => $avatarCallback('credit-cards', $code, $width, $height, $quality, $response));
@@ -215,7 +215,7 @@ App::get('/v1/avatars/browsers/:code')
->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-browsers'))), 'Browser Code.')
->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true)
->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true)
->param('quality', -1, new Range(-1, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.', true)
->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true)
->inject('response')
->action(fn (string $code, int $width, int $height, int $quality, Response $response) => $avatarCallback('browsers', $code, $width, $height, $quality, $response));
@@ -243,7 +243,7 @@ App::get('/v1/avatars/flags/:code')
->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-flags'))), 'Country Code. ISO Alpha-2 country code format.')
->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true)
->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true)
->param('quality', -1, new Range(-1, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.', true)
->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true)
->inject('response')
->action(fn (string $code, int $width, int $height, int $quality, Response $response) => $avatarCallback('flags', $code, $width, $height, $quality, $response));
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -1285,7 +1285,7 @@ App::post('/v1/functions/:functionId/deployments')
],
type: MethodType::UPLOAD,
packaging: true,
requestType: ContentType::MULTIPART,
requestType: 'multipart/form-data',
))
->param('functionId', '', new UID(), 'Function ID.')
->param('entrypoint', null, new Text(1028), 'Entrypoint File.', true)
@@ -1899,6 +1899,7 @@ App::post('/v1/functions/:functionId/executions')
)
],
contentType: ContentType::MULTIPART,
requestType: 'application/json',
))
->param('functionId', '', new UID(), 'Function ID.')
->param('body', '', new Text(10485760, 0), 'HTTP body of execution. Default value is empty string.', true)
+72 -65
View File
@@ -3,16 +3,13 @@
use Appwrite\ClamAV\Network;
use Appwrite\Event\Event;
use Appwrite\Extend\Exception;
use Appwrite\PubSub\Adapter\Pool as PubSubPool;
use Appwrite\SDK\AuthType;
use Appwrite\SDK\ContentType;
use Appwrite\SDK\Method;
use Appwrite\SDK\Response as SDKResponse;
use Appwrite\Utopia\Response;
use Utopia\App;
use Utopia\Cache\Adapter\Pool as CachePool;
use Utopia\Config\Config;
use Utopia\Database\Adapter\Pool as DatabasePool;
use Utopia\Database\Document;
use Utopia\Domains\Validator\PublicDomain;
use Utopia\Pools\Group;
@@ -37,8 +34,8 @@ App::get('/v1/health')
namespace: 'health',
group: 'health',
name: 'get',
description: '/docs/references/health/get.md',
auth: [AuthType::KEY],
description: '/docs/references/health/get.md',
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -73,11 +70,11 @@ App::get('/v1/health/db')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'health',
name: 'getDB',
description: '/docs/references/health/get-db.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -89,8 +86,8 @@ App::get('/v1/health/db')
->inject('response')
->inject('pools')
->action(function (Response $response, Group $pools) {
$output = [];
$failures = [];
$configs = [
'Console.DB' => Config::getParam('pools-console'),
@@ -100,7 +97,7 @@ App::get('/v1/health/db')
foreach ($configs as $key => $config) {
foreach ($config as $database) {
try {
$adapter = new DatabasePool($pools->get($database));
$adapter = $pools->get($database)->pop()->getResource();
$checkStart = \microtime(true);
@@ -111,16 +108,16 @@ App::get('/v1/health/db')
'ping' => \round((\microtime(true) - $checkStart) / 1000)
]);
} else {
$failures[] = $database;
$failure[] = $database;
}
} catch (\Throwable) {
$failures[] = $database;
} catch (\Throwable $th) {
$failure[] = $database;
}
}
}
if (!empty($failures)) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'DB failure on: ' . implode(", ", $failures));
if (!empty($failure)) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'DB failure on: ' . implode(", ", $failure));
}
$response->dynamic(new Document([
@@ -134,11 +131,11 @@ App::get('/v1/health/cache')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'health',
name: 'getCache',
description: '/docs/references/health/get-cache.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -150,39 +147,44 @@ App::get('/v1/health/cache')
->inject('response')
->inject('pools')
->action(function (Response $response, Group $pools) {
$output = [];
$failures = [];
$configs = [
'Cache' => Config::getParam('pools-cache'),
];
foreach ($configs as $key => $config) {
foreach ($config as $cache) {
foreach ($config as $database) {
try {
$adapter = new CachePool($pools->get($cache));
/** @var \Utopia\Cache\Adapter $adapter */
$adapter = $pools->get($database)->pop()->getResource();
$checkStart = \microtime(true);
if ($adapter->ping()) {
$output[] = new Document([
'name' => $key . " ($cache)",
'name' => $key . " ($database)",
'status' => 'pass',
'ping' => \round((\microtime(true) - $checkStart) / 1000)
]);
} else {
$failures[] = $cache;
$output[] = new Document([
'name' => $key . " ($database)",
'status' => 'fail',
'ping' => \round((\microtime(true) - $checkStart) / 1000)
]);
}
} catch (\Throwable) {
$failures[] = $cache;
} catch (\Throwable $th) {
$output[] = new Document([
'name' => $key . " ($database)",
'status' => 'fail',
'ping' => \round((\microtime(true) - $checkStart) / 1000)
]);
}
}
}
if (!empty($failures)) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Cache failure on: ' . implode(", ", $failures));
}
$response->dynamic(new Document([
'statuses' => $output,
'total' => count($output),
@@ -194,11 +196,11 @@ App::get('/v1/health/pubsub')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'health',
name: 'getPubSub',
description: '/docs/references/health/get-pubsub.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -210,39 +212,44 @@ App::get('/v1/health/pubsub')
->inject('response')
->inject('pools')
->action(function (Response $response, Group $pools) {
$output = [];
$failures = [];
$configs = [
'PubSub' => Config::getParam('pools-pubsub'),
];
foreach ($configs as $key => $config) {
foreach ($config as $pubsub) {
foreach ($config as $database) {
try {
$adapter = new PubSubPool($pools->get($pubsub));
/** @var \Appwrite\PubSub\Adapter $adapter */
$adapter = $pools->get($database)->pop()->getResource();
$checkStart = \microtime(true);
if ($adapter->ping()) {
$output[] = new Document([
'name' => $key . " ($pubsub)",
'name' => $key . " ($database)",
'status' => 'pass',
'ping' => \round((\microtime(true) - $checkStart) / 1000)
]);
} else {
$failures[] = $pubsub;
$output[] = new Document([
'name' => $key . " ($database)",
'status' => 'fail',
'ping' => \round((\microtime(true) - $checkStart) / 1000)
]);
}
} catch (\Throwable) {
$failures[] = $pubsub;
} catch (\Throwable $th) {
$output[] = new Document([
'name' => $key . " ($database)",
'status' => 'fail',
'ping' => \round((\microtime(true) - $checkStart) / 1000)
]);
}
}
}
if (!empty($failures)) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Pubsub failure on: ' . implode(", ", $failures));
}
$response->dynamic(new Document([
'statuses' => $output,
'total' => count($output),
@@ -254,11 +261,11 @@ App::get('/v1/health/time')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'health',
name: 'getTime',
description: '/docs/references/health/get-time.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -318,11 +325,11 @@ App::get('/v1/health/queue/webhooks')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueWebhooks',
description: '/docs/references/health/get-queue-webhooks.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -344,18 +351,18 @@ App::get('/v1/health/queue/webhooks')
}
$response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE);
});
}, ['response']);
App::get('/v1/health/queue/logs')
->desc('Get logs queue')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueLogs',
description: '/docs/references/health/get-queue-logs.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -377,18 +384,18 @@ App::get('/v1/health/queue/logs')
}
$response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE);
});
}, ['response']);
App::get('/v1/health/certificate')
->desc('Get the SSL certificate for a domain')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'health',
name: 'getCertificate',
description: '/docs/references/health/get-certificate.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -434,18 +441,18 @@ App::get('/v1/health/certificate')
'validTo' => $certificatePayload['validTo_time_t'],
'signatureTypeSN' => $certificatePayload['signatureTypeSN'],
]), Response::MODEL_HEALTH_CERTIFICATE);
});
}, ['response']);
App::get('/v1/health/queue/certificates')
->desc('Get certificates queue')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueCertificates',
description: '/docs/references/health/get-queue-certificates.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -467,18 +474,18 @@ App::get('/v1/health/queue/certificates')
}
$response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE);
});
}, ['response']);
App::get('/v1/health/queue/builds')
->desc('Get builds queue')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueBuilds',
description: '/docs/references/health/get-queue-builds.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -500,18 +507,18 @@ App::get('/v1/health/queue/builds')
}
$response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE);
});
}, ['response']);
App::get('/v1/health/queue/databases')
->desc('Get databases queue')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueDatabases',
description: '/docs/references/health/get-queue-databases.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -534,18 +541,18 @@ App::get('/v1/health/queue/databases')
}
$response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE);
});
}, ['response']);
App::get('/v1/health/queue/deletes')
->desc('Get deletes queue')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueDeletes',
description: '/docs/references/health/get-queue-deletes.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -567,18 +574,18 @@ App::get('/v1/health/queue/deletes')
}
$response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE);
});
}, ['response']);
App::get('/v1/health/queue/mails')
->desc('Get mails queue')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueMails',
description: '/docs/references/health/get-queue-mails.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -600,18 +607,18 @@ App::get('/v1/health/queue/mails')
}
$response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE);
});
}, ['response']);
App::get('/v1/health/queue/messaging')
->desc('Get messaging queue')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueMessaging',
description: '/docs/references/health/get-queue-messaging.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -633,18 +640,18 @@ App::get('/v1/health/queue/messaging')
}
$response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE);
});
}, ['response']);
App::get('/v1/health/queue/migrations')
->desc('Get migrations queue')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueMigrations',
description: '/docs/references/health/get-queue-migrations.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -666,18 +673,18 @@ App::get('/v1/health/queue/migrations')
}
$response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE);
});
}, ['response']);
App::get('/v1/health/queue/functions')
->desc('Get functions queue')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueFunctions',
description: '/docs/references/health/get-queue-functions.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -699,18 +706,18 @@ App::get('/v1/health/queue/functions')
}
$response->dynamic(new Document([ 'size' => $size ]), Response::MODEL_HEALTH_QUEUE);
});
}, ['response']);
App::get('/v1/health/queue/stats-resources')
->desc('Get stats resources queue')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueStatsResources',
description: '/docs/references/health/get-queue-stats-resources.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -739,11 +746,11 @@ App::get('/v1/health/queue/stats-usage')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getQueueUsage',
description: '/docs/references/health/get-queue-stats-usage.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -772,11 +779,11 @@ App::get('/v1/health/storage/local')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'storage',
name: 'getStorageLocal',
description: '/docs/references/health/get-storage-local.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -822,11 +829,11 @@ App::get('/v1/health/storage')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'storage',
name: 'getStorage',
description: '/docs/references/health/get-storage.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -870,11 +877,11 @@ App::get('/v1/health/anti-virus')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'health',
name: 'getAntivirus',
description: '/docs/references/health/get-storage-anti-virus.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
@@ -916,11 +923,11 @@ App::get('/v1/health/queue/failed/:name')
->groups(['api', 'health'])
->label('scope', 'health.read')
->label('sdk', new Method(
auth: [AuthType::KEY],
namespace: 'health',
group: 'queue',
name: 'getFailedJobs',
description: '/docs/references/health/get-failed-queue-jobs.md',
auth: [AuthType::KEY],
responses: [
new SDKResponse(
code: Response::STATUS_CODE_OK,
+1 -2
View File
@@ -24,7 +24,6 @@ use Utopia\App;
use Utopia\Audit\Audit;
use Utopia\Cache\Cache;
use Utopia\Config\Config;
use Utopia\Database\Adapter\Pool as DatabasePool;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
@@ -224,7 +223,7 @@ App::post('/v1/projects')
$sharedTables = $sharedTablesV1 || $sharedTablesV2;
if (!$sharedTablesV2) {
$adapter = new DatabasePool($pools->get($dsn->getHost()));
$adapter = $pools->get($dsn->getHost())->pop()->getResource();
$dbForProject = new Database($adapter, $cache);
if ($sharedTables) {
+34 -39
View File
@@ -401,15 +401,15 @@ App::post('/v1/storage/buckets/:bucketId/files')
group: 'files',
name: 'createFile',
description: '/docs/references/storage/create-file.md',
type: MethodType::UPLOAD,
auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT],
requestType: 'multipart/form-data',
responses: [
new SDKResponse(
code: Response::STATUS_CODE_CREATED,
model: Response::MODEL_FILE,
)
],
type: MethodType::UPLOAD,
requestType: ContentType::MULTIPART
]
))
->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).')
->param('fileId', '', new CustomId(), 'File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
@@ -943,7 +943,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
->param('width', 0, new Range(0, 4000), 'Resize preview image width, Pass an integer between 0 to 4000.', true)
->param('height', 0, new Range(0, 4000), 'Resize preview image height, Pass an integer between 0 to 4000.', true)
->param('gravity', Image::GRAVITY_CENTER, new WhiteList(Image::getGravityTypes()), 'Image crop gravity. Can be one of ' . implode(",", Image::getGravityTypes()), true)
->param('quality', -1, new Range(-1, 100), 'Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.', true)
->param('quality', 100, new Range(0, 100), 'Preview image quality. Pass an integer between 0 to 100. Defaults to 100.', true)
->param('borderWidth', 0, new Range(0, 100), 'Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.', true)
->param('borderColor', '', new HexColor(), 'Preview image border color. Use a valid HEX color, no # is needed for prefix.', true)
->param('borderRadius', 0, new Range(0, 4000), 'Preview image border radius in pixels. Pass an integer between 0 to 4000.', true)
@@ -996,7 +996,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
$algorithm = $file->getAttribute('algorithm', Compression::NONE);
$cipher = $file->getAttribute('openSSLCipher');
$mime = $file->getAttribute('mimeType');
if (!\in_array($mime, $inputs) || $file->getAttribute('sizeActual') > (int) System::getEnv('_APP_STORAGE_PREVIEW_LIMIT', APP_STORAGE_READ_BUFFER)) {
if (!\in_array($mime, $inputs) || $file->getAttribute('sizeActual') > (int) System::getEnv('_APP_STORAGE_PREVIEW_LIMIT', 20000000)) {
if (!\in_array($mime, $inputs)) {
$path = (\array_key_exists($mime, $fileLogos)) ? $fileLogos[$mime] : $fileLogos['default'];
} else {
@@ -1162,6 +1162,13 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download')
throw new Exception(Exception::STORAGE_FILE_NOT_FOUND, 'File not found in ' . $path);
}
$response
->setContentType($file->getAttribute('mimeType'))
->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days
->addHeader('X-Peak', \memory_get_peak_usage())
->addHeader('Content-Disposition', 'attachment; filename="' . $file->getAttribute('name', '') . '"')
;
$size = $file->getAttribute('sizeOriginal', 0);
$rangeHeader = $request->getHeader('range');
@@ -1170,7 +1177,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download')
$end = $request->getRangeEnd();
$unit = $request->getRangeUnit();
if ($end === null || $end - $start > APP_STORAGE_READ_BUFFER) {
if ($end === null) {
$end = min(($start + MAX_OUTPUT_CHUNK_SIZE - 1), ($size - 1));
}
@@ -1185,13 +1192,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download')
->setStatusCode(Response::STATUS_CODE_PARTIALCONTENT);
}
$response
->setContentType($file->getAttribute('mimeType'))
->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days
->addHeader('X-Peak', \memory_get_peak_usage())
->addHeader('Content-Disposition', 'attachment; filename="' . $file->getAttribute('name', '') . '"')
;
$source = '';
if (!empty($file->getAttribute('openSSLCipher'))) { // Decrypt
$source = $deviceForFiles->read($path);
@@ -1225,15 +1225,12 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download')
if (!empty($source)) {
if (!empty($rangeHeader)) {
$response->send(substr($source, $start, ($end - $start + 1)));
return;
}
$response->send($source);
return;
}
if (!empty($rangeHeader)) {
$response->send($deviceForFiles->read($path, $start, ($end - $start + 1)));
return;
}
if ($size > APP_STORAGE_READ_BUFFER) {
@@ -1321,6 +1318,15 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view')
$contentType = $file->getAttribute('mimeType');
}
$response
->setContentType($contentType)
->addHeader('Content-Security-Policy', 'script-src none;')
->addHeader('X-Content-Type-Options', 'nosniff')
->addHeader('Content-Disposition', 'inline; filename="' . $file->getAttribute('name', '') . '"')
->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days
->addHeader('X-Peak', \memory_get_peak_usage())
;
$size = $file->getAttribute('sizeOriginal', 0);
$rangeHeader = $request->getHeader('range');
@@ -1329,8 +1335,8 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view')
$end = $request->getRangeEnd();
$unit = $request->getRangeUnit();
if ($end === null || $end - $start > APP_STORAGE_READ_BUFFER) {
$end = min(($start + APP_STORAGE_READ_BUFFER - 1), ($size - 1));
if ($end === null) {
$end = min(($start + 2000000 - 1), ($size - 1));
}
if ($unit != 'bytes' || $start >= $end || $end >= $size) {
@@ -1344,15 +1350,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view')
->setStatusCode(Response::STATUS_CODE_PARTIALCONTENT);
}
$response
->setContentType($contentType)
->addHeader('Content-Security-Policy', 'script-src none;')
->addHeader('X-Content-Type-Options', 'nosniff')
->addHeader('Content-Disposition', 'inline; filename="' . $file->getAttribute('name', '') . '"')
->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days
->addHeader('X-Peak', \memory_get_peak_usage())
;
$source = '';
if (!empty($file->getAttribute('openSSLCipher'))) { // Decrypt
$source = $deviceForFiles->read($path);
@@ -1386,7 +1383,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view')
if (!empty($source)) {
if (!empty($rangeHeader)) {
$response->send(substr($source, $start, ($end - $start + 1)));
return;
}
$response->send($source);
return;
@@ -1474,6 +1470,14 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/push')
$contentType = $file->getAttribute('mimeType');
}
$response
->setContentType($contentType)
->addHeader('Content-Security-Policy', 'script-src none;')
->addHeader('X-Content-Type-Options', 'nosniff')
->addHeader('Content-Disposition', 'inline; filename="' . $file->getAttribute('name', '') . '"')
->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days
->addHeader('X-Peak', \memory_get_peak_usage());
$size = $file->getAttribute('sizeOriginal', 0);
$rangeHeader = $request->getHeader('range');
@@ -1482,8 +1486,8 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/push')
$end = $request->getRangeEnd();
$unit = $request->getRangeUnit();
if ($end === null || $end - $start > APP_STORAGE_READ_BUFFER) {
$end = min(($start + APP_STORAGE_READ_BUFFER - 1), ($size - 1));
if ($end === null) {
$end = min(($start + 2000000 - 1), ($size - 1));
}
if ($unit != 'bytes' || $start >= $end || $end >= $size) {
@@ -1497,14 +1501,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/push')
->setStatusCode(Response::STATUS_CODE_PARTIALCONTENT);
}
$response
->setContentType($contentType)
->addHeader('Content-Security-Policy', 'script-src none;')
->addHeader('X-Content-Type-Options', 'nosniff')
->addHeader('Content-Disposition', 'inline; filename="' . $file->getAttribute('name', '') . '"')
->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days
->addHeader('X-Peak', \memory_get_peak_usage());
$source = '';
if (!empty($file->getAttribute('openSSLCipher'))) { // Decrypt
$source = $deviceForFiles->read($path);
@@ -1538,7 +1534,6 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/push')
if (!empty($source)) {
if (!empty($rangeHeader)) {
$response->send(substr($source, $start, ($end - $start + 1)));
return;
}
$response->send($source);
return;
+4 -5
View File
@@ -322,7 +322,9 @@ App::put('/v1/teams/:teamId')
->setAttribute('name', $name)
->setAttribute('search', implode(' ', [$teamId, $name]));
$team = $dbForProject->updateDocument('teams', $team->getId(), $team);
$team = $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $team) {
return $dbForProject->updateDocument('teams', $team->getId(), $team);
});
$queueForEvents->setParam('teamId', $team->getId());
@@ -1089,10 +1091,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId')
// Quick check: fetch up to 2 owners to determine if only one exists
$ownersCount = $dbForProject->count(
collection: 'memberships',
queries: [
Query::contains('roles', ['owner']),
Query::equal('teamInternalId', [$team->getInternalId()])
],
queries: [Query::contains('roles', ['owner'])],
max: 2
);
-4
View File
@@ -9,8 +9,6 @@ use Appwrite\Auth\Validator\PasswordDictionary;
use Appwrite\Auth\Validator\PasswordHistory;
use Appwrite\Auth\Validator\PersonalData;
use Appwrite\Auth\Validator\Phone;
use Appwrite\Deletes\Identities as DeleteIdentities;
use Appwrite\Deletes\Targets as DeleteTargets;
use Appwrite\Detector\Detector;
use Appwrite\Event\Delete;
use Appwrite\Event\Event;
@@ -2277,8 +2275,6 @@ App::delete('/v1/users/:userId')
$clone = clone $user;
$dbForProject->deleteDocument('users', $userId);
DeleteIdentities::delete($dbForProject, Query::equal('userInternalId', [$user->getInternalId()]));
DeleteTargets::delete($dbForProject, Query::equal('userInternalId', [$user->getInternalId()]));
$queueForDeletes
->setType(DELETE_TYPE_DOCUMENT)
+27 -2
View File
@@ -144,6 +144,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw
)
],
contentType: ContentType::MULTIPART,
requestType: 'application/json',
));
} else {
/** @var Method $method */
@@ -835,12 +836,36 @@ App::error()
break;
}
break;
case 'Utopia\Database\Exception\Authorization':
$error = new AppwriteException(AppwriteException::USER_UNAUTHORIZED);
case 'Utopia\Database\Exception\Conflict':
$error = new AppwriteException(AppwriteException::DOCUMENT_UPDATE_CONFLICT, previous: $error);
break;
case 'Utopia\Database\Exception\Timeout':
$error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error);
break;
case 'Utopia\Database\Exception\Query':
$error = new AppwriteException(AppwriteException::GENERAL_QUERY_INVALID, $error->getMessage(), previous: $error);
break;
case 'Utopia\Database\Exception\Structure':
$error = new AppwriteException(AppwriteException::DOCUMENT_INVALID_STRUCTURE, $error->getMessage(), previous: $error);
break;
case 'Utopia\Database\Exception\Duplicate':
$error = new AppwriteException(AppwriteException::DOCUMENT_ALREADY_EXISTS);
break;
case 'Utopia\Database\Exception\Restricted':
$error = new AppwriteException(AppwriteException::DOCUMENT_DELETE_RESTRICTED);
break;
case 'Utopia\Database\Exception\Authorization':
$error = new AppwriteException(AppwriteException::USER_UNAUTHORIZED);
break;
case 'Utopia\Database\Exception\Relationship':
$error = new AppwriteException(AppwriteException::RELATIONSHIP_VALUE_INVALID, $error->getMessage(), previous: $error);
break;
case 'Utopia\Database\Exception\NotFound':
$error = new AppwriteException(AppwriteException::COLLECTION_NOT_FOUND, $error->getMessage(), previous: $error);
break;
case 'Utopia\Database\Exception\Dependency':
$error = new AppwriteException(AppwriteException::INDEX_DEPENDENCY, null, previous: $error);
break;
}
$code = $error->getCode();
+4 -21
View File
@@ -92,20 +92,8 @@ $eventDatabaseListener = function (Document $project, Document $document, Respon
$usageDatabaseListener = function (string $event, Document $document, StatsUsage $queueForStatsUsage) {
$value = 1;
switch ($event) {
case Database::EVENT_DOCUMENT_DELETE:
$value = -1;
break;
case Database::EVENT_DOCUMENTS_DELETE:
$value = -1 * $document->getAttribute('modified', 0);
break;
case Database::EVENT_DOCUMENTS_CREATE:
$value = $document->getAttribute('modified', 0);
break;
case Database::EVENT_DOCUMENTS_UPSERT:
$value = $document->getAttribute('created', 0);
break;
if ($event === Database::EVENT_DOCUMENT_DELETE) {
$value = -1;
}
switch (true) {
@@ -340,8 +328,6 @@ App::init()
*/
$method = $route->getLabel('sdk', false);
// Take the first method if there's more than one,
// namespace can not differ between methods on the same route
if (\is_array($method)) {
$method = $method[0];
}
@@ -525,9 +511,6 @@ App::init()
$dbForProject
->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage))
->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage))
->on(Database::EVENT_DOCUMENTS_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage))
->on(Database::EVENT_DOCUMENTS_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage))
->on(Database::EVENT_DOCUMENTS_UPSERT, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage))
->on(Database::EVENT_DOCUMENT_CREATE, 'create-trigger-events', fn ($event, $document) => $eventDatabaseListener(
$project,
$document,
@@ -544,7 +527,7 @@ App::init()
$isImageTransformation = $route->getPath() === '/v1/storage/buckets/:bucketId/files/:fileId/preview';
$isDisabled = isset($plan['imageTransformations']) && $plan['imageTransformations'] === -1 && !Auth::isPrivilegedUser(Authorization::getRoles());
$key = $request->cacheIdentifier();
$key = md5($request->getURI() . '*' . implode('*', $request->getParams()) . '*' . APP_CACHE_BUSTER);
$cacheLog = Authorization::skip(fn () => $dbForProject->getDocument('cache', $key));
$cache = new Cache(
new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId())
@@ -803,7 +786,7 @@ App::shutdown()
$resourceType = $parseLabel($pattern, $responsePayload, $requestParams, $user);
}
$key = $request->cacheIdentifier();
$key = md5($request->getURI() . '*' . implode('*', $request->getParams()) . '*' . APP_CACHE_BUSTER);
$signature = md5($data['payload']);
$cacheLog = Authorization::skip(fn () => $dbForProject->getDocument('cache', $key));
$accessedAt = $cacheLog->getAttribute('accessedAt', '');
+13 -8
View File
@@ -14,11 +14,9 @@ use Utopia\App;
use Utopia\Audit\Audit;
use Utopia\CLI\Console;
use Utopia\Config\Config;
use Utopia\Database\Adapter\Pool as DatabasePool;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
use Utopia\Database\Exception\Duplicate as DuplicateException;
use Utopia\Database\Helpers\ID;
use Utopia\Database\Helpers\Permission;
use Utopia\Database\Helpers\Role;
@@ -169,7 +167,7 @@ function createDatabase(App $app, string $resourceKey, string $dbName, array $co
$sleep = 1;
$attempts = 0;
while (true) {
do {
try {
$attempts++;
$resource = $app->getResource($resourceKey);
@@ -178,12 +176,13 @@ function createDatabase(App $app, string $resourceKey, string $dbName, array $co
break; // exit loop on success
} catch (\Exception $e) {
Console::warning(" └── Database not ready. Retrying connection ({$attempts})...");
$pools->reclaim();
if ($attempts >= $max) {
throw new \Exception(' └── Failed to connect to database: ' . $e->getMessage());
}
sleep($sleep);
}
}
} while ($attempts < $max);
Console::success("[Setup] - $dbName database init started...");
@@ -319,7 +318,11 @@ $http->on(Constant::EVENT_START, function (Server $http) use ($payloadSize, $reg
$cache = $app->getResource('cache');
foreach ($sharedTablesV2 as $hostname) {
$adapter = new DatabasePool($pools->get($hostname));
$adapter = $pools
->get($hostname)
->pop()
->getResource();
$dbForProject = (new Database($adapter, $cache))
->setDatabase('appwrite')
->setSharedTables(true)
@@ -329,7 +332,7 @@ $http->on(Constant::EVENT_START, function (Server $http) use ($payloadSize, $reg
try {
Console::success('[Setup] - Creating project database: ' . $hostname . '...');
$dbForProject->create();
} catch (DuplicateException) {
} catch (Duplicate) {
Console::success('[Setup] - Skip: metadata table already exists');
}
@@ -355,6 +358,7 @@ $http->on(Constant::EVENT_START, function (Server $http) use ($payloadSize, $reg
}
}
$pools->reclaim();
Console::success('[Setup] - Server database init completed...');
});
@@ -469,7 +473,6 @@ $http->on(Constant::EVENT_REQUEST, function (SwooleRequest $swooleRequest, Swool
Console::error('[Error] Message: ' . $th->getMessage());
Console::error('[Error] File: ' . $th->getFile());
Console::error('[Error] Line: ' . $th->getLine());
Console::error('[Error] Trace: ' . $th->getTraceAsString());
$swooleResponse->setStatusCode(500);
@@ -487,11 +490,13 @@ $http->on(Constant::EVENT_REQUEST, function (SwooleRequest $swooleRequest, Swool
];
$swooleResponse->end(\json_encode($output));
} finally {
$pools->reclaim();
}
});
// Fetch domains every `DOMAIN_SYNC_TIMER` seconds and update in the memory
$http->on(Constant::EVENT_TASK, function () use ($register, $domains) {
$http->on('Task', function () use ($register, $domains) {
$lastSyncUpdate = null;
$pools = $register->get('pools');
App::setResource('pools', fn () => $pools);
-1
View File
@@ -26,7 +26,6 @@ const APP_LIMIT_SUBSCRIBERS_SUBQUERY = 1_000_000;
const APP_LIMIT_WRITE_RATE_DEFAULT = 60; // Default maximum write rate per rate period
const APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT = 60; // Default maximum write rate period in seconds
const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return in list API calls
const APP_LIMIT_DATABASE_BATCH = 100; // Default maximum batch size for database operations
const APP_KEY_ACCESS = 24 * 60 * 60; // 24 hours
const APP_USER_ACCESS = 24 * 60 * 60; // 24 hours
const APP_PROJECT_ACCESS = 24 * 60 * 60; // 24 hours
+7 -8
View File
@@ -15,7 +15,6 @@ use Utopia\Config\Config;
use Utopia\Database\Adapter\MariaDB;
use Utopia\Database\Adapter\MySQL;
use Utopia\Database\Adapter\SQL;
use Utopia\Database\PDO;
use Utopia\Domains\Validator\PublicDomain;
use Utopia\DSN\DSN;
use Utopia\Logger\Adapter\AppSignal;
@@ -216,13 +215,13 @@ $register->set('pools', function () {
'mysql',
'mariadb' => function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase) {
return new PDOProxy(function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase) {
return new PDO("mysql:host={$dsnHost};port={$dsnPort};dbname={$dsnDatabase};charset=utf8mb4", $dsnUser, $dsnPass, [
\PDO::ATTR_TIMEOUT => 3, // Seconds
\PDO::ATTR_PERSISTENT => false,
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
\PDO::ATTR_EMULATE_PREPARES => true,
\PDO::ATTR_STRINGIFY_FETCHES => true
]);
return new PDO("mysql:host={$dsnHost};port={$dsnPort};dbname={$dsnDatabase};charset=utf8mb4", $dsnUser, $dsnPass, array(
PDO::ATTR_TIMEOUT => 3, // Seconds
PDO::ATTR_PERSISTENT => false,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => true,
PDO::ATTR_STRINGIFY_FETCHES => true
));
});
},
'redis' => function () use ($dsnHost, $dsnPort, $dsnPass) {
+35 -17
View File
@@ -24,12 +24,10 @@ use Appwrite\Utopia\Request;
use Executor\Executor;
use Utopia\Abuse\Adapters\TimeLimit\Redis as TimeLimitRedis;
use Utopia\App;
use Utopia\Cache\Adapter\Pool as CachePool;
use Utopia\Cache\Adapter\Sharding;
use Utopia\Cache\Cache;
use Utopia\CLI\Console;
use Utopia\Config\Config;
use Utopia\Database\Adapter\Pool as DatabasePool;
use Utopia\Database\Database;
use Utopia\Database\Document;
use Utopia\Database\Helpers\ID;
@@ -39,7 +37,6 @@ use Utopia\DSN\DSN;
use Utopia\Locale\Locale;
use Utopia\Logger\Log;
use Utopia\Pools\Group;
use Utopia\Queue\Broker\Pool as BrokerPool;
use Utopia\Queue\Publisher;
use Utopia\Storage\Device;
use Utopia\Storage\Device\AWS;
@@ -75,10 +72,10 @@ App::setResource('localeCodes', function () {
// Queues
App::setResource('publisher', function (Group $pools) {
return new BrokerPool(publisher: $pools->get('publisher'));
return $pools->get('publisher')->pop()->getResource();
}, ['pools']);
App::setResource('consumer', function (Group $pools) {
return new BrokerPool(consumer: $pools->get('consumer'));
return $pools->get('consumer')->pop()->getResource();
}, ['pools']);
App::setResource('queueForMessaging', function (Publisher $publisher) {
return new Messaging($publisher);
@@ -332,8 +329,12 @@ App::setResource('dbForProject', function (Group $pools, Database $dbForPlatform
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
$adapter = new DatabasePool($pools->get($dsn->getHost()));
$database = new Database($adapter, $cache);
$dbAdapter = $pools
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($dbAdapter, $cache);
$database
->setMetadata('host', \gethostname())
@@ -359,8 +360,12 @@ App::setResource('dbForProject', function (Group $pools, Database $dbForPlatform
}, ['pools', 'dbForPlatform', 'cache', 'project']);
App::setResource('dbForPlatform', function (Group $pools, Cache $cache) {
$adapter = new DatabasePool($pools->get('console'));
$database = new Database($adapter, $cache);
$dbAdapter = $pools
->get('console')
->pop()
->getResource();
$database = new Database($dbAdapter, $cache);
$database
->setNamespace('_console')
@@ -373,7 +378,7 @@ App::setResource('dbForPlatform', function (Group $pools, Cache $cache) {
}, ['pools', 'cache']);
App::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform, $cache) {
$databases = [];
$databases = []; // TODO: @Meldiron This should probably be responsibility of utopia-php/pools
return function (Document $project) use ($pools, $dbForPlatform, $cache, &$databases) {
if ($project->isEmpty() || $project->getId() === 'console') {
@@ -415,8 +420,12 @@ App::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform
return $database;
}
$adapter = new DatabasePool($pools->get($dsn->getHost()));
$database = new Database($adapter, $cache);
$dbAdapter = $pools
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($dbAdapter, $cache);
$databases[$dsn->getHost()] = $database;
$configure($database);
@@ -426,15 +435,21 @@ App::setResource('getProjectDB', function (Group $pools, Database $dbForPlatform
App::setResource('getLogsDB', function (Group $pools, Cache $cache) {
$database = null;
return function (?Document $project = null) use ($pools, $cache, &$database) {
return function (?Document $project = null) use ($pools, $cache, $database) {
if ($database !== null && $project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
$database->setTenant($project->getInternalId());
return $database;
}
$adapter = new DatabasePool($pools->get('logs'));
$database = new Database($adapter, $cache);
$dbAdapter = $pools
->get('logs')
->pop()
->getResource();
$database = new Database(
$dbAdapter,
$cache
);
$database
->setSharedTables(true)
@@ -458,7 +473,10 @@ App::setResource('cache', function (Group $pools, Telemetry $telemetry) {
$adapters = [];
foreach ($list as $value) {
$adapters[] = new CachePool($pools->get($value));
$adapters[] = $pools
->get($value)
->pop()
->getResource();
}
$cache = new Cache(new Sharding($adapters));
+45 -65
View File
@@ -5,7 +5,6 @@ use Appwrite\Extend\Exception;
use Appwrite\Extend\Exception as AppwriteException;
use Appwrite\Messaging\Adapter\Realtime;
use Appwrite\Network\Validator\Origin;
use Appwrite\PubSub\Adapter\Pool as PubSubPool;
use Appwrite\Utopia\Request;
use Appwrite\Utopia\Response;
use Swoole\Http\Request as SwooleRequest;
@@ -16,12 +15,10 @@ use Swoole\Timer;
use Utopia\Abuse\Abuse;
use Utopia\Abuse\Adapters\TimeLimit\Redis as TimeLimitRedis;
use Utopia\App;
use Utopia\Cache\Adapter\Pool as CachePool;
use Utopia\Cache\Adapter\Sharding;
use Utopia\Cache\Cache;
use Utopia\CLI\Console;
use Utopia\Config\Config;
use Utopia\Database\Adapter\Pool as DatabasePool;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
@@ -31,15 +28,13 @@ use Utopia\Database\Query;
use Utopia\Database\Validator\Authorization;
use Utopia\DSN\DSN;
use Utopia\Logger\Log;
use Utopia\Pools\Group;
use Utopia\Registry\Registry;
use Utopia\System\System;
use Utopia\Telemetry\Adapter\None as NoTelemetry;
use Utopia\WebSocket\Adapter;
use Utopia\WebSocket\Server;
/**
* @var Registry $register
* @var \Utopia\Registry\Registry $register
*/
require_once __DIR__ . '/init.php';
@@ -51,17 +46,17 @@ if (!function_exists('getConsoleDB')) {
{
global $register;
static $database = null;
if ($database !== null) {
return $database;
}
/** @var Group $pools */
/** @var \Utopia\Pools\Group $pools */
$pools = $register->get('pools');
$adapter = new DatabasePool($pools->get('console'));
$database = new Database($adapter, getCache());
$dbAdapter = $pools
->get('console')
->pop()
->getResource()
;
$database = new Database($dbAdapter, getCache());
$database
->setNamespace('_console')
->setMetadata('host', \gethostname())
@@ -77,13 +72,7 @@ if (!function_exists('getProjectDB')) {
{
global $register;
static $databases = [];
if (isset($databases[$project->getInternalId()])) {
return $databases[$project->getInternalId()];
}
/** @var Group $pools */
/** @var \Utopia\Pools\Group $pools */
$pools = $register->get('pools');
if ($project->isEmpty() || $project->getId() === 'console') {
@@ -97,7 +86,11 @@ if (!function_exists('getProjectDB')) {
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
$adapter = new DatabasePool($pools->get($dsn->getHost()));
$adapter = $pools
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($adapter, getCache());
$sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', ''));
@@ -118,7 +111,7 @@ if (!function_exists('getProjectDB')) {
->setMetadata('host', \gethostname())
->setMetadata('project', $project->getId());
return $databases[$project->getInternalId()] = $database;
return $database;
}
}
@@ -128,22 +121,20 @@ if (!function_exists('getCache')) {
{
global $register;
static $cache = null;
if ($cache !== null) {
return $cache;
}
$pools = $register->get('pools'); /** @var Group $pools */
$pools = $register->get('pools'); /** @var \Utopia\Pools\Group $pools */
$list = Config::getParam('pools-cache', []);
$adapters = [];
foreach ($list as $value) {
$adapters[] = new CachePool($pools->get($value));
$adapters[] = $pools
->get($value)
->pop()
->getResource()
;
}
return $cache = new Cache(new Sharding($adapters));
return new Cache(new Sharding($adapters));
}
}
@@ -151,12 +142,6 @@ if (!function_exists('getCache')) {
if (!function_exists('getRedis')) {
function getRedis(): \Redis
{
static $redis = null;
if ($redis !== null) {
return $redis;
}
$host = System::getEnv('_APP_REDIS_HOST', 'localhost');
$port = System::getEnv('_APP_REDIS_PORT', 6379);
$pass = System::getEnv('_APP_REDIS_PASS', '');
@@ -175,39 +160,21 @@ if (!function_exists('getRedis')) {
if (!function_exists('getTimelimit')) {
function getTimelimit(): TimeLimitRedis
{
static $timelimit = null;
if ($timelimit !== null) {
return $timelimit;
}
return $timelimit = new TimeLimitRedis("", 0, 1, getRedis());
return new TimeLimitRedis("", 0, 1, getRedis());
}
}
if (!function_exists('getRealtime')) {
function getRealtime(): Realtime
{
static $realtime = null;
if ($realtime !== null) {
return $realtime;
}
return $realtime = new Realtime();
return new Realtime();
}
}
if (!function_exists('getTelemetry')) {
function getTelemetry(int $workerId): Utopia\Telemetry\Adapter
{
static $telemetry = null;
if ($telemetry !== null) {
return $telemetry;
}
return $telemetry = new NoTelemetry();
return new NoTelemetry();
}
}
@@ -306,6 +273,7 @@ $server->onStart(function () use ($stats, $register, $containerId, &$statsDocume
sleep(DATABASE_RECONNECT_SLEEP);
}
} while (true);
$register->get('pools')->reclaim();
});
/**
@@ -331,7 +299,9 @@ $server->onStart(function () use ($stats, $register, $containerId, &$statsDocume
Authorization::skip(fn () => $database->updateDocument('realtime', $statsDocument->getId(), $statsDocument));
} catch (Throwable $th) {
$logError($th, "updateWorkerDocument");
call_user_func($logError, $th, "updateWorkerDocument");
} finally {
$register->get('pools')->reclaim();
}
});
}
@@ -400,6 +370,8 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats,
'data' => $event['data']
]));
}
$register->get('pools')->reclaim();
}
}
/**
@@ -435,8 +407,8 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats,
}
$start = time();
$pubsub = new PubSubPool($register->get('pools')->get('pubsub'));
/** @var \Appwrite\PubSub\Adapter $pubsub */
$pubsub = $register->get('pools')->get('pubsub')->pop()->getResource();
if ($pubsub->ping(true)) {
$attempts = 0;
Console::success('Pub/sub connection established (worker: ' . $workerId . ')');
@@ -464,6 +436,8 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats,
$realtime->unsubscribe($connection);
$realtime->subscribe($projectId, $connection, $roles, $channels);
$register->get('pools')->reclaim();
}
}
@@ -489,12 +463,14 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats,
}
});
} catch (Throwable $th) {
$logError($th, "pubSubConnection");
call_user_func($logError, $th, "pubSubConnection");
Console::error('Pub/sub error: ' . $th->getMessage());
$attempts++;
sleep(DATABASE_RECONNECT_SLEEP);
continue;
} finally {
$register->get('pools')->reclaim();
}
}
@@ -596,7 +572,7 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server,
$stats->incr($project->getId(), 'connections');
$stats->incr($project->getId(), 'connectionsTotal');
} catch (Throwable $th) {
$logError($th, "initServer");
call_user_func($logError, $th, "initServer");
// Handle SQL error code is 'HY000'
$code = $th->getCode();
@@ -620,6 +596,8 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server,
Console::error('[Error] Code: ' . $response['data']['code']);
Console::error('[Error] Message: ' . $response['data']['message']);
}
} finally {
$register->get('pools')->reclaim();
}
});
@@ -718,6 +696,8 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re
if ($th->getCode() === 1008) {
$server->close($connection, $th->getCode());
}
} finally {
$register->get('pools')->reclaim();
}
});
-1
View File
@@ -144,7 +144,6 @@ $image = $this->getParam('image', '');
- _APP_LOGGING_CONFIG
- _APP_MAINTENANCE_INTERVAL
- _APP_MAINTENANCE_DELAY
- _APP_MAINTENANCE_START_TIME
- _APP_MAINTENANCE_RETENTION_EXECUTION
- _APP_MAINTENANCE_RETENTION_CACHE
- _APP_MAINTENANCE_RETENTION_ABUSE
+52 -17
View File
@@ -20,12 +20,10 @@ use Appwrite\Platform\Appwrite;
use Executor\Executor;
use Swoole\Runtime;
use Utopia\Abuse\Adapters\TimeLimit\Redis as TimeLimitRedis;
use Utopia\Cache\Adapter\Pool as CachePool;
use Utopia\Cache\Adapter\Sharding;
use Utopia\Cache\Cache;
use Utopia\CLI\Console;
use Utopia\Config\Config;
use Utopia\Database\Adapter\Pool as DatabasePool;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
@@ -35,7 +33,6 @@ use Utopia\Logger\Log;
use Utopia\Logger\Logger;
use Utopia\Platform\Service;
use Utopia\Pools\Group;
use Utopia\Queue\Broker\Pool as BrokerPool;
use Utopia\Queue\Message;
use Utopia\Queue\Publisher;
use Utopia\Queue\Server;
@@ -43,17 +40,21 @@ use Utopia\Registry\Registry;
use Utopia\System\System;
Authorization::disable();
Runtime::enableCoroutine();
Runtime::enableCoroutine(SWOOLE_HOOK_ALL);
Server::setResource('register', fn () => $register);
Server::setResource('dbForPlatform', function (Cache $cache, Registry $register) {
$pools = $register->get('pools');
$adapter = new DatabasePool($pools->get('console'));
$dbForPlatform = new Database($adapter, $cache);
$dbForPlatform->setNamespace('_console');
$database = $pools
->get('console')
->pop()
->getResource();
return $dbForPlatform;
$adapter = new Database($database, $cache);
$adapter->setNamespace('_console');
return $adapter;
}, ['cache', 'register']);
Server::setResource('project', function (Message $message, Database $dbForPlatform) {
@@ -81,9 +82,20 @@ Server::setResource('dbForProject', function (Cache $cache, Registry $register,
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
$adapter = new DatabasePool($pools->get($dsn->getHost()));
$adapter = $pools
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($adapter, $cache);
try {
$dsn = new DSN($project->getAttribute('database'));
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
$sharedTables = \explode(',', System::getEnv('_APP_DATABASE_SHARED_TABLES', ''));
if (\in_array($dsn->getHost(), $sharedTables)) {
@@ -138,8 +150,12 @@ Server::setResource('getProjectDB', function (Group $pools, Database $dbForPlatf
return $database;
}
$adapter = new DatabasePool($pools->get($dsn->getHost()));
$database = new Database($adapter, $cache);
$dbAdapter = $pools
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($dbAdapter, $cache);
$databases[$dsn->getHost()] = $database;
@@ -171,8 +187,15 @@ Server::setResource('getLogsDB', function (Group $pools, Cache $cache) {
return $database;
}
$adapter = new DatabasePool($pools->get('logs'));
$database = new Database($adapter, $cache);
$dbAdapter = $pools
->get('logs')
->pop()
->getResource();
$database = new Database(
$dbAdapter,
$cache
);
$database
->setSharedTables(true)
@@ -210,7 +233,11 @@ Server::setResource('cache', function (Registry $register) {
$adapters = [];
foreach ($list as $value) {
$adapters[] = new CachePool($pools->get($value));
$adapters[] = $pools
->get($value)
->pop()
->getResource()
;
}
return new Cache(new Sharding($adapters));
@@ -240,11 +267,11 @@ Server::setResource('timelimit', function (\Redis $redis) {
Server::setResource('log', fn () => new Log());
Server::setResource('publisher', function (Group $pools) {
return new BrokerPool(publisher: $pools->get('publisher'));
return $pools->get('publisher')->pop()->getResource();
}, ['pools']);
Server::setResource('consumer', function (Group $pools) {
return new BrokerPool(consumer: $pools->get('consumer'));
return $pools->get('consumer')->pop()->getResource();
}, ['pools']);
Server::setResource('queueForStatsUsage', function (Publisher $publisher) {
@@ -421,6 +448,13 @@ try {
$worker = $platform->getWorker();
$worker
->shutdown()
->inject('pools')
->action(function (Group $pools) {
$pools->reclaim();
});
$worker
->error()
->inject('error')
@@ -428,7 +462,8 @@ $worker
->inject('log')
->inject('pools')
->inject('project')
->action(function (Throwable $error, ?Logger $logger, Log $log, Group $pools, Document $project) use ($worker, $queueName) {
->action(function (Throwable $error, ?Logger $logger, Log $log, Group $pools, Document $project) use ($queueName) {
$pools->reclaim();
$version = System::getEnv('_APP_VERSION', 'UNKNOWN');
if ($logger) {
+8 -8
View File
@@ -30,7 +30,7 @@
}
},
"require": {
"php": ">=8.3.0",
"php": ">=8.0.0",
"ext-curl": "*",
"ext-imagick": "*",
"ext-mbstring": "*",
@@ -48,10 +48,10 @@
"utopia-php/abuse": "0.52.*",
"utopia-php/analytics": "0.10.*",
"utopia-php/audit": "0.55.*",
"utopia-php/cache": "0.13.*",
"utopia-php/cache": "0.12.*",
"utopia-php/cli": "0.15.*",
"utopia-php/config": "0.2.*",
"utopia-php/database": "0.69.*",
"utopia-php/database": "0.66.*",
"utopia-php/domains": "0.5.*",
"utopia-php/dsn": "0.2.1",
"utopia-php/framework": "0.33.*",
@@ -59,13 +59,13 @@
"utopia-php/image": "0.8.*",
"utopia-php/locale": "0.4.*",
"utopia-php/logger": "0.6.*",
"utopia-php/messaging": "0.17.*",
"utopia-php/migration": "0.9.*",
"utopia-php/messaging": "0.16.*",
"utopia-php/migration": "0.8.*",
"utopia-php/orchestration": "0.9.*",
"utopia-php/platform": "0.7.*",
"utopia-php/pools": "0.8.*",
"utopia-php/preloader": "0.2.*",
"utopia-php/queue": "0.10.*",
"utopia-php/queue": "0.9.*",
"utopia-php/registry": "0.5.*",
"utopia-php/storage": "0.18.*",
"utopia-php/swoole": "0.8.*",
@@ -99,8 +99,8 @@
"php": "8.3"
},
"allow-plugins": {
"php-http/discovery": true,
"tbachert/spi": true
"php-http/discovery": false,
"tbachert/spi": false
}
}
}
Generated
+163 -175
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "63feb1a7cf4cfa2cc7fa0870236e61ea",
"content-hash": "35fd85e8d566d20d8177266469c5ebcb",
"packages": [
{
"name": "adhocore/jwt",
@@ -709,16 +709,16 @@
},
{
"name": "google/protobuf",
"version": "v4.31.0",
"version": "v4.30.2",
"source": {
"type": "git",
"url": "https://github.com/protocolbuffers/protobuf-php.git",
"reference": "d59e31ce4bf0e4b48728e90c4d880839edb5be07"
"reference": "a4c4d8565b40b9f76debc9dfeb221412eacb8ced"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/d59e31ce4bf0e4b48728e90c4d880839edb5be07",
"reference": "d59e31ce4bf0e4b48728e90c4d880839edb5be07",
"url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/a4c4d8565b40b9f76debc9dfeb221412eacb8ced",
"reference": "a4c4d8565b40b9f76debc9dfeb221412eacb8ced",
"shasum": ""
},
"require": {
@@ -747,9 +747,9 @@
"proto"
],
"support": {
"source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.31.0"
"source": "https://github.com/protocolbuffers/protobuf-php/tree/v4.30.2"
},
"time": "2025-05-14T16:17:23+00:00"
"time": "2025-03-26T18:01:50+00:00"
},
{
"name": "league/csv",
@@ -1109,16 +1109,16 @@
},
{
"name": "open-telemetry/api",
"version": "1.3.0",
"version": "1.2.3",
"source": {
"type": "git",
"url": "https://github.com/opentelemetry-php/api.git",
"reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86"
"reference": "199d7ddda88f5f5619fa73463f1a5a7149ccd1f1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opentelemetry-php/api/zipball/4e3bb38e069876fb73c2ce85c89583bf2b28cd86",
"reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86",
"url": "https://api.github.com/repos/opentelemetry-php/api/zipball/199d7ddda88f5f5619fa73463f1a5a7149ccd1f1",
"reference": "199d7ddda88f5f5619fa73463f1a5a7149ccd1f1",
"shasum": ""
},
"require": {
@@ -1175,20 +1175,20 @@
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
"source": "https://github.com/open-telemetry/opentelemetry-php"
},
"time": "2025-05-07T12:32:21+00:00"
"time": "2025-03-05T21:42:54+00:00"
},
{
"name": "open-telemetry/context",
"version": "1.2.1",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/opentelemetry-php/context.git",
"reference": "1eb2b837ee9362db064a6b65d5ecce15a9f9f020"
"reference": "0cba875ea1953435f78aec7f1d75afa87bdbf7f3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opentelemetry-php/context/zipball/1eb2b837ee9362db064a6b65d5ecce15a9f9f020",
"reference": "1eb2b837ee9362db064a6b65d5ecce15a9f9f020",
"url": "https://api.github.com/repos/opentelemetry-php/context/zipball/0cba875ea1953435f78aec7f1d75afa87bdbf7f3",
"reference": "0cba875ea1953435f78aec7f1d75afa87bdbf7f3",
"shasum": ""
},
"require": {
@@ -1234,20 +1234,20 @@
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
"source": "https://github.com/open-telemetry/opentelemetry-php"
},
"time": "2025-05-07T23:36:50+00:00"
"time": "2024-08-21T00:29:20+00:00"
},
{
"name": "open-telemetry/exporter-otlp",
"version": "1.3.0",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/opentelemetry-php/exporter-otlp.git",
"reference": "19adf03d2b0f91f9e9b1c7f93db6c755c737cf6c"
"reference": "b7580440b7481a98da97aceabeb46e1b276c8747"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/19adf03d2b0f91f9e9b1c7f93db6c755c737cf6c",
"reference": "19adf03d2b0f91f9e9b1c7f93db6c755c737cf6c",
"url": "https://api.github.com/repos/opentelemetry-php/exporter-otlp/zipball/b7580440b7481a98da97aceabeb46e1b276c8747",
"reference": "b7580440b7481a98da97aceabeb46e1b276c8747",
"shasum": ""
},
"require": {
@@ -1298,7 +1298,7 @@
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
"source": "https://github.com/open-telemetry/opentelemetry-php"
},
"time": "2025-05-12T00:36:35+00:00"
"time": "2025-03-06T23:21:56+00:00"
},
{
"name": "open-telemetry/gen-otlp-protobuf",
@@ -1365,16 +1365,16 @@
},
{
"name": "open-telemetry/sdk",
"version": "1.4.0",
"version": "1.2.4",
"source": {
"type": "git",
"url": "https://github.com/opentelemetry-php/sdk.git",
"reference": "939d3a28395c249a763676458140dad44b3a8011"
"reference": "47fcb66ae5328c5a799195247b1dce551d85873e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/939d3a28395c249a763676458140dad44b3a8011",
"reference": "939d3a28395c249a763676458140dad44b3a8011",
"url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/47fcb66ae5328c5a799195247b1dce551d85873e",
"reference": "47fcb66ae5328c5a799195247b1dce551d85873e",
"shasum": ""
},
"require": {
@@ -1451,20 +1451,20 @@
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
"source": "https://github.com/open-telemetry/opentelemetry-php"
},
"time": "2025-05-07T12:32:21+00:00"
"time": "2025-04-15T07:02:07+00:00"
},
{
"name": "open-telemetry/sem-conv",
"version": "1.32.0",
"version": "1.30.0",
"source": {
"type": "git",
"url": "https://github.com/opentelemetry-php/sem-conv.git",
"reference": "16585cc0dbc3032a318e274043454679430d2ebf"
"reference": "4178c9f390da8e4dbca9b181a9d1efd50cf7ee0a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/16585cc0dbc3032a318e274043454679430d2ebf",
"reference": "16585cc0dbc3032a318e274043454679430d2ebf",
"url": "https://api.github.com/repos/opentelemetry-php/sem-conv/zipball/4178c9f390da8e4dbca9b181a9d1efd50cf7ee0a",
"reference": "4178c9f390da8e4dbca9b181a9d1efd50cf7ee0a",
"shasum": ""
},
"require": {
@@ -1508,7 +1508,7 @@
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
"source": "https://github.com/open-telemetry/opentelemetry-php"
},
"time": "2025-05-05T03:58:53+00:00"
"time": "2025-02-06T00:21:48+00:00"
},
{
"name": "paragonie/constant_time_encoding",
@@ -2726,20 +2726,19 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.32.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493"
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493",
"reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
"shasum": ""
},
"require": {
"ext-iconv": "*",
"php": ">=7.2"
},
"provide": {
@@ -2787,7 +2786,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
},
"funding": [
{
@@ -2803,11 +2802,11 @@
"type": "tidelift"
}
],
"time": "2024-12-23T08:48:59+00:00"
"time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-php82",
"version": "v1.32.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php82.git",
@@ -2863,7 +2862,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php82/tree/v1.32.0"
"source": "https://github.com/symfony/polyfill-php82/tree/v1.31.0"
},
"funding": [
{
@@ -3301,16 +3300,16 @@
},
{
"name": "utopia-php/cache",
"version": "0.13.1",
"version": "0.12.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/cache.git",
"reference": "97220cb3b3822b166ee016d1646e2ae2815dc540"
"reference": "646038f1d470b759c129348be8fc14da3c00bbd9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/97220cb3b3822b166ee016d1646e2ae2815dc540",
"reference": "97220cb3b3822b166ee016d1646e2ae2815dc540",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/646038f1d470b759c129348be8fc14da3c00bbd9",
"reference": "646038f1d470b759c129348be8fc14da3c00bbd9",
"shasum": ""
},
"require": {
@@ -3318,7 +3317,6 @@
"ext-memcached": "*",
"ext-redis": "*",
"php": ">=8.0",
"utopia-php/pools": "0.8.*",
"utopia-php/telemetry": "0.1.*"
},
"require-dev": {
@@ -3347,9 +3345,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/cache/issues",
"source": "https://github.com/utopia-php/cache/tree/0.13.1"
"source": "https://github.com/utopia-php/cache/tree/0.12.0"
},
"time": "2025-05-09T14:43:52+00:00"
"time": "2025-02-25T09:09:21+00:00"
},
{
"name": "utopia-php/cli",
@@ -3499,23 +3497,23 @@
},
{
"name": "utopia-php/database",
"version": "0.69.5",
"version": "0.66.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "4abe53609dfc23b2ea82884d12b149df6a8af2f5"
"reference": "67d2ab418efba31dc76b3564cf043e2b3f98d027"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/4abe53609dfc23b2ea82884d12b149df6a8af2f5",
"reference": "4abe53609dfc23b2ea82884d12b149df6a8af2f5",
"url": "https://api.github.com/repos/utopia-php/database/zipball/67d2ab418efba31dc76b3564cf043e2b3f98d027",
"reference": "67d2ab418efba31dc76b3564cf043e2b3f98d027",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-pdo": "*",
"php": ">=8.1",
"utopia-php/cache": "0.13.*",
"utopia-php/cache": "0.12.*",
"utopia-php/framework": "0.33.*",
"utopia-php/pools": "0.8.*"
},
@@ -3549,9 +3547,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/0.69.5"
"source": "https://github.com/utopia-php/database/tree/0.66.0"
},
"time": "2025-05-17T08:01:51+00:00"
"time": "2025-04-16T07:10:27+00:00"
},
{
"name": "utopia-php/domains",
@@ -3701,16 +3699,16 @@
},
{
"name": "utopia-php/framework",
"version": "0.33.20",
"version": "0.33.19",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/http.git",
"reference": "e1c7ab4e0b5b0a9a70256b1e00912e101e76a131"
"reference": "64c7b7bb8a8595ffe875fa8d4b7705684dbf46c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/http/zipball/e1c7ab4e0b5b0a9a70256b1e00912e101e76a131",
"reference": "e1c7ab4e0b5b0a9a70256b1e00912e101e76a131",
"url": "https://api.github.com/repos/utopia-php/http/zipball/64c7b7bb8a8595ffe875fa8d4b7705684dbf46c0",
"reference": "64c7b7bb8a8595ffe875fa8d4b7705684dbf46c0",
"shasum": ""
},
"require": {
@@ -3742,22 +3740,22 @@
],
"support": {
"issues": "https://github.com/utopia-php/http/issues",
"source": "https://github.com/utopia-php/http/tree/0.33.20"
"source": "https://github.com/utopia-php/http/tree/0.33.19"
},
"time": "2025-05-18T23:51:21+00:00"
"time": "2025-03-06T11:37:49+00:00"
},
{
"name": "utopia-php/image",
"version": "0.8.3",
"version": "0.8.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/image.git",
"reference": "8820b0e53b3636b7bdf815e92394d333fef06f26"
"reference": "6c736965177f9a9e71311e22b80cfa88511768e9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/image/zipball/8820b0e53b3636b7bdf815e92394d333fef06f26",
"reference": "8820b0e53b3636b7bdf815e92394d333fef06f26",
"url": "https://api.github.com/repos/utopia-php/image/zipball/6c736965177f9a9e71311e22b80cfa88511768e9",
"reference": "6c736965177f9a9e71311e22b80cfa88511768e9",
"shasum": ""
},
"require": {
@@ -3791,9 +3789,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/image/issues",
"source": "https://github.com/utopia-php/image/tree/0.8.3"
"source": "https://github.com/utopia-php/image/tree/0.8.2"
},
"time": "2025-05-15T10:39:28+00:00"
"time": "2025-04-08T11:31:45+00:00"
},
{
"name": "utopia-php/locale",
@@ -3902,16 +3900,16 @@
},
{
"name": "utopia-php/messaging",
"version": "0.17.0",
"version": "0.16.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/messaging.git",
"reference": "c51915d0e030db3a3add37f1561751d18b2d9a85"
"reference": "5f3083697102b1821d6624938186761b1e09c54e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/messaging/zipball/c51915d0e030db3a3add37f1561751d18b2d9a85",
"reference": "c51915d0e030db3a3add37f1561751d18b2d9a85",
"url": "https://api.github.com/repos/utopia-php/messaging/zipball/5f3083697102b1821d6624938186761b1e09c54e",
"reference": "5f3083697102b1821d6624938186761b1e09c54e",
"shasum": ""
},
"require": {
@@ -3947,22 +3945,22 @@
],
"support": {
"issues": "https://github.com/utopia-php/messaging/issues",
"source": "https://github.com/utopia-php/messaging/tree/0.17.0"
"source": "https://github.com/utopia-php/messaging/tree/0.16.0"
},
"time": "2025-05-12T16:14:08+00:00"
"time": "2025-02-18T08:27:00+00:00"
},
{
"name": "utopia-php/migration",
"version": "0.9.3",
"version": "0.8.6",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/migration.git",
"reference": "e518d39eb550fde36bc5cf06c9bd7b2faf5dbedd"
"reference": "84163e16edc0b2e64c34ad7b7c4cc5f05d762daf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/migration/zipball/e518d39eb550fde36bc5cf06c9bd7b2faf5dbedd",
"reference": "e518d39eb550fde36bc5cf06c9bd7b2faf5dbedd",
"url": "https://api.github.com/repos/utopia-php/migration/zipball/84163e16edc0b2e64c34ad7b7c4cc5f05d762daf",
"reference": "84163e16edc0b2e64c34ad7b7c4cc5f05d762daf",
"shasum": ""
},
"require": {
@@ -4003,9 +4001,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/migration/issues",
"source": "https://github.com/utopia-php/migration/tree/0.9.3"
"source": "https://github.com/utopia-php/migration/tree/0.8.6"
},
"time": "2025-05-01T05:41:26+00:00"
"time": "2025-04-14T08:22:09+00:00"
},
{
"name": "utopia-php/orchestration",
@@ -4059,16 +4057,16 @@
},
{
"name": "utopia-php/platform",
"version": "0.7.7",
"version": "0.7.4",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/platform.git",
"reference": "8c43cd866148a7c4c495e3401268429e338004b3"
"reference": "a5b93d8177702ec458c3af9137663133c012b71b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/platform/zipball/8c43cd866148a7c4c495e3401268429e338004b3",
"reference": "8c43cd866148a7c4c495e3401268429e338004b3",
"url": "https://api.github.com/repos/utopia-php/platform/zipball/a5b93d8177702ec458c3af9137663133c012b71b",
"reference": "a5b93d8177702ec458c3af9137663133c012b71b",
"shasum": ""
},
"require": {
@@ -4077,11 +4075,11 @@
"php": ">=8.0",
"utopia-php/cli": "0.15.*",
"utopia-php/framework": "0.33.*",
"utopia-php/queue": "0.10.*"
"utopia-php/queue": "0.9.*"
},
"require-dev": {
"laravel/pint": "1.*",
"phpunit/phpunit": "9.*"
"laravel/pint": "1.2.*",
"phpunit/phpunit": "^9.3"
},
"type": "library",
"autoload": {
@@ -4103,9 +4101,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/platform/issues",
"source": "https://github.com/utopia-php/platform/tree/0.7.7"
"source": "https://github.com/utopia-php/platform/tree/0.7.4"
},
"time": "2025-05-20T09:23:44+00:00"
"time": "2025-03-13T13:00:12+00:00"
},
{
"name": "utopia-php/pools",
@@ -4214,16 +4212,16 @@
},
{
"name": "utopia-php/queue",
"version": "0.10.0",
"version": "0.9.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/queue.git",
"reference": "0eccc559168ea72241c39a4c482d868314666be1"
"reference": "32b6f84c55aae761db5a5ae76cc91ca8dbc8bc32"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/queue/zipball/0eccc559168ea72241c39a4c482d868314666be1",
"reference": "0eccc559168ea72241c39a4c482d868314666be1",
"url": "https://api.github.com/repos/utopia-php/queue/zipball/32b6f84c55aae761db5a5ae76cc91ca8dbc8bc32",
"reference": "32b6f84c55aae761db5a5ae76cc91ca8dbc8bc32",
"shasum": ""
},
"require": {
@@ -4232,7 +4230,6 @@
"utopia-php/cli": "0.15.*",
"utopia-php/fetch": "0.4.*",
"utopia-php/framework": "0.33.*",
"utopia-php/pools": "0.8.*",
"utopia-php/telemetry": "0.1.*"
},
"require-dev": {
@@ -4274,9 +4271,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/queue/issues",
"source": "https://github.com/utopia-php/queue/tree/0.10.0"
"source": "https://github.com/utopia-php/queue/tree/0.9.1"
},
"time": "2025-04-17T12:15:52+00:00"
"time": "2025-03-28T19:49:36+00:00"
},
{
"name": "utopia-php/registry",
@@ -4332,16 +4329,16 @@
},
{
"name": "utopia-php/storage",
"version": "0.18.12",
"version": "0.18.10",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/storage.git",
"reference": "9a2556c39b5f4d9f8e79111fd34ec889b7bb1e97"
"reference": "76f31158f4251abb207f7a9b16f7cb0bfdb3b39e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/storage/zipball/9a2556c39b5f4d9f8e79111fd34ec889b7bb1e97",
"reference": "9a2556c39b5f4d9f8e79111fd34ec889b7bb1e97",
"url": "https://api.github.com/repos/utopia-php/storage/zipball/76f31158f4251abb207f7a9b16f7cb0bfdb3b39e",
"reference": "76f31158f4251abb207f7a9b16f7cb0bfdb3b39e",
"shasum": ""
},
"require": {
@@ -4354,10 +4351,9 @@
"ext-xz": "*",
"ext-zlib": "*",
"ext-zstd": "*",
"php": ">=8.1",
"php": ">=8.0",
"utopia-php/framework": "0.*.*",
"utopia-php/system": "0.*.*",
"utopia-php/telemetry": "0.1.*"
"utopia-php/system": "0.*.*"
},
"require-dev": {
"laravel/pint": "1.2.*",
@@ -4384,9 +4380,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/storage/issues",
"source": "https://github.com/utopia-php/storage/tree/0.18.12"
"source": "https://github.com/utopia-php/storage/tree/0.18.10"
},
"time": "2025-05-15T07:55:58+00:00"
"time": "2025-03-03T10:47:54+00:00"
},
{
"name": "utopia-php/swoole",
@@ -4547,28 +4543,28 @@
},
{
"name": "utopia-php/vcs",
"version": "0.9.5",
"version": "0.9.4",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/vcs.git",
"reference": "055956545ca7ab4e8688df5de1df3e2833859793"
"reference": "1a8d280b176acc99ea8d9e7364b8767cbb206b4a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/vcs/zipball/055956545ca7ab4e8688df5de1df3e2833859793",
"reference": "055956545ca7ab4e8688df5de1df3e2833859793",
"url": "https://api.github.com/repos/utopia-php/vcs/zipball/1a8d280b176acc99ea8d9e7364b8767cbb206b4a",
"reference": "1a8d280b176acc99ea8d9e7364b8767cbb206b4a",
"shasum": ""
},
"require": {
"adhocore/jwt": "^1.1",
"php": ">=8.0",
"utopia-php/cache": "0.13.*",
"utopia-php/cache": "0.12.*",
"utopia-php/framework": "0.*.*",
"utopia-php/system": "0.9.*"
},
"require-dev": {
"laravel/pint": "1.*.*",
"phpstan/phpstan": "1.*.*",
"laravel/pint": "1.2.*",
"phpstan/phpstan": "1.8.*",
"phpunit/phpunit": "^9.4"
},
"type": "library",
@@ -4591,22 +4587,22 @@
],
"support": {
"issues": "https://github.com/utopia-php/vcs/issues",
"source": "https://github.com/utopia-php/vcs/tree/0.9.5"
"source": "https://github.com/utopia-php/vcs/tree/0.9.4"
},
"time": "2025-04-17T04:38:49+00:00"
"time": "2025-03-13T10:09:45+00:00"
},
{
"name": "utopia-php/websocket",
"version": "0.3.1",
"version": "0.3.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/websocket.git",
"reference": "77004ba9f66a0ab6eb840a85b2af332fca8f6bd9"
"reference": "629e53640b108eab43c7cc9ab375efade8622d43"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/websocket/zipball/77004ba9f66a0ab6eb840a85b2af332fca8f6bd9",
"reference": "77004ba9f66a0ab6eb840a85b2af332fca8f6bd9",
"url": "https://api.github.com/repos/utopia-php/websocket/zipball/629e53640b108eab43c7cc9ab375efade8622d43",
"reference": "629e53640b108eab43c7cc9ab375efade8622d43",
"shasum": ""
},
"require": {
@@ -4640,9 +4636,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/websocket/issues",
"source": "https://github.com/utopia-php/websocket/tree/0.3.1"
"source": "https://github.com/utopia-php/websocket/tree/0.3.0"
},
"time": "2025-05-09T12:57:42+00:00"
"time": "2025-03-28T01:11:13+00:00"
},
{
"name": "webmozart/assert",
@@ -4771,16 +4767,16 @@
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "0.40.18",
"version": "0.40.15",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "38de4b9c58112d7e83eb75955994c8412a401093"
"reference": "65c708b931b29b3e01c5cc7504a734ce2cc3dc95"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/38de4b9c58112d7e83eb75955994c8412a401093",
"reference": "38de4b9c58112d7e83eb75955994c8412a401093",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/65c708b931b29b3e01c5cc7504a734ce2cc3dc95",
"reference": "65c708b931b29b3e01c5cc7504a734ce2cc3dc95",
"shasum": ""
},
"require": {
@@ -4816,9 +4812,9 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
"source": "https://github.com/appwrite/sdk-generator/tree/0.40.18"
"source": "https://github.com/appwrite/sdk-generator/tree/0.40.15"
},
"time": "2025-05-21T14:14:47+00:00"
"time": "2025-04-25T08:50:44+00:00"
},
{
"name": "doctrine/annotations",
@@ -5045,16 +5041,16 @@
},
{
"name": "laravel/pint",
"version": "v1.22.1",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/pint.git",
"reference": "941d1927c5ca420c22710e98420287169c7bcaf7"
"reference": "7ddfaa6523a675fae5c4123ee38fc6bfb8ee4f36"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/941d1927c5ca420c22710e98420287169c7bcaf7",
"reference": "941d1927c5ca420c22710e98420287169c7bcaf7",
"url": "https://api.github.com/repos/laravel/pint/zipball/7ddfaa6523a675fae5c4123ee38fc6bfb8ee4f36",
"reference": "7ddfaa6523a675fae5c4123ee38fc6bfb8ee4f36",
"shasum": ""
},
"require": {
@@ -5066,11 +5062,11 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.75.0",
"illuminate/view": "^11.44.7",
"larastan/larastan": "^3.4.0",
"illuminate/view": "^11.44.2",
"larastan/larastan": "^3.3.1",
"laravel-zero/framework": "^11.36.1",
"mockery/mockery": "^1.6.12",
"nunomaduro/termwind": "^2.3.1",
"nunomaduro/termwind": "^2.3",
"pestphp/pest": "^2.36.0"
},
"bin": [
@@ -5107,7 +5103,7 @@
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
"time": "2025-05-08T08:38:12+00:00"
"time": "2025-04-08T22:11:45+00:00"
},
{
"name": "matthiasmullie/minify",
@@ -5235,16 +5231,16 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.13.1",
"version": "1.13.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c"
"reference": "024473a478be9df5fdaca2c793f2232fe788e414"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c",
"reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/024473a478be9df5fdaca2c793f2232fe788e414",
"reference": "024473a478be9df5fdaca2c793f2232fe788e414",
"shasum": ""
},
"require": {
@@ -5283,7 +5279,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.13.1"
"source": "https://github.com/myclabs/DeepCopy/tree/1.13.0"
},
"funding": [
{
@@ -5291,7 +5287,7 @@
"type": "tidelift"
}
],
"time": "2025-04-29T12:36:36+00:00"
"time": "2025-02-12T12:17:51+00:00"
},
{
"name": "nikic/php-parser",
@@ -5939,16 +5935,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.6.23",
"version": "9.6.22",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "43d2cb18d0675c38bd44982a5d1d88f6d53d8d95"
"reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/43d2cb18d0675c38bd44982a5d1d88f6d53d8d95",
"reference": "43d2cb18d0675c38bd44982a5d1d88f6d53d8d95",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f80235cb4d3caa59ae09be3adf1ded27521d1a9c",
"reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c",
"shasum": ""
},
"require": {
@@ -5959,7 +5955,7 @@
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.13.1",
"myclabs/deep-copy": "^1.12.1",
"phar-io/manifest": "^2.0.4",
"phar-io/version": "^3.2.1",
"php": ">=7.3",
@@ -6022,7 +6018,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.23"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22"
},
"funding": [
{
@@ -6033,20 +6029,12 @@
"url": "https://github.com/sebastianbergmann",
"type": "github"
},
{
"url": "https://liberapay.com/sebastianbergmann",
"type": "liberapay"
},
{
"url": "https://thanks.dev/u/gh/sebastianbergmann",
"type": "thanks_dev"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
"type": "tidelift"
}
],
"time": "2025-05-02T06:40:34+00:00"
"time": "2024-12-05T13:48:26+00:00"
},
{
"name": "psr/cache",
@@ -7158,16 +7146,16 @@
},
{
"name": "symfony/console",
"version": "v7.2.6",
"version": "v7.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218"
"reference": "e51498ea18570c062e7df29d05a7003585b19b88"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/0e2e3f38c192e93e622e41ec37f4ca70cfedf218",
"reference": "0e2e3f38c192e93e622e41ec37f4ca70cfedf218",
"url": "https://api.github.com/repos/symfony/console/zipball/e51498ea18570c062e7df29d05a7003585b19b88",
"reference": "e51498ea18570c062e7df29d05a7003585b19b88",
"shasum": ""
},
"require": {
@@ -7231,7 +7219,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v7.2.6"
"source": "https://github.com/symfony/console/tree/v7.2.5"
},
"funding": [
{
@@ -7247,7 +7235,7 @@
"type": "tidelift"
}
],
"time": "2025-04-07T19:09:28+00:00"
"time": "2025-03-12T08:11:12+00:00"
},
{
"name": "symfony/filesystem",
@@ -7448,7 +7436,7 @@
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.32.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
@@ -7507,7 +7495,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
},
"funding": [
{
@@ -7527,7 +7515,7 @@
},
{
"name": "symfony/polyfill-intl-grapheme",
"version": "v1.32.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
@@ -7585,7 +7573,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0"
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0"
},
"funding": [
{
@@ -7605,7 +7593,7 @@
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.32.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
@@ -7666,7 +7654,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0"
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0"
},
"funding": [
{
@@ -7686,7 +7674,7 @@
},
{
"name": "symfony/polyfill-php81",
"version": "v1.32.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
@@ -7742,7 +7730,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php81/tree/v1.32.0"
"source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0"
},
"funding": [
{
@@ -7823,16 +7811,16 @@
},
{
"name": "symfony/string",
"version": "v7.2.6",
"version": "v7.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931"
"reference": "446e0d146f991dde3e73f45f2c97a9faad773c82"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/a214fe7d62bd4df2a76447c67c6b26e1d5e74931",
"reference": "a214fe7d62bd4df2a76447c67c6b26e1d5e74931",
"url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82",
"reference": "446e0d146f991dde3e73f45f2c97a9faad773c82",
"shasum": ""
},
"require": {
@@ -7890,7 +7878,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v7.2.6"
"source": "https://github.com/symfony/string/tree/v7.2.0"
},
"funding": [
{
@@ -7906,7 +7894,7 @@
"type": "tidelift"
}
],
"time": "2025-04-20T20:18:16+00:00"
"time": "2024-11-13T13:31:26+00:00"
},
{
"name": "textalk/websocket",
@@ -8142,7 +8130,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=8.3.0",
"php": ">=8.0.0",
"ext-curl": "*",
"ext-imagick": "*",
"ext-mbstring": "*",
+1 -1
View File
@@ -732,7 +732,7 @@ services:
- _APP_MAINTENANCE_RETENTION_AUDIT_CONSOLE
- _APP_MAINTENANCE_RETENTION_USAGE_HOURLY
- _APP_MAINTENANCE_RETENTION_SCHEDULES
- _APP_MAINTENANCE_START_TIME
- _APP_MAINTENANCE_DELAY
- _APP_DATABASE_SHARED_TABLES
appwrite-task-stats-resources:
@@ -1,14 +0,0 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
Databases databases = Databases(client);
DocumentList result = await databases.createDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documents: [],
);
@@ -1,14 +0,0 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
await databases.deleteDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [], // (optional)
);
@@ -1,15 +0,0 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
DocumentList result = await databases.updateDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
data: {}, // (optional)
queries: [], // (optional)
);
@@ -1,14 +0,0 @@
import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
DocumentList result = await databases.upsertDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documents: [], // (optional)
);
@@ -1,14 +0,0 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const databases = new Databases(client);
const response = await databases.createDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
[] // documents
);
@@ -1,14 +0,0 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.deleteDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
[] // queries (optional)
);
@@ -1,15 +0,0 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.updateDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
{}, // data (optional)
[] // queries (optional)
);
@@ -1,14 +0,0 @@
import { Client, Databases } from "https://deno.land/x/appwrite/mod.ts";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new Databases(client);
const response = await databases.upsertDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
[] // documents (optional)
);
@@ -1,16 +0,0 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetSession(""); // The user session to authenticate with
Databases databases = new Databases(client);
DocumentList result = await databases.CreateDocuments(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documents: new List<object>()
);
@@ -1,16 +0,0 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
await databases.DeleteDocuments(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
queries: new List<string>() // optional
);
@@ -1,17 +0,0 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
DocumentList result = await databases.UpdateDocuments(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
data: [object], // optional
queries: new List<string>() // optional
);
@@ -1,16 +0,0 @@
using Appwrite;
using Appwrite.Models;
using Appwrite.Services;
Client client = new Client()
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
.SetKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
DocumentList result = await databases.UpsertDocuments(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documents: new List<object>() // optional
);
@@ -1,28 +0,0 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/databases"
)
func main() {
client := client.NewClient()
client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
client.SetSession("") // The user session to authenticate with
service := databases.NewDatabases(client)
response, error := service.CreateDocuments(
"<DATABASE_ID>",
"<COLLECTION_ID>",
[]interface{}{},
)
if error != nil {
panic(error)
}
fmt.Println(response)
}
@@ -1,28 +0,0 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/databases"
)
func main() {
client := client.NewClient()
client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
client.SetKey("<YOUR_API_KEY>") // Your secret API key
service := databases.NewDatabases(client)
response, error := service.DeleteDocuments(
"<DATABASE_ID>",
"<COLLECTION_ID>",
databases.WithDeleteDocumentsQueries([]interface{}{}),
)
if error != nil {
panic(error)
}
fmt.Println(response)
}
@@ -1,29 +0,0 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/databases"
)
func main() {
client := client.NewClient()
client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
client.SetKey("<YOUR_API_KEY>") // Your secret API key
service := databases.NewDatabases(client)
response, error := service.UpdateDocuments(
"<DATABASE_ID>",
"<COLLECTION_ID>",
databases.WithUpdateDocumentsData(map[string]interface{}{}),
databases.WithUpdateDocumentsQueries([]interface{}{}),
)
if error != nil {
panic(error)
}
fmt.Println(response)
}
@@ -1,28 +0,0 @@
package main
import (
"fmt"
"github.com/appwrite/sdk-for-go/client"
"github.com/appwrite/sdk-for-go/databases"
)
func main() {
client := client.NewClient()
client.SetEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
client.SetProject("<YOUR_PROJECT_ID>") // Your project ID
client.SetKey("<YOUR_API_KEY>") // Your secret API key
service := databases.NewDatabases(client)
response, error := service.UpsertDocuments(
"<DATABASE_ID>",
"<COLLECTION_ID>",
databases.WithUpsertDocumentsDocuments([]interface{}{}),
)
if error != nil {
panic(error)
}
fmt.Println(response)
}
@@ -1,18 +0,0 @@
mutation {
databasesCreateDocuments(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documents: []
) {
total
documents {
_id
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
}
@@ -1,18 +0,0 @@
mutation {
databasesDeleteDocuments(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
queries: []
) {
total
documents {
_id
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
}
@@ -1,19 +0,0 @@
mutation {
databasesUpdateDocuments(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
data: "{}",
queries: []
) {
total
documents {
_id
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
}
@@ -1,18 +0,0 @@
mutation {
databasesUpsertDocuments(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documents: []
) {
total
documents {
_id
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
}
@@ -1,25 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setSession(""); // The user session to authenticate with
Databases databases = new Databases(client);
databases.createDocuments(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
listOf(), // documents
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
System.out.println(result);
})
);
@@ -1,25 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
databases.deleteDocuments(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
System.out.println(result);
})
);
@@ -1,26 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
databases.updateDocuments(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
mapOf( "a" to "b" ), // data (optional)
listOf(), // queries (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
System.out.println(result);
})
);
@@ -1,25 +0,0 @@
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Databases;
Client client = new Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>"); // Your secret API key
Databases databases = new Databases(client);
databases.upsertDocuments(
"<DATABASE_ID>", // databaseId
"<COLLECTION_ID>", // collectionId
listOf(), // documents (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
System.out.println(result);
})
);
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setSession("") // The user session to authenticate with
val databases = Databases(client)
val response = databases.createDocuments(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
documents = listOf()
)
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>") // Your secret API key
val databases = Databases(client)
val response = databases.deleteDocuments(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
queries = listOf() // optional
)
@@ -1,17 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>") // Your secret API key
val databases = Databases(client)
val response = databases.updateDocuments(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
data = mapOf( "a" to "b" ), // optional
queries = listOf() // optional
)
@@ -1,16 +0,0 @@
import io.appwrite.Client
import io.appwrite.coroutines.CoroutineCallback
import io.appwrite.services.Databases
val client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>") // Your secret API key
val databases = Databases(client)
val response = databases.upsertDocuments(
databaseId = "<DATABASE_ID>",
collectionId = "<COLLECTION_ID>",
documents = listOf() // optional
)
@@ -1,14 +0,0 @@
const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
const databases = new sdk.Databases(client);
const result = await databases.createDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
[] // documents
);
@@ -1,14 +0,0 @@
const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new sdk.Databases(client);
const result = await databases.deleteDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
[] // queries (optional)
);
@@ -1,15 +0,0 @@
const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new sdk.Databases(client);
const result = await databases.updateDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
{}, // data (optional)
[] // queries (optional)
);
@@ -1,14 +0,0 @@
const sdk = require('node-appwrite');
const client = new sdk.Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const databases = new sdk.Databases(client);
const result = await databases.upsertDocuments(
'<DATABASE_ID>', // databaseId
'<COLLECTION_ID>', // collectionId
[] // documents (optional)
);
@@ -1,17 +0,0 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Databases;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with
$databases = new Databases($client);
$result = $databases->createDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documents: []
);
@@ -1,17 +0,0 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Databases;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key
$databases = new Databases($client);
$result = $databases->deleteDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
queries: [] // optional
);
@@ -1,18 +0,0 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Databases;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key
$databases = new Databases($client);
$result = $databases->updateDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
data: [], // optional
queries: [] // optional
);
@@ -1,17 +0,0 @@
<?php
use Appwrite\Client;
use Appwrite\Services\Databases;
$client = (new Client())
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setKey('<YOUR_API_KEY>'); // Your secret API key
$databases = new Databases($client);
$result = $databases->upsertDocuments(
databaseId: '<DATABASE_ID>',
collectionId: '<COLLECTION_ID>',
documents: [] // optional
);
@@ -1,15 +0,0 @@
from appwrite.client import Client
from appwrite.services.databases import Databases
client = Client()
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
client.set_session('') # The user session to authenticate with
databases = Databases(client)
result = databases.create_documents(
database_id = '<DATABASE_ID>',
collection_id = '<COLLECTION_ID>',
documents = []
)
@@ -1,15 +0,0 @@
from appwrite.client import Client
from appwrite.services.databases import Databases
client = Client()
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
client.set_key('<YOUR_API_KEY>') # Your secret API key
databases = Databases(client)
result = databases.delete_documents(
database_id = '<DATABASE_ID>',
collection_id = '<COLLECTION_ID>',
queries = [] # optional
)
@@ -1,16 +0,0 @@
from appwrite.client import Client
from appwrite.services.databases import Databases
client = Client()
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
client.set_key('<YOUR_API_KEY>') # Your secret API key
databases = Databases(client)
result = databases.update_documents(
database_id = '<DATABASE_ID>',
collection_id = '<COLLECTION_ID>',
data = {}, # optional
queries = [] # optional
)
@@ -1,15 +0,0 @@
from appwrite.client import Client
from appwrite.services.databases import Databases
client = Client()
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
client.set_project('<YOUR_PROJECT_ID>') # Your project ID
client.set_key('<YOUR_API_KEY>') # Your secret API key
databases = Databases(client)
result = databases.upsert_documents(
database_id = '<DATABASE_ID>',
collection_id = '<COLLECTION_ID>',
documents = [] # optional
)
@@ -1,12 +0,0 @@
POST /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Session:
X-Appwrite-Key: <YOUR_API_KEY>
X-Appwrite-JWT: <YOUR_JWT>
{
"documents": []
}
@@ -1,10 +0,0 @@
DELETE /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Key: <YOUR_API_KEY>
{
"queries": []
}
@@ -1,11 +0,0 @@
PATCH /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Key: <YOUR_API_KEY>
{
"data": {},
"queries": []
}
@@ -1,10 +0,0 @@
PUT /v1/databases/{databaseId}/collections/{collectionId}/documents HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Key: <YOUR_API_KEY>
{
"documents": []
}
@@ -1,16 +0,0 @@
require 'appwrite'
include Appwrite
client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_session('') # The user session to authenticate with
databases = Databases.new(client)
result = databases.create_documents(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
documents: []
)
@@ -1,16 +0,0 @@
require 'appwrite'
include Appwrite
client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key
databases = Databases.new(client)
result = databases.delete_documents(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
queries: [] # optional
)
@@ -1,17 +0,0 @@
require 'appwrite'
include Appwrite
client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key
databases = Databases.new(client)
result = databases.update_documents(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
data: {}, # optional
queries: [] # optional
)
@@ -1,16 +0,0 @@
require 'appwrite'
include Appwrite
client = Client.new
.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key
databases = Databases.new(client)
result = databases.upsert_documents(
database_id: '<DATABASE_ID>',
collection_id: '<COLLECTION_ID>',
documents: [] # optional
)
@@ -1,15 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setSession("") // The user session to authenticate with
let databases = Databases(client)
let documentList = try await databases.createDocuments(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
documents: []
)
@@ -1,15 +0,0 @@
import Appwrite
let client = Client()
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>") // Your project ID
.setKey("<YOUR_API_KEY>") // Your secret API key
let databases = Databases(client)
let documentList = try await databases.deleteDocuments(
databaseId: "<DATABASE_ID>",
collectionId: "<COLLECTION_ID>",
queries: [] // optional
)

Some files were not shown because too many files have changed in this diff Show More