1
0
Fork 0
mirror of synced 2024-05-20 12:42:39 +12:00

Merge branch 'master' of github.com:appwrite/appwrite into feat-database-indexing

This commit is contained in:
Eldad Fux 2021-06-11 15:04:15 +03:00
commit 2a07d311e8
61 changed files with 221 additions and 136 deletions

View file

@ -15,7 +15,7 @@ then
exit 1
fi
if test $(find "./app/db/DBIP/dbip-country-lite-2021-02.mmdb" -mmin +259200)
if test $(find "./app/db/DBIP/dbip-country-lite-2021-06.mmdb" -mmin +259200)
then
printf "${RED}GEO country DB has not been updated for more than 6 months. Go to https://db-ip.com/db/download/ip-to-country-lite to download a newer version${NC}\n"
fi

View file

@ -62,8 +62,10 @@ RUN \
make && make install && \
cd .. && \
## Imagick Extension
git clone --depth 1 --branch $PHP_IMAGICK_VERSION https://github.com/Imagick/imagick && \
## Last working commit https://github.com/Imagick/imagick/commit/35741750aa1cda2b7ac354bfa6128fa037e9cf32
git clone --branch $PHP_IMAGICK_VERSION https://github.com/Imagick/imagick && \
cd imagick && \
git checkout 35741750aa1cda2b7ac354bfa6128fa037e9cf32 && \
phpize && \
./configure && \
make && make install && \

View file

