mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch '1.7.x' of github.com:appwrite/appwrite into delete-project-scope
This commit is contained in:
+1
-1
@@ -251,7 +251,7 @@ CLI::setResource('logError', function (Registry $register) {
|
||||
};
|
||||
}, ['register']);
|
||||
|
||||
CLI::setResource('executor', fn () => new Executor(fn (string $projectId, string $deploymentId) => System::getEnv('_APP_EXECUTOR_HOST')));
|
||||
CLI::setResource('executor', fn () => new Executor());
|
||||
|
||||
CLI::setResource('telemetry', fn () => new NoTelemetry());
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ return [
|
||||
[
|
||||
'key' => 'flutter',
|
||||
'name' => 'Flutter',
|
||||
'version' => '16.1.0',
|
||||
'version' => '17.0.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-flutter',
|
||||
'package' => 'https://pub.dev/packages/appwrite',
|
||||
'enabled' => true,
|
||||
@@ -77,7 +77,7 @@ return [
|
||||
[
|
||||
'key' => 'apple',
|
||||
'name' => 'Apple',
|
||||
'version' => '10.1.0',
|
||||
'version' => '10.1.1',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-apple',
|
||||
'package' => 'https://github.com/appwrite/sdk-for-apple',
|
||||
'enabled' => true,
|
||||
@@ -217,7 +217,7 @@ return [
|
||||
[
|
||||
'key' => 'cli',
|
||||
'name' => 'Command Line',
|
||||
'version' => '7.0.0',
|
||||
'version' => '8.0.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-cli',
|
||||
'package' => 'https://www.npmjs.com/package/appwrite-cli',
|
||||
'enabled' => true,
|
||||
@@ -231,6 +231,11 @@ return [
|
||||
'gitRepoName' => 'sdk-for-cli',
|
||||
'gitUserName' => 'appwrite',
|
||||
'gitBranch' => 'dev',
|
||||
'exclude' => [
|
||||
'services' => [
|
||||
['name' => 'assistant'],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
@@ -411,7 +416,7 @@ return [
|
||||
[
|
||||
'key' => 'swift',
|
||||
'name' => 'Swift',
|
||||
'version' => '10.0.0',
|
||||
'version' => '10.1.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-swift',
|
||||
'package' => 'https://github.com/appwrite/sdk-for-swift',
|
||||
'enabled' => true,
|
||||
|
||||
@@ -4490,6 +4490,29 @@
|
||||
}
|
||||
],
|
||||
"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."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"auth": {
|
||||
"Key": []
|
||||
},
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. 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": {
|
||||
@@ -6595,7 +6618,8 @@
|
||||
"png",
|
||||
"webp",
|
||||
"heic",
|
||||
"avif"
|
||||
"avif",
|
||||
"gif"
|
||||
],
|
||||
"x-enum-name": "ImageFormat",
|
||||
"x-enum-keys": [],
|
||||
|
||||
@@ -9767,6 +9767,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -9792,7 +9793,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -10395,6 +10397,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -10420,7 +10423,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -25957,6 +25961,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -25982,7 +25987,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -26601,6 +26607,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -26626,7 +26633,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -29385,7 +29393,8 @@
|
||||
"png",
|
||||
"webp",
|
||||
"heic",
|
||||
"avif"
|
||||
"avif",
|
||||
"gif"
|
||||
],
|
||||
"x-enum-name": "ImageFormat",
|
||||
"x-enum-keys": [],
|
||||
@@ -34867,6 +34876,17 @@
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"name": "providerReference",
|
||||
"description": "Git reference (branch, tag, commit) to get contents from",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<PROVIDER_REFERENCE>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -8844,6 +8844,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -8869,7 +8870,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -9244,6 +9246,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -9269,7 +9272,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -17490,6 +17494,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -17515,7 +17520,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -17906,6 +17912,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -17931,7 +17938,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -20646,7 +20654,8 @@
|
||||
"png",
|
||||
"webp",
|
||||
"heic",
|
||||
"avif"
|
||||
"avif",
|
||||
"gif"
|
||||
],
|
||||
"x-enum-name": "ImageFormat",
|
||||
"x-enum-keys": [],
|
||||
|
||||
@@ -4636,6 +4636,29 @@
|
||||
}
|
||||
],
|
||||
"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."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"auth": {
|
||||
"Key": []
|
||||
},
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. 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": {
|
||||
@@ -6729,7 +6752,8 @@
|
||||
"png",
|
||||
"webp",
|
||||
"heic",
|
||||
"avif"
|
||||
"avif",
|
||||
"gif"
|
||||
],
|
||||
"x-enum-name": "ImageFormat",
|
||||
"x-enum-keys": [],
|
||||
|
||||
@@ -9835,6 +9835,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -9860,7 +9861,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -10466,6 +10468,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -10491,7 +10494,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -26226,6 +26230,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -26251,7 +26256,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -26873,6 +26879,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -26898,7 +26905,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -29627,7 +29635,8 @@
|
||||
"png",
|
||||
"webp",
|
||||
"heic",
|
||||
"avif"
|
||||
"avif",
|
||||
"gif"
|
||||
],
|
||||
"x-enum-name": "ImageFormat",
|
||||
"x-enum-keys": [],
|
||||
@@ -35086,6 +35095,15 @@
|
||||
"x-example": "<PROVIDER_ROOT_DIRECTORY>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"name": "providerReference",
|
||||
"description": "Git reference (branch, tag, commit) to get contents from",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<PROVIDER_REFERENCE>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -8927,6 +8927,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -8952,7 +8953,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -9340,6 +9342,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -9365,7 +9368,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -17792,6 +17796,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -17817,7 +17822,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -18221,6 +18227,7 @@
|
||||
"dart-3.1",
|
||||
"dart-3.3",
|
||||
"dart-3.5",
|
||||
"dart-3.8",
|
||||
"dotnet-6.0",
|
||||
"dotnet-7.0",
|
||||
"dotnet-8.0",
|
||||
@@ -18246,7 +18253,8 @@
|
||||
"static-1",
|
||||
"flutter-3.24",
|
||||
"flutter-3.27",
|
||||
"flutter-3.29"
|
||||
"flutter-3.29",
|
||||
"flutter-3.32"
|
||||
],
|
||||
"x-enum-name": null,
|
||||
"x-enum-keys": []
|
||||
@@ -20935,7 +20943,8 @@
|
||||
"png",
|
||||
"webp",
|
||||
"heic",
|
||||
"avif"
|
||||
"avif",
|
||||
"gif"
|
||||
],
|
||||
"x-enum-name": "ImageFormat",
|
||||
"x-enum-keys": [],
|
||||
|
||||
@@ -3880,7 +3880,7 @@ App::patch('/v1/account/mfa')
|
||||
if ($user->getAttribute('phone', false) && $user->getAttribute('phoneVerification', false)) {
|
||||
$factors[] = Type::PHONE;
|
||||
}
|
||||
$factors = \array_unique($factors);
|
||||
$factors = \array_values(\array_unique($factors));
|
||||
|
||||
$session->setAttribute('factors', $factors);
|
||||
$dbForProject->updateDocument('sessions', $session->getId(), $session);
|
||||
@@ -4065,7 +4065,7 @@ App::put('/v1/account/mfa/authenticators/:type')
|
||||
|
||||
$factors = $session->getAttribute('factors', []);
|
||||
$factors[] = $type;
|
||||
$factors = \array_unique($factors);
|
||||
$factors = \array_values(\array_unique($factors));
|
||||
|
||||
$session->setAttribute('factors', $factors);
|
||||
$dbForProject->updateDocument('sessions', $session->getId(), $session);
|
||||
@@ -4549,7 +4549,7 @@ App::put('/v1/account/mfa/challenge')
|
||||
|
||||
$factors = $session->getAttribute('factors', []);
|
||||
$factors[] = $type;
|
||||
$factors = \array_unique($factors);
|
||||
$factors = \array_values(\array_unique($factors));
|
||||
|
||||
$session
|
||||
->setAttribute('factors', $factors)
|
||||
|
||||
@@ -845,15 +845,18 @@ App::get('/v1/health/storage')
|
||||
$checkStart = \microtime(true);
|
||||
|
||||
foreach ($devices as $device) {
|
||||
if (!$device->write($device->getPath('health.txt'), 'test', 'text/plain')) {
|
||||
$uniqueFileName = \uniqid('health', true);
|
||||
$filePath = $device->getPath($uniqueFileName);
|
||||
|
||||
if (!$device->write($filePath, 'test', 'text/plain')) {
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed writing test file to ' . $device->getRoot());
|
||||
}
|
||||
|
||||
if ($device->read($device->getPath('health.txt')) !== 'test') {
|
||||
if ($device->read($filePath) !== 'test') {
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed reading test file from ' . $device->getRoot());
|
||||
}
|
||||
|
||||
if (!$device->delete($device->getPath('health.txt'))) {
|
||||
if (!$device->delete($filePath)) {
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed deleting test file from ' . $device->getRoot());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -605,11 +605,12 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro
|
||||
->param('installationId', '', new Text(256), 'Installation Id')
|
||||
->param('providerRepositoryId', '', new Text(256), 'Repository Id')
|
||||
->param('providerRootDirectory', '', new Text(256, 0), 'Path to get contents of nested directory', true)
|
||||
->param('providerReference', '', new Text(256, 0), 'Git reference (branch, tag, commit) to get contents from', true)
|
||||
->inject('gitHub')
|
||||
->inject('response')
|
||||
->inject('project')
|
||||
->inject('dbForPlatform')
|
||||
->action(function (string $installationId, string $providerRepositoryId, string $providerRootDirectory, GitHub $github, Response $response, Document $project, Database $dbForPlatform) {
|
||||
->action(function (string $installationId, string $providerRepositoryId, string $providerRootDirectory, string $providerReference, GitHub $github, Response $response, Document $project, Database $dbForPlatform) {
|
||||
$installation = $dbForPlatform->getDocument('installations', $installationId);
|
||||
|
||||
if ($installation->isEmpty()) {
|
||||
@@ -631,7 +632,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro
|
||||
throw new Exception(Exception::PROVIDER_REPOSITORY_NOT_FOUND);
|
||||
}
|
||||
|
||||
$contents = $github->listRepositoryContents($owner, $repositoryName, $providerRootDirectory);
|
||||
$contents = $github->listRepositoryContents($owner, $repositoryName, $providerRootDirectory, $providerReference);
|
||||
|
||||
$vcsContents = [];
|
||||
foreach ($contents as $content) {
|
||||
|
||||
@@ -880,7 +880,7 @@ App::setResource('apiKey', function (Request $request, Document $project): ?Key
|
||||
return Key::decode($project, $key);
|
||||
}, ['request', 'project']);
|
||||
|
||||
App::setResource('executor', fn () => new Executor(fn (string $projectId, string $deploymentId) => System::getEnv('_APP_EXECUTOR_HOST')));
|
||||
App::setResource('executor', fn () => new Executor());
|
||||
|
||||
App::setResource('resourceToken', function ($project, $dbForProject, $request) {
|
||||
$tokenJWT = $request->getParam('token');
|
||||
|
||||
@@ -841,7 +841,7 @@ $image = $this->getParam('image', '');
|
||||
- _APP_DB_PASS
|
||||
|
||||
appwrite-assistant:
|
||||
image: appwrite/assistant:0.4.0
|
||||
image: appwrite/assistant:0.8.3
|
||||
container_name: appwrite-assistant
|
||||
<<: *x-logging
|
||||
restart: unless-stopped
|
||||
|
||||
+1
-1
@@ -402,7 +402,7 @@ Server::setResource('logError', function (Registry $register, Document $project)
|
||||
};
|
||||
}, ['register', 'project']);
|
||||
|
||||
Server::setResource('executor', fn () => new Executor(fn (string $projectId, string $deploymentId) => System::getEnv('_APP_EXECUTOR_HOST')));
|
||||
Server::setResource('executor', fn () => new Executor());
|
||||
|
||||
$pools = $register->get('pools');
|
||||
$platform = new Appwrite();
|
||||
|
||||
Reference in New Issue
Block a user