@ -15,7 +15,7 @@ return [
[
'key' => 'web',
'name' => 'Web',
'version' => '3.0.4',
'version' => '3.1.0',
'url' => 'https://github.com/appwrite/sdk-for-web',
'package' => 'https://www.npmjs.com/package/appwrite',
'enabled' => true,
@ -62,7 +62,7 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
'version' => '0.6.2',
'version' => '0.6.4',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
@ -178,7 +178,7 @@ return [
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '2.2.2',
'version' => '2.3.0',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
@ -195,7 +195,7 @@ return [
[
'key' => 'deno',
'name' => 'Deno',
'version' => '0.2.1',
'version' => '0.2.2',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
@ -212,7 +212,7 @@ return [
[
'key' => 'php',
'name' => 'PHP',
'version' => '2.1.1',
'version' => '2.1.2',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
@ -229,7 +229,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '0.2.1',
'version' => '0.3.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
@ -246,7 +246,7 @@ return [
[
'key' => 'ruby',
'name' => 'Ruby',
'version' => '2.1.1',
'version' => '2.2.0',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
@ -314,7 +314,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '0.6.1',
'version' => '0.6.3',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
@ -331,7 +331,7 @@ return [
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '0.10.1',
'version' => '0.10.0',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://github.com/appwrite/sdk-for-cli',
'enabled' => true,

View file

@ -58,15 +58,16 @@ App::post('/v1/account')
/** @var Utopia\Database\Database $dbForInternal */
/** @var Appwrite\Event\Event $audits */
$email = \strtolower($email);
if ('console' === $project->getId()) {
$whitlistEmails = $project->getAttribute('authWhitelistEmails');
$whitlistIPs = $project->getAttribute('authWhitelistIPs');
$whitelistEmails = $project->getAttribute('authWhitelistEmails');
$whitelistIPs = $project->getAttribute('authWhitelistIPs');
if (!empty($whitlistEmails) && !\in_array($email, $whitlistEmails)) {
if (!empty($whitelistEmails) && !\in_array($email, $whitelistEmails)) {
throw new Exception('Console registration is restricted to specific emails. Contact your administrator for more information.', 401);
}
if (!empty($whitlistIPs) && !\in_array($request->getIP(), $whitlistIPs)) {
if (!empty($whitelistIPs) && !\in_array($request->getIP(), $whitelistIPs)) {
throw new Exception('Console registration is restricted to specific IPs. Contact your administrator for more information.', 401);
}
}
@ -153,6 +154,7 @@ App::post('/v1/account/sessions')
/** @var MaxMind\Db\Reader $geodb */
/** @var Appwrite\Event\Event $audits */
$email = \strtolower($email);
$protocol = $request->getProtocol();
$profile = $dbForInternal->findFirst('users', [new Query('email', Query::TYPE_EQUAL, [$email])], 1); // Get user by email address
@ -1004,7 +1006,8 @@ App::patch('/v1/account/email')
throw new Exception('Invalid credentials', 401);
}
$profile = $dbForInternal->findFirst('users', [new Query('email', Query::TYPE_EQUAL, [$email])], 1); // Get user by email address
$email = \strtolower($email);
$profile = $dbForInternal->findFirst('users', [new Query('email', Query::TYPE_EQUAL, [\strtolower($email)])], 1); // Get user by email address
if ($profile) {
throw new Exception('User already registered', 400);
@ -1298,6 +1301,7 @@ App::post('/v1/account/recovery')
$isPrivilegedUser = Auth::isPrivilegedUser(Authorization::$roles);
$isAppUser = Auth::isAppUser(Authorization::$roles);
$email = \strtolower($email);
$profile = $dbForInternal->findFirst('users', [new Query('email', Query::TYPE_EQUAL, [$email])], 1); // Get user by email address
if (!$profile) {

View file

@ -257,7 +257,8 @@ App::post('/v1/teams/:teamId/memberships')
$isPrivilegedUser = Auth::isPrivilegedUser(Authorization::$roles);
$isAppUser = Auth::isAppUser(Authorization::$roles);
$email = \strtolower($email);
$name = (empty($name)) ? $email : $name;
$team = $dbForInternal->getDocument('teams', $teamId);

View file

@ -40,6 +40,8 @@ App::post('/v1/users')
/** @var Appwrite\Utopia\Response $response */
/** @var Utopia\Database\Database $dbForInternal */
$email = \strtolower($email);
try {
$userId = $dbForInternal->getId();
$user = $dbForInternal->createDocument('users', new Document([
@ -362,23 +364,17 @@ App::patch('/v1/users/:userId/verification')
->inject('projectDB')
->action(function ($userId, $emailVerification, $response, $projectDB) {
/** @var Appwrite\Utopia\Response $response */
/** @var Appwrite\Database\Database $projectDB */
/** @var Utopia\Database\Database $dbForInternal */
$user = $projectDB->getDocument($userId);
$user = $dbForInternal->getDocument('users', $userId);
if (empty($user->getId()) || Database::SYSTEM_COLLECTION_USERS != $user->getCollection()) {
if ($user->isEmpty()) {
throw new Exception('User not found', 404);
}
$user = $projectDB->updateDocument(\array_merge($user->getArrayCopy(), [
'emailVerification' => $emailVerification,
]));
$user = $dbForInternal->updateDocument('users', $user->getId(), $user->setAttribute('emailVerification', $emailVerification));
if (false === $user) {
throw new Exception('Failed saving user to DB', 500);
}
$response->dynamic($user, Response::MODEL_USER);
$response->dynamic2($user, Response::MODEL_USER);
});
App::patch('/v1/users/:userId/prefs')

View file

@ -6,9 +6,9 @@ use Appwrite\Database\Document;
use Appwrite\Network\Validator\Host;
use Appwrite\Utopia\Response;
use Utopia\App;
use Utopia\Validator\Numeric;
use Utopia\Validator\Text;
use Utopia\Validator\ArrayList;
use Utopia\Validator\Integer;
use Utopia\Validator\Text;
use Utopia\Storage\Validator\File;
App::get('/v1/mock/tests/foo')
@ -24,7 +24,7 @@ App::get('/v1/mock/tests/foo')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@ -42,7 +42,7 @@ App::post('/v1/mock/tests/foo')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@ -60,7 +60,7 @@ App::patch('/v1/mock/tests/foo')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@ -78,7 +78,7 @@ App::put('/v1/mock/tests/foo')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@ -96,7 +96,7 @@ App::delete('/v1/mock/tests/foo')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@ -114,7 +114,7 @@ App::get('/v1/mock/tests/bar')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@ -132,7 +132,7 @@ App::post('/v1/mock/tests/bar')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@ -150,7 +150,7 @@ App::patch('/v1/mock/tests/bar')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@ -168,7 +168,7 @@ App::put('/v1/mock/tests/bar')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@ -186,7 +186,7 @@ App::delete('/v1/mock/tests/bar')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->action(function ($x, $y, $z) {
});
@ -230,7 +230,7 @@ App::post('/v1/mock/tests/general/upload')
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->param('x', '', new Text(100), 'Sample string param')
->param('y', '', new Numeric(), 'Sample numeric param')
->param('y', '', new Integer(), 'Sample numeric param')
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
->param('file', [], new File(), 'Sample file param', false)
->inject('request')
@ -271,6 +271,7 @@ App::get('/v1/mock/tests/general/redirect')
->label('sdk.description', 'Mock a redirect request.')
->label('sdk.response.code', Response::STATUS_CODE_MOVED_PERMANENTLY)
->label('sdk.response.type', Response::CONTENT_TYPE_HTML)
->label('sdk.response.model', Response::MODEL_MOCK)
->label('sdk.mock', true)
->inject('response')
->action(function ($response) {
@ -394,6 +395,7 @@ App::get('/v1/mock/tests/general/502-error')
->label('sdk.description', 'Mock a 502 bad gateway.')
->label('sdk.response.code', Response::STATUS_CODE_BAD_GATEWAY)
->label('sdk.response.type', Response::CONTENT_TYPE_TEXT)
->label('sdk.response.model', Response::MODEL_ANY)
->label('sdk.mock', true)
->inject('response')
->action(function ($response) {

View file

@ -8,6 +8,7 @@ use Utopia\App;
use Utopia\View;
use Utopia\Config\Config;
use Utopia\Exception;
use Utopia\Validator\Boolean;
use Utopia\Validator\Range;
use Utopia\Validator\WhiteList;
@ -488,4 +489,4 @@ App::get('/versions')
}
$response->json($versions);
});
});

Binary file not shown.

View file

@ -47,7 +47,7 @@ const APP_MODE_ADMIN = 'admin';
const APP_PAGING_LIMIT = 12;
const APP_LIMIT_COUNT = 5000;
const APP_LIMIT_USERS = 10000;
const APP_CACHE_BUSTER = 146;
const APP_CACHE_BUSTER = 148;
const APP_VERSION_STABLE = '0.8.0';
const APP_STORAGE_UPLOADS = '/storage/uploads';
const APP_STORAGE_FUNCTIONS = '/storage/functions';
@ -263,7 +263,7 @@ $register->set('smtp', function () {
return $mail;
});
$register->set('geodb', function () {
return new Reader(__DIR__.'/db/DBIP/dbip-country-lite-2021-02.mmdb');
return new Reader(__DIR__.'/db/DBIP/dbip-country-lite-2021-06.mmdb');
});
/*

View file

@ -202,7 +202,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
\exec('rm -rf '.$target.' && \
mkdir -p '.$target.' && \
cd '.$target.' && \
git init && \
git init --initial-branch=master && \
git remote add origin '.$gitUrl.' && \
git fetch && \
git pull '.$gitUrl.' && \

View file

@ -43,7 +43,7 @@ if(!empty($platforms)) {
<link rel="apple-touch-icon" href="/images/apple.png">
<!-- <link rel="preconnect" href="" /> -->
<?php if (!empty($canonical)): ?>
<link rel="canonical" href="<?php echo $canonical; ?>" />
<link rel="canonical" href="<?php echo $this->escape($canonical); ?>" />
<?php endif; ?>
<?php foreach ($this->getParam('prefetch', []) as $prefetch): ?>
<link rel="prefetch" href="<?php echo $this->escape($prefetch); ?>" />
@ -52,12 +52,12 @@ if(!empty($platforms)) {
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5" />
<meta name="theme-color" content="#24f4d4">
<meta property="og:type" content="website" />
<meta property="og:title" content="<?php echo $this->getParam('title', ''); ?>" />
<meta property="og:description" content="<?php echo $this->getParam('description', ''); ?>" />
<meta property="og:title" content="<?php echo $this->escape($this->getParam('title', '')); ?>" />
<meta property="og:description" content="<?php echo $this->escape($this->getParam('description', '')); ?>" />
<?php if (!empty($canonical)): ?>
<meta property="og:url" content="<?php echo $canonical; ?>" />
<meta property="og:url" content="<?php echo $this->escape($canonical); ?>" />
<?php endif; ?>
<meta property="og:image" content="<?php echo $endpoint; ?>/images/logo.png?v=<?php echo APP_CACHE_BUSTER; ?>" />
<meta property="og:image" content="<?php echo $this->escape($endpoint); ?>/images/logo.png?v=<?php echo APP_CACHE_BUSTER; ?>" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@ -69,11 +69,11 @@ if(!empty($platforms)) {
var APP_ENV = {
NAME: '<?php echo APP_NAME; ?>',
VERSION: '<?php echo $version; ?>',
CACHEBUSTER: '<?php echo $version; ?>/<?php echo APP_CACHE_BUSTER; ?>',
PROTOCOL: '<?php echo $protocol; ?>',
ENDPOINT: '<?php echo $endpoint; ?>',
DOMAIN: '<?php echo $domain; ?>',
VERSION: '<?php echo $this->escape($version); ?>',
CACHEBUSTER: '<?php echo $this->escape($version); ?>/<?php echo APP_CACHE_BUSTER; ?>',
PROTOCOL: '<?php echo $this->escape($protocol); ?>',
ENDPOINT: '<?php echo $this->escape($endpoint); ?>',
DOMAIN: '<?php echo $this->escape($domain); ?>',
HOME: '<?php echo $this->escape($this->getParam('home')); ?>',
SETUP: '<?php echo $this->escape($this->getParam('setup')); ?>',
API: '/v1',
@ -93,7 +93,7 @@ if(!empty($platforms)) {
script.type = 'text/javascript';
script.async = true;
script.src = '/dist/scripts/app-all.js?v=<?php echo APP_CACHE_BUSTER; ?>.<?php echo $version; ?>';
script.src = '/dist/scripts/app-all.js?v=<?php echo APP_CACHE_BUSTER; ?>.<?php echo $this->escape($version); ?>';
script.onload = function() {
window.ls.run(window);
};
@ -142,6 +142,6 @@ if(!empty($platforms)) {
<?php echo $this->exec($this->getParam('footer', [])); ?>
<!-- Version <?php echo $version; ?> -->
<!-- Version <?php echo $this->escape($version); ?> -->
</body>
</html>

View file

@ -63,7 +63,7 @@
"slickdeals/statsd": "3.0.2"
},
"require-dev": {
"appwrite/sdk-generator": "0.10.6",
"appwrite/sdk-generator": "0.10.11",
"swoole/ide-helper": "4.6.6",
"phpunit/phpunit": "9.5.4",
"vimeo/psalm": "4.7.2"

132
composer.lock generated
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": "5cf39daf305902a168233757d4a00066",
"content-hash": "271f550b529e2380be5501863def0560",
"packages": [
{
"name": "adhocore/jwt",
@ -1603,16 +1603,16 @@
},
{
"name": "utopia-php/abuse",
"version": "0.4.0",
"version": "0.4.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/abuse.git",
"reference": "2b8cc40a67c045c137b44d1a11326f494acf50a4"
"reference": "8b7973aae4b02489bd22ffea45b985608f13b6d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/2b8cc40a67c045c137b44d1a11326f494acf50a4",
"reference": "2b8cc40a67c045c137b44d1a11326f494acf50a4",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/8b7973aae4b02489bd22ffea45b985608f13b6d9",
"reference": "8b7973aae4b02489bd22ffea45b985608f13b6d9",
"shasum": ""
},
"require": {
@ -1649,9 +1649,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/abuse/issues",
"source": "https://github.com/utopia-php/abuse/tree/0.4.0"
"source": "https://github.com/utopia-php/abuse/tree/0.4.1"
},
"time": "2021-03-17T20:21:24+00:00"
"time": "2021-06-05T14:31:33+00:00"
},
{
"name": "utopia-php/analytics",
@ -2681,16 +2681,16 @@
},
{
"name": "appwrite/sdk-generator",
"version": "0.10.6",
"version": "0.10.11",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "ab4adb0b9126c617e11c8fdf4352c8aa9a715ecc"
"reference": "f73391d482660798f4077d54760d67e633bdde1e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ab4adb0b9126c617e11c8fdf4352c8aa9a715ecc",
"reference": "ab4adb0b9126c617e11c8fdf4352c8aa9a715ecc",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/f73391d482660798f4077d54760d67e633bdde1e",
"reference": "f73391d482660798f4077d54760d67e633bdde1e",
"shasum": ""
},
"require": {
@ -2724,9 +2724,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.10.6"
"source": "https://github.com/appwrite/sdk-generator/tree/0.10.11"
},
"time": "2021-05-24T14:32:40+00:00"
"time": "2021-06-07T11:37:50+00:00"
},
{
"name": "composer/semver",
@ -5091,16 +5091,16 @@
},
{
"name": "sebastian/type",
"version": "2.3.1",
"version": "2.3.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2"
"reference": "0d1c587401514d17e8f9258a27e23527cb1b06c1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
"reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0d1c587401514d17e8f9258a27e23527cb1b06c1",
"reference": "0d1c587401514d17e8f9258a27e23527cb1b06c1",
"shasum": ""
},
"require": {
@ -5135,7 +5135,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
"source": "https://github.com/sebastianbergmann/type/tree/2.3.1"
"source": "https://github.com/sebastianbergmann/type/tree/2.3.2"
},
"funding": [
{
@ -5143,7 +5143,7 @@
"type": "github"
}
],
"time": "2020-10-26T13:18:59+00:00"
"time": "2021-06-04T13:02:07+00:00"
},
{
"name": "sebastian/version",
@ -5252,20 +5252,21 @@
},
{
"name": "symfony/console",
"version": "v5.2.8",
"version": "v5.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "864568fdc0208b3eba3638b6000b69d2386e6768"
"reference": "058553870f7809087fa80fa734704a21b9bcaeb2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/864568fdc0208b3eba3638b6000b69d2386e6768",
"reference": "864568fdc0208b3eba3638b6000b69d2386e6768",
"url": "https://api.github.com/repos/symfony/console/zipball/058553870f7809087fa80fa734704a21b9bcaeb2",
"reference": "058553870f7809087fa80fa734704a21b9bcaeb2",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
"symfony/polyfill-php80": "^1.15",
@ -5329,7 +5330,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.2.8"
"source": "https://github.com/symfony/console/tree/v5.3.0"
},
"funding": [
{
@ -5345,7 +5346,74 @@
"type": "tidelift"
}
],
"time": "2021-05-11T15:45:21+00:00"
"time": "2021-05-26T17:43:10+00:00"
},
{
"name": "symfony/deprecation-contracts",
"version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.4-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-03-23T23:28:01+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
@ -5752,16 +5820,16 @@
},
{
"name": "symfony/string",
"version": "v5.2.8",
"version": "v5.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db"
"reference": "a9a0f8b6aafc5d2d1c116dcccd1573a95153515b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db",
"reference": "01b35eb64cac8467c3f94cd0ce2d0d376bb7d1db",
"url": "https://api.github.com/repos/symfony/string/zipball/a9a0f8b6aafc5d2d1c116dcccd1573a95153515b",
"reference": "a9a0f8b6aafc5d2d1c116dcccd1573a95153515b",
"shasum": ""
},
"require": {
@ -5815,7 +5883,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.2.8"
"source": "https://github.com/symfony/string/tree/v5.3.0"
},
"funding": [
{
@ -5831,7 +5899,7 @@
"type": "tidelift"
}
],
"time": "2021-05-10T14:56:10+00:00"
"time": "2021-05-26T17:43:10+00:00"
},
{
"name": "theseer/tokenizer",
@ -6143,4 +6211,4 @@
"php": "8.0"
},
"plugin-api-version": "2.0.0"
}
}

View file

@ -2,7 +2,6 @@
# This is a development version of THE Appwrite docker-compose.yml file.
# Avoid using this file in your production environment.
# We're exposing here sensetive ports and mounting code volumes for rapid development and debugging of the server stack.
# For a production ready compose file please use: https://appwrite.io/docker-compose.yml
version: '3'

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
account = Account(client)

View file

@ -11,4 +11,4 @@ client = Client()
avatars = Avatars(client)
result = avatars.get_q_r('[TEXT]')
result = avatars.get_qr('[TEXT]')

View file

@ -11,4 +11,4 @@ client = Client()
health = Health(client)
result = health.get_d_b()
result = health.get_db()

View file

@ -11,4 +11,4 @@ client = Client()
locale = Locale(client)
result = locale.get_countries_e_u()
result = locale.get_countries_eu()

View file

@ -6,7 +6,7 @@ client = Client()
(client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
)
teams = Teams(client)

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
account = Appwrite::Account.new(client);

View file

@ -10,6 +10,6 @@ client
avatars = Appwrite::Avatars.new(client);
response = avatars.get_q_r(text: '[TEXT]');
response = avatars.get_qr(text: '[TEXT]');
puts response

View file

@ -10,6 +10,6 @@ client
health = Appwrite::Health.new(client);
response = health.get_d_b();
response = health.get_db();
puts response

View file

@ -10,6 +10,6 @@ client
locale = Appwrite::Locale.new(client);
response = locale.get_countries_e_u();
response = locale.get_countries_eu();
puts response

View file

@ -5,7 +5,7 @@ client = Appwrite::Client.new()
client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
.set_project('5df5acd0d48c2') # Your project ID
.set_j_w_t('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
.set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
;
teams = Appwrite::Teams.new(client);

View file

@ -1 +1 @@
Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout.
Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.

View file

@ -1,3 +1,7 @@
## 0.6.2
- Removed default values, nothing should change in usage as default values are already allocated in server
## 0.6.1
- Fix for image preview param types

View file

@ -1,3 +1,7 @@
## 0.6.3
- Removed default values, nothing should change in usage as default values are already allocated in server
## 0.6.2
- Fixed deployment bug

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View file

@ -62,6 +62,7 @@ abstract class Format
* @param Route[] $routes
* @param Model[] $models
* @param array $keys
* @param int $authCount
*/
public function __construct(App $app, array $services, array $routes, array $models, array $keys, int $authCount)
{

View file

@ -4,7 +4,6 @@ namespace Appwrite\Specification\Format;
use Appwrite\Specification\Format;
use Appwrite\Template\Template;
use Appwrite\Utopia\Response\Model;
use stdClass;
use Utopia\Validator;
@ -188,7 +187,7 @@ class Swagger2 extends Format
];
}
if($route->getLabel('sdk.response.code', 500) === 204) {
if(in_array($route->getLabel('sdk.response.code', 500), [204, 301, 302, 308], true)) {
$temp['responses'][(string)$route->getLabel('sdk.response.code', '500')]['description'] = 'No content';
unset($temp['responses'][(string)$route->getLabel('sdk.response.code', '500')]['schema']);
}
@ -218,7 +217,7 @@ class Swagger2 extends Format
$bodyRequired = [];
foreach ($route->getParams() as $name => $param) { // Set params
$validator = (\is_callable($param['validator'])) ? call_user_func_array($param['validator'], $this->app->getResources($param['injections'])) : $param['validator']; /* @var $validator \Utopia\Validator */
$validator = (\is_callable($param['validator'])) ? call_user_func_array($param['validator'], $this->app->getResources($param['injections'])) : $param['validator']; /** @var \Utopia\Validator $validator */
$node = [
'name' => $name,
@ -279,6 +278,7 @@ class Swagger2 extends Format
$node['x-example'] = $validator->getMin();
break;
case 'Utopia\Validator\Numeric':
case 'Utopia\Validator\Integer':
$node['type'] = $validator->getType();
$node['format'] = 'int32';
break;
@ -355,13 +355,16 @@ class Swagger2 extends Format
}
foreach ($this->models as $model) {
foreach ($model->getRules() as $rule) {
if (!in_array($rule['type'], ['string', 'integer', 'boolean', 'json', 'float'])) {
if (
in_array($model->getType(), $usedModels)
&& !in_array($rule['type'], ['string', 'integer', 'boolean', 'json', 'float'])
) {
$usedModels[] = $rule['type'];
}
}
}
foreach ($this->models as $model) {
if (!in_array($model->getType(), $usedModels) && $model->getType() !== 'error') {
if (!in_array($model->getType(), $usedModels)) {
continue;
}

View file

@ -90,7 +90,7 @@ class Project extends Model
'example' => '131102020',
])
->addRule('usersAuthLimit', [
'type' => self::TYPE_BOOLEAN,
'type' => self::TYPE_INTEGER,
'description' => 'Max users allowed. 0 is unlimited.',
'default' => 0,
'example' => 100,