diff --git a/.gitignore b/.gitignore index c7d23a9df8..33974acbe2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ .DS_Store .php_cs.cache debug/ -app/sdks \ No newline at end of file +app/sdks +dev/yasd_init.php diff --git a/CHANGES.md b/CHANGES.md index 5743bd42e5..c63d0205ef 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,31 @@ +# Version 0.9.4 + +## Security + +- Fixed security vulnerability that exposes project ID's from other admin users (#1453) + +# Version 0.9.3 + +## Bugs + +- Fixed Abuse Limit keys for JWT and E-Mail confirmation (#1434) + +# Version 0.9.2 + +## Bugs + +- Fixed JWT session validation (#1408) +- Fixed passing valid JWT session to Cloud Functions (#1421) +- Fixed race condition when uploading and extracting bigger Cloud Functions (#1419) + +# Version 0.9.1 + +## Bugs + +- Fixed PDO Connection timeout (#1385) +- Removed unnecessary `app` resource and replace with `utopia` (#1384) +- Fixed missing quote in Functions Worker logs (#1375) + # Version 0.9.0 ## Features diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69d26d0aa4..552ff05612 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -123,6 +123,10 @@ Learn more at our [Technology Stack](## Technology Stack) section. Appwrite's current structure is a combination of both [Monolithic](https://en.wikipedia.org/wiki/Monolithic_application) and [Microservice](https://en.wikipedia.org/wiki/Microservices) architectures, but our final goal, as we grow, is to be using only microservices. +--- +![Appwrite](docs/specs/overview.drawio.svg) +--- + ### File Structure ```bash @@ -174,10 +178,6 @@ Appwrite's current structure is a combination of both [Monolithic](https://en.wi └── unit ``` ---- -![Appwrite](docs/specs/overview.drawio.svg) ---- - ### The Monolithic Part Appwrite's main API container is designed as a monolithic app. This is a decision we made to allow us to develop the project faster while still being a very small team. @@ -282,6 +282,30 @@ docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 The Runtimes for all supported cloud functions (multicore builds) can be found at the [appwrite/php-runtimes](https://github.com/appwrite/php-runtimes) repository. +## Debug + +Appwrite uses [yasd](https://github.com/swoole/yasd) debugger, which can be made available during build of Appwrite. You can connect to the debugger using VS Code [PHP Debug](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug) extension or if you are in PHP Storm you don't need any plugin. Below are the settings required for remote debugger connection. + +First, you need to create an init file. Duplicate **dev/yasd_init.php.stub** file and name it **dev/yasd_init.php** and there change the IP address to your development machine's IP. Without the proper IP address debugger wont connect. And you also need to set **DEBUG** build arg in **appwrite** service in **docker-compose.yml** file. + +### VS Code Launch Configuration + +```json +{ + "name": "Listen for Xdebug", + "type": "php", + "request": "launch", + "port": 9005, + "pathMappings": { + "/usr/src/code": "${workspaceRoot}" + }, +} +``` + +### PHPStorm Setup + +In settings, go to **Languages & Frameworks** > **PHP** > **Debug**, there under **Xdebug** set the debug port to **9005** and enable **can accept external connections** checkbox. + ## Tests To run all tests manually, use the Appwrite Docker CLI from your terminal: diff --git a/Dockerfile b/Dockerfile index b450b6a6d9..d15dbf508e 100755 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,9 @@ RUN composer update --ignore-platform-reqs --optimize-autoloader \ FROM php:8.0-cli-alpine as step1 +ARG DEBUG=false +ENV DEBUG=$DEBUG + ENV PHP_REDIS_VERSION=5.3.4 \ PHP_SWOOLE_VERSION=v4.6.7 \ PHP_IMAGICK_VERSION=3.5.0 \ @@ -75,11 +78,25 @@ RUN \ make && make install && \ cd ../.. +## Swoole Debugger setup +RUN if [ "$DEBUG" == "true" ]; then \ + cd /tmp && \ + apk add boost-dev && \ + git clone --depth 1 https://github.com/swoole/yasd && \ + cd yasd && \ + phpize && \ + ./configure && \ + make && make install && \ + cd ..;\ + fi + FROM php:8.0-cli-alpine as final LABEL maintainer="team@appwrite.io" ARG VERSION=dev +ARG DEBUG=false +ENV DEBUG=$DEBUG ENV _APP_SERVER=swoole \ _APP_ENV=production \ @@ -160,10 +177,15 @@ RUN \ && apk del .deps \ && rm -rf /var/cache/apk/* +RUN \ + if [ "$DEBUG" == "true" ]; then \ + apk add boost boost-dev; \ + fi + WORKDIR /usr/src/code COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor -COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/ +COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/swoole.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/yasd.so* /usr/local/lib/php/extensions/no-debug-non-zts-20200930/ COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/ COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/imagick.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/ COPY --from=step1 /usr/local/lib/php/extensions/no-debug-non-zts-20200930/yaml.so /usr/local/lib/php/extensions/no-debug-non-zts-20200930/ @@ -218,7 +240,9 @@ RUN echo extension=redis.so >> /usr/local/etc/php/conf.d/redis.ini RUN echo extension=imagick.so >> /usr/local/etc/php/conf.d/imagick.ini RUN echo extension=yaml.so >> /usr/local/etc/php/conf.d/yaml.ini RUN echo extension=maxminddb.so >> /usr/local/etc/php/conf.d/maxminddb.ini +RUN if [ "$DEBUG" == "true" ]; then printf "zend_extension=yasd \nyasd.debug_mode=remote \nyasd.init_file=/usr/local/dev/yasd_init.php \nyasd.remote_port=9005 \nyasd.log_level=-1" >> /usr/local/etc/php/conf.d/yasd.ini; fi +RUN if [ "$DEBUG" == "true" ]; then echo "opcache.enable=0" >> /usr/local/etc/php/conf.d/appwrite.ini; fi RUN echo "opcache.preload_user=www-data" >> /usr/local/etc/php/conf.d/appwrite.ini RUN echo "opcache.preload=/usr/src/code/app/preload.php" >> /usr/local/etc/php/conf.d/appwrite.ini RUN echo "opcache.enable_cli=1" >> /usr/local/etc/php/conf.d/appwrite.ini diff --git a/README.md b/README.md index 0596bee316..e8b8daf8f9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- Appwrite Logo + Appwrite Logo

A complete backend solution for your [Flutter / Vue / Angular / React / iOS / Android / *ANY OTHER*] app @@ -15,7 +15,7 @@ [![Build Status](https://img.shields.io/travis/com/appwrite/appwrite?style=flat-square)](https://travis-ci.com/appwrite/appwrite) [![Twitter Account](https://img.shields.io/twitter/follow/appwrite_io?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite_io) -[**Appwrite 0.8 has been released! Learn what's new!**](https://dev.to/appwrite/announcing-appwrite-0-8-an-open-source-self-hosted-baas-kda) +[**Appwrite 0.9 has been released! Learn what's new!**](https://dev.to/appwrite/announcing-appwrite-0-9-the-open-source-firebase-alternative-53ho) Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker microservices. Appwrite abstracts the complexity and repetitiveness required to build a modern backend API from scratch and allows you to build secure apps faster. @@ -56,7 +56,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:0.8.0 + appwrite/appwrite:0.9.4 ``` ### Windows @@ -68,7 +68,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:0.8.0 + appwrite/appwrite:0.9.4 ``` #### PowerShell @@ -78,7 +78,7 @@ docker run -it --rm , --volume /var/run/docker.sock:/var/run/docker.sock , --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw , --entrypoint="install" , - appwrite/appwrite:0.8.0 + appwrite/appwrite:0.9.4 ``` Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-linux native hosts, the server might take a few minutes to start after installation completes. @@ -121,14 +121,16 @@ Below is a list of currently supported platforms and languages. If you wish to h #### Client * ✅   [Web](https://github.com/appwrite/sdk-for-web) (Maintained by the Appwrite Team) * ✅   [Flutter](https://github.com/appwrite/sdk-for-flutter) (Maintained by the Appwrite Team) +* ✅   [Android](https://github.com/appwrite/sdk-for-android) (Maintained by the Appwrite Team) #### Server * ✅   [NodeJS](https://github.com/appwrite/sdk-for-node) (Maintained by the Appwrite Team) * ✅   [PHP](https://github.com/appwrite/sdk-for-php) (Maintained by the Appwrite Team) * ✅   [Dart](https://github.com/appwrite/sdk-for-dart) **Beta** (Maintained by the Appwrite Team) * ✅   [Deno](https://github.com/appwrite/sdk-for-deno) - **Beta** (Maintained by the Appwrite Team) -* ✅   [Ruby](https://github.com/appwrite/sdk-for-ruby) - **Beta** (Maintained by the Appwrite Team) -* ✅   [Python](https://github.com/appwrite/sdk-for-python) - **Beta** (Maintained by the Appwrite Team) +* ✅   [Ruby](https://github.com/appwrite/sdk-for-ruby) (Maintained by the Appwrite Team) +* ✅   [Python](https://github.com/appwrite/sdk-for-python) (Maintained by the Appwrite Team) +* ✅   [Kotlin](https://github.com/appwrite/sdk-for-kotlin) - **Beta** (Maintained by the Appwrite Team) * ✅   [.NET](https://github.com/appwrite/sdk-for-dotnet) - **Experimental** (Maintained by the Appwrite Team) Looking for more SDKs? - Help us by contributing a pull request to our [SDK Generator](https://github.com/appwrite/sdk-generator)! diff --git a/app/config/platforms.php b/app/config/platforms.php index aee5eac750..b12bf41cd2 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -113,7 +113,7 @@ return [ 'name' => 'Android', 'version' => '0.0.1', 'url' => 'https://github.com/appwrite/sdk-for-android', - 'package' => 'https://repo1.maven.org/maven2/io/appwrite/sdk-for-android/', + 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android', 'enabled' => true, 'beta' => true, 'dev' => false, @@ -355,7 +355,7 @@ return [ 'name' => 'Kotlin', 'version' => '0.0.1', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', - 'package' => 'https://repo1.maven.org/maven2/io/appwrite/sdk-for-kotlin/', + 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, 'beta' => true, 'dev' => false, diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 850f42af58..7bb4cbb28a 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -782,7 +782,7 @@ App::post('/v1/account/jwt') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_JWT) ->label('abuse-limit', 10) - ->label('abuse-key', 'url:{url},userId:{param-userId}') + ->label('abuse-key', 'url:{url},userId:{userId}') ->inject('response') ->inject('user') ->action(function ($response, $user) { @@ -918,16 +918,16 @@ App::get('/v1/account/logs') ->inject('user') ->inject('locale') ->inject('geodb') - ->inject('app') - ->action(function ($response, $project, $user, $locale, $geodb, $app) { + ->inject('utopia') + ->action(function ($response, $project, $user, $locale, $geodb, $utopia) { /** @var Appwrite\Utopia\Response $response */ /** @var Appwrite\Database\Document $project */ /** @var Appwrite\Database\Document $user */ /** @var Utopia\Locale\Locale $locale */ /** @var MaxMind\Db\Reader $geodb */ - /** @var Utopia\App $app */ + /** @var Utopia\App $utopia */ - $adapter = new AuditAdapter($app->getResource('db')); + $adapter = new AuditAdapter($utopia->getResource('db')); $adapter->setNamespace('app_'.$project->getId()); $audit = new Audit($adapter); @@ -1668,7 +1668,7 @@ App::post('/v1/account/verification') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TOKEN) ->label('abuse-limit', 10) - ->label('abuse-key', 'url:{url},email:{param-email}') + ->label('abuse-key', 'url:{url},userId:{userId}') ->param('url', '', function ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', false, ['clients']) // TODO add built-in confirm page ->inject('request') ->inject('response') diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index 4c87a6be12..16d320667b 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -437,7 +437,7 @@ App::get('/v1/database/collections/:collectionId/documents') } $types = []; - foreach ($collection->getAttribute('rules') as $rule) { + foreach ($collection->getAttribute('rules', []) as $rule) { /** @var Document $rule */ $types[$rule->getAttribute('key')] = $rule->getAttribute('type'); } @@ -630,4 +630,4 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId') ; $response->noContent(); - }); \ No newline at end of file + }); diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index dd58108893..1560355aa0 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -748,20 +748,20 @@ App::post('/v1/functions/:functionId/executions') $jwt = ''; // initialize if (!empty($user->getId())) { // If userId exists, generate a JWT for function - $tokens = $user->getAttribute('tokens', []); - $session = new Document(); + $sessions = $user->getAttribute('sessions', []); + $current = new Document(); - foreach ($tokens as $token) { /** @var Appwrite\Database\Document $token */ - if ($token->getAttribute('secret') == Auth::hash(Auth::$secret)) { // If current session delete the cookies too - $session = $token; + foreach ($sessions as $session) { /** @var Appwrite\Database\Document $session */ + if ($session->getAttribute('secret') == Auth::hash(Auth::$secret)) { // If current session delete the cookies too + $current = $session; } } - if(!$session->isEmpty()) { + if(!$current->isEmpty()) { $jwtObj = new JWT(App::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 900, 10); // Instantiate with key, algo, maxAge and leeway. $jwt = $jwtObj->encode([ 'userId' => $user->getId(), - 'sessionId' => $session->getId(), + 'sessionId' => $current->getId(), ]); } } diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index a161b2bdea..cbccb8f59c 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -42,11 +42,11 @@ App::get('/v1/health/db') ->label('sdk.method', 'getDB') ->label('sdk.description', '/docs/references/health/get-db.md') ->inject('response') - ->inject('app') - ->action(function ($response, $app) { + ->inject('utopia') + ->action(function ($response, $utopia) { /** @var Appwrite\Utopia\Response $response */ - /** @var Utopia\App $app */ - $app->getResource('db'); + /** @var Utopia\App $utopia */ + $utopia->getResource('db'); $response->json(['status' => 'OK']); }); @@ -60,11 +60,11 @@ App::get('/v1/health/cache') ->label('sdk.method', 'getCache') ->label('sdk.description', '/docs/references/health/get-cache.md') ->inject('response') - ->inject('app') - ->action(function ($response, $app) { + ->inject('utopia') + ->action(function ($response, $utopia) { /** @var Appwrite\Utopia\Response $response */ - /** @var Utopia\App $register */ - $app->getResource('cache'); + /** @var Utopia\App $utopia */ + $utopia->getResource('cache'); $response->json(['status' => 'OK']); }); diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 2bac0efb85..bc4e5a6b1a 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -21,6 +21,14 @@ use Appwrite\Network\Validator\Domain as DomainValidator; use Appwrite\Utopia\Response; use Cron\CronExpression; +App::init(function ($project) { + /** @var Utopia\Database\Document $project */ + + if($project->getId() !== 'console') { + throw new Exception('Access to this API is forbidden.', 401); + } +}, ['project'], 'projects'); + App::post('/v1/projects') ->desc('Create Project') ->groups(['api', 'projects']) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index a11c65edc5..e73a0a2f74 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -236,14 +236,14 @@ App::get('/v1/users/:userId/logs') ->inject('projectDB') ->inject('locale') ->inject('geodb') - ->inject('app') - ->action(function ($userId, $response, $project, $projectDB, $locale, $geodb, $app) { + ->inject('utopia') + ->action(function ($userId, $response, $project, $projectDB, $locale, $geodb, $utopia) { /** @var Appwrite\Utopia\Response $response */ /** @var Appwrite\Database\Document $project */ /** @var Appwrite\Database\Database $projectDB */ /** @var Utopia\Locale\Locale $locale */ /** @var MaxMind\Db\Reader $geodb */ - /** @var Utopia\App $app */ + /** @var Utopia\App $utopia */ $user = $projectDB->getDocument($userId); @@ -251,7 +251,7 @@ App::get('/v1/users/:userId/logs') throw new Exception('User not found', 404); } - $adapter = new AuditAdapter($app->getResource('db')); + $adapter = new AuditAdapter($utopia->getResource('db')); $adapter->setNamespace('app_'.$project->getId()); $audit = new Audit($adapter); diff --git a/app/controllers/general.php b/app/controllers/general.php index cd95b74a0c..708e249853 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -304,6 +304,10 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project) { /** @var Utopia\View $layout */ /** @var Appwrite\Database\Document $project */ + if ($error instanceof PDOException) { + throw $error; + } + $route = $utopia->match($request); $template = ($route) ? $route->getLabel('error', null) : null; diff --git a/app/http.php b/app/http.php index 6b216da802..9a3a5459da 100644 --- a/app/http.php +++ b/app/http.php @@ -87,10 +87,6 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo App::setResource('cache', function () use (&$redis) { return $redis; }); - - App::setResource('app', function() use (&$app) { - return $app; - }); try { Authorization::cleanRoles(); @@ -103,6 +99,13 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo Console::error('[Error] File: '.$th->getFile()); Console::error('[Error] Line: '.$th->getLine()); + /** + * Reset Database connection if PDOException was thrown. + */ + if ($th instanceof PDOException) { + $db = null; + } + if(App::isDevelopment()) { $swooleResponse->end('error: '.$th->getMessage()); } diff --git a/app/init.php b/app/init.php index 302ce0f650..88ac10f294 100644 --- a/app/init.php +++ b/app/init.php @@ -47,8 +47,8 @@ const APP_USERAGENT = APP_NAME.'-Server v%s. Please report abuse at %s'; const APP_MODE_DEFAULT = 'default'; const APP_MODE_ADMIN = 'admin'; const APP_PAGING_LIMIT = 12; -const APP_CACHE_BUSTER = 149; -const APP_VERSION_STABLE = '0.9.0'; +const APP_CACHE_BUSTER = 150; +const APP_VERSION_STABLE = '0.9.4'; const APP_STORAGE_UPLOADS = '/storage/uploads'; const APP_STORAGE_FUNCTIONS = '/storage/functions'; const APP_STORAGE_CACHE = '/storage/cache'; @@ -164,12 +164,11 @@ $register->set('dbPool', function () { // Register DB connection $pool = new PDOPool((new PDOConfig()) ->withHost($dbHost) ->withPort($dbPort) - // ->withUnixSocket('/tmp/mysql.sock') ->withDbName($dbScheme) ->withCharset('utf8mb4') ->withUsername($dbUser) ->withPassword($dbPass) - ); + , 16); return $pool; }); @@ -189,7 +188,7 @@ $register->set('redisPool', function () { ->withPort($redisPort) ->withAuth($redisAuth) ->withDbIndex(0) - ); + , 16); return $pool; }); @@ -468,7 +467,7 @@ App::setResource('user', function($mode, $project, $console, $request, $response $user = $projectDB->getDocument($jwtUserId); } - if (empty($user->search('$id', $jwtSessionId, $user->getAttribute('tokens')))) { // Match JWT to active token + if (empty($user->search('$id', $jwtSessionId, $user->getAttribute('sessions')))) { // Match JWT to active token $user = new Document(['$id' => '', '$collection' => Database::SYSTEM_COLLECTION_USERS]); } } diff --git a/app/tasks/install.php b/app/tasks/install.php index 755e0b7e2c..483f5c5e04 100644 --- a/app/tasks/install.php +++ b/app/tasks/install.php @@ -129,7 +129,7 @@ $cli $httpsPort = Console::confirm('Choose your server HTTPS port: (default: '.$defaultHTTPSPort.')'); $httpsPort = ($httpsPort) ? $httpsPort : $defaultHTTPSPort; } - + $input = []; foreach($vars as $key => $var) { @@ -196,7 +196,7 @@ $cli foreach ($input as $key => $value) { if($value) { - $env .= $key.'='.$value.' '; + $env .= $key.'='.\escapeshellarg($value).' '; } } diff --git a/app/views/console/home/index.phtml b/app/views/console/home/index.phtml index 021cf89928..2342a2af23 100644 --- a/app/views/console/home/index.phtml +++ b/app/views/console/home/index.phtml @@ -79,6 +79,7 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled',true);

diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 1acc350664..c110fcd4eb 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -342,7 +342,7 @@ services: - MYSQL_DATABASE=${_APP_DB_SCHEMA} - MYSQL_USER=${_APP_DB_USER} - MYSQL_PASSWORD=${_APP_DB_PASS} - command: 'mysqld --innodb-flush-method=fsync' + command: 'mysqld --innodb-flush-method=fsync --wait_timeout=86400' redis: image: redis:6.0-alpine3.12 diff --git a/app/workers/functions.php b/app/workers/functions.php index fcd0d624e4..2ab1f1f309 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -337,7 +337,7 @@ class FunctionsV1 extends Worker : null; if(\is_null($runtime)) { - throw new Exception('Runtime "'.$function->getAttribute('runtime', '').' is not supported'); + throw new Exception('Runtime "'.$function->getAttribute('runtime', '').'" is not supported'); } $vars = \array_merge($function->getAttribute('vars', []), [ @@ -425,15 +425,24 @@ class FunctionsV1 extends Worker " --workdir /usr/local/src". " ".\implode(" ", $vars). " {$runtime['image']}". - " sh -c 'mv /tmp/code.tar.gz /usr/local/src/code.tar.gz && tar -zxf /usr/local/src/code.tar.gz --strip 1 && rm /usr/local/src/code.tar.gz && tail -f /dev/null'" + " tail -f /dev/null" , '', $stdout, $stderr, 30); - $executionEnd = \microtime(true); - if($exitCode !== 0) { throw new Exception('Failed to create function environment: '.$stderr); } + $exitCodeUntar = Console::execute("docker exec ". + $container. + " sh -c 'mv /tmp/code.tar.gz /usr/local/src/code.tar.gz && tar -zxf /usr/local/src/code.tar.gz --strip 1 && rm /usr/local/src/code.tar.gz'" + , '', $stdout, $stderr, 60); + + if($exitCodeUntar !== 0) { + throw new Exception('Failed to extract tar: '.$stderr); + } + + $executionEnd = \microtime(true); + $list[$container] = [ 'name' => $container, 'online' => true, diff --git a/composer.lock b/composer.lock index 4bb236099e..fba3b66cee 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "7983e9fe8946a99fbf818b79ff202486", + "content-hash": "e24aacead283e33130051470bb4312e6", "packages": [ { "name": "adhocore/jwt", @@ -2403,16 +2403,16 @@ }, { "name": "appwrite/sdk-generator", - "version": "dev-feat-kotlin-java-docs", + "version": "0.12.0", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "966d464728b41a8c449e99d7df4bd4ddca591a25" + "reference": "ca8e34f091b3a66f94a8972cb94b0b8e1161dada" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/966d464728b41a8c449e99d7df4bd4ddca591a25", - "reference": "966d464728b41a8c449e99d7df4bd4ddca591a25", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ca8e34f091b3a66f94a8972cb94b0b8e1161dada", + "reference": "ca8e34f091b3a66f94a8972cb94b0b8e1161dada", "shasum": "" }, "require": { @@ -2446,9 +2446,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/feat-kotlin-java-docs" + "source": "https://github.com/appwrite/sdk-generator/tree/0.12.0" }, - "time": "2021-07-06T09:26:45+00:00" + "time": "2021-07-06T16:20:51+00:00" }, { "name": "composer/package-versions-deprecated", @@ -6066,9 +6066,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "appwrite/sdk-generator": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -6090,5 +6088,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.0.0" } diff --git a/dev/yasd_init.php.stub b/dev/yasd_init.php.stub new file mode 100644 index 0000000000..a7d977fbf7 --- /dev/null +++ b/dev/yasd_init.php.stub @@ -0,0 +1,4 @@ +() { + "email@example.com", + "https://example.com" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/create-verification.md b/docs/examples/0.9.x/server-kotlin/java/account/create-verification.md index 2ca770e2e1..3ccaba861c 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/create-verification.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/create-verification.md @@ -9,8 +9,8 @@ public void main() { Account account = new Account(client); account.createVerification( - url = "https://example.com" - new Continuation() { + "https://example.com" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/delete-session.md b/docs/examples/0.9.x/server-kotlin/java/account/delete-session.md index bb925a77e3..96628f92c7 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/delete-session.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/delete-session.md @@ -9,8 +9,8 @@ public void main() { Account account = new Account(client); account.deleteSession( - sessionId = "[SESSION_ID]" - new Continuation() { + "[SESSION_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/delete-sessions.md b/docs/examples/0.9.x/server-kotlin/java/account/delete-sessions.md index 4cda782b99..ae9bbc95dc 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/delete-sessions.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/delete-sessions.md @@ -8,7 +8,7 @@ public void main() { .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token Account account = new Account(client); - account.deleteSessions(new Continuation() { + account.deleteSessions(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/delete.md b/docs/examples/0.9.x/server-kotlin/java/account/delete.md index bec268b8e0..17db76c4d3 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/delete.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/delete.md @@ -8,7 +8,7 @@ public void main() { .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token Account account = new Account(client); - account.delete(new Continuation() { + account.delete(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/get-logs.md b/docs/examples/0.9.x/server-kotlin/java/account/get-logs.md index 1d0f604519..df4f150275 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/get-logs.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/get-logs.md @@ -8,7 +8,7 @@ public void main() { .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token Account account = new Account(client); - account.getLogs(new Continuation() { + account.getLogs(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/get-prefs.md b/docs/examples/0.9.x/server-kotlin/java/account/get-prefs.md index 501e2d08c7..4f1a7c081c 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/get-prefs.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/get-prefs.md @@ -8,7 +8,7 @@ public void main() { .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token Account account = new Account(client); - account.getPrefs(new Continuation() { + account.getPrefs(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/get-session.md b/docs/examples/0.9.x/server-kotlin/java/account/get-session.md index 6f3e9e1a82..d99f4f98f2 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/get-session.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/get-session.md @@ -9,8 +9,8 @@ public void main() { Account account = new Account(client); account.getSession( - sessionId = "[SESSION_ID]" - new Continuation() { + "[SESSION_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/get-sessions.md b/docs/examples/0.9.x/server-kotlin/java/account/get-sessions.md index 1f42599185..561267ab6d 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/get-sessions.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/get-sessions.md @@ -8,7 +8,7 @@ public void main() { .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token Account account = new Account(client); - account.getSessions(new Continuation() { + account.getSessions(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/get.md b/docs/examples/0.9.x/server-kotlin/java/account/get.md index 2429a5d5d9..513a719a8a 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/get.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/get.md @@ -8,7 +8,7 @@ public void main() { .setJWT("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."); // Your secret JSON Web Token Account account = new Account(client); - account.get(new Continuation() { + account.get(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-email.md b/docs/examples/0.9.x/server-kotlin/java/account/update-email.md index 187fa22e2d..9017a8f239 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/update-email.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-email.md @@ -9,9 +9,9 @@ public void main() { Account account = new Account(client); account.updateEmail( - email = "email@example.com", - password = "password" - new Continuation() { + "email@example.com", + "password" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-name.md b/docs/examples/0.9.x/server-kotlin/java/account/update-name.md index 6f15d10e41..58291fe7d3 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/update-name.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-name.md @@ -9,8 +9,8 @@ public void main() { Account account = new Account(client); account.updateName( - name = "[NAME]" - new Continuation() { + "[NAME]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-password.md b/docs/examples/0.9.x/server-kotlin/java/account/update-password.md index 5058503b4c..6d460b5de1 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/update-password.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-password.md @@ -9,8 +9,8 @@ public void main() { Account account = new Account(client); account.updatePassword( - password = "password", - new Continuation() { + "password", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-prefs.md b/docs/examples/0.9.x/server-kotlin/java/account/update-prefs.md index ca085e904c..6cc967c4cc 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/update-prefs.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-prefs.md @@ -9,8 +9,8 @@ public void main() { Account account = new Account(client); account.updatePrefs( - prefs = mapOf( "a" to "b" ) - new Continuation() { + mapOf( "a" to "b" ) + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-recovery.md b/docs/examples/0.9.x/server-kotlin/java/account/update-recovery.md index d2b79d3dc5..4a77021b00 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/update-recovery.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-recovery.md @@ -9,11 +9,11 @@ public void main() { Account account = new Account(client); account.updateRecovery( - userId = "[USER_ID]", - secret = "[SECRET]", - password = "password", - passwordAgain = "password" - new Continuation() { + "[USER_ID]", + "[SECRET]", + "password", + "password" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/account/update-verification.md b/docs/examples/0.9.x/server-kotlin/java/account/update-verification.md index 0c0eb6c962..cb2d467c42 100644 --- a/docs/examples/0.9.x/server-kotlin/java/account/update-verification.md +++ b/docs/examples/0.9.x/server-kotlin/java/account/update-verification.md @@ -9,9 +9,9 @@ public void main() { Account account = new Account(client); account.updateVerification( - userId = "[USER_ID]", - secret = "[SECRET]" - new Continuation() { + "[USER_ID]", + "[SECRET]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-browser.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-browser.md index 3042e77002..5400828c2a 100644 --- a/docs/examples/0.9.x/server-kotlin/java/avatars/get-browser.md +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-browser.md @@ -9,8 +9,8 @@ public void main() { Avatars avatars = new Avatars(client); avatars.getBrowser( - code = "aa", - new Continuation() { + "aa", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-credit-card.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-credit-card.md index 956f6b76f3..9f2a02e360 100644 --- a/docs/examples/0.9.x/server-kotlin/java/avatars/get-credit-card.md +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-credit-card.md @@ -9,8 +9,8 @@ public void main() { Avatars avatars = new Avatars(client); avatars.getCreditCard( - code = "amex", - new Continuation() { + "amex", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-favicon.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-favicon.md index 35b64fcc0b..d713cfc3bf 100644 --- a/docs/examples/0.9.x/server-kotlin/java/avatars/get-favicon.md +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-favicon.md @@ -9,8 +9,8 @@ public void main() { Avatars avatars = new Avatars(client); avatars.getFavicon( - url = "https://example.com" - new Continuation() { + "https://example.com" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-flag.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-flag.md index ccc90df1e6..31c5e5cef3 100644 --- a/docs/examples/0.9.x/server-kotlin/java/avatars/get-flag.md +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-flag.md @@ -9,8 +9,8 @@ public void main() { Avatars avatars = new Avatars(client); avatars.getFlag( - code = "af", - new Continuation() { + "af", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-image.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-image.md index 357f6bf29c..3c84fb04b1 100644 --- a/docs/examples/0.9.x/server-kotlin/java/avatars/get-image.md +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-image.md @@ -9,8 +9,8 @@ public void main() { Avatars avatars = new Avatars(client); avatars.getImage( - url = "https://example.com", - new Continuation() { + "https://example.com", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-initials.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-initials.md index c6ef8ce8e7..906f1a62db 100644 --- a/docs/examples/0.9.x/server-kotlin/java/avatars/get-initials.md +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-initials.md @@ -9,7 +9,7 @@ public void main() { Avatars avatars = new Avatars(client); avatars.getInitials( - new Continuation() { + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/avatars/get-q-r.md b/docs/examples/0.9.x/server-kotlin/java/avatars/get-q-r.md index 07031b38ce..30559ae369 100644 --- a/docs/examples/0.9.x/server-kotlin/java/avatars/get-q-r.md +++ b/docs/examples/0.9.x/server-kotlin/java/avatars/get-q-r.md @@ -9,8 +9,8 @@ public void main() { Avatars avatars = new Avatars(client); avatars.getQR( - text = "[TEXT]", - new Continuation() { + "[TEXT]", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/database/create-collection.md b/docs/examples/0.9.x/server-kotlin/java/database/create-collection.md index e6cce6c375..4492ce25ca 100644 --- a/docs/examples/0.9.x/server-kotlin/java/database/create-collection.md +++ b/docs/examples/0.9.x/server-kotlin/java/database/create-collection.md @@ -9,11 +9,11 @@ public void main() { Database database = new Database(client); database.createCollection( - name = "[NAME]", - read = listOf(), - write = listOf(), - rules = listOf() - new Continuation() { + "[NAME]", + listOf(), + listOf(), + listOf() + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/database/create-document.md b/docs/examples/0.9.x/server-kotlin/java/database/create-document.md index 5d86b83094..03e0cafd3a 100644 --- a/docs/examples/0.9.x/server-kotlin/java/database/create-document.md +++ b/docs/examples/0.9.x/server-kotlin/java/database/create-document.md @@ -9,9 +9,9 @@ public void main() { Database database = new Database(client); database.createDocument( - collectionId = "[COLLECTION_ID]", - data = mapOf( "a" to "b" ), - new Continuation() { + "[COLLECTION_ID]", + mapOf( "a" to "b" ), + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/database/delete-collection.md b/docs/examples/0.9.x/server-kotlin/java/database/delete-collection.md index ea666ca565..d0dd0cac77 100644 --- a/docs/examples/0.9.x/server-kotlin/java/database/delete-collection.md +++ b/docs/examples/0.9.x/server-kotlin/java/database/delete-collection.md @@ -9,8 +9,8 @@ public void main() { Database database = new Database(client); database.deleteCollection( - collectionId = "[COLLECTION_ID]" - new Continuation() { + "[COLLECTION_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/database/delete-document.md b/docs/examples/0.9.x/server-kotlin/java/database/delete-document.md index 9bc26e85f0..de39f36d5d 100644 --- a/docs/examples/0.9.x/server-kotlin/java/database/delete-document.md +++ b/docs/examples/0.9.x/server-kotlin/java/database/delete-document.md @@ -9,9 +9,9 @@ public void main() { Database database = new Database(client); database.deleteDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]" - new Continuation() { + "[COLLECTION_ID]", + "[DOCUMENT_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/database/get-collection.md b/docs/examples/0.9.x/server-kotlin/java/database/get-collection.md index 1d6e96e45d..be4e39dab9 100644 --- a/docs/examples/0.9.x/server-kotlin/java/database/get-collection.md +++ b/docs/examples/0.9.x/server-kotlin/java/database/get-collection.md @@ -9,8 +9,8 @@ public void main() { Database database = new Database(client); database.getCollection( - collectionId = "[COLLECTION_ID]" - new Continuation() { + "[COLLECTION_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/database/get-document.md b/docs/examples/0.9.x/server-kotlin/java/database/get-document.md index 4ed6fe7ff9..b92c404f69 100644 --- a/docs/examples/0.9.x/server-kotlin/java/database/get-document.md +++ b/docs/examples/0.9.x/server-kotlin/java/database/get-document.md @@ -9,9 +9,9 @@ public void main() { Database database = new Database(client); database.getDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]" - new Continuation() { + "[COLLECTION_ID]", + "[DOCUMENT_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/database/list-collections.md b/docs/examples/0.9.x/server-kotlin/java/database/list-collections.md index 9fbda9f9c6..6d0fe9ad02 100644 --- a/docs/examples/0.9.x/server-kotlin/java/database/list-collections.md +++ b/docs/examples/0.9.x/server-kotlin/java/database/list-collections.md @@ -9,7 +9,7 @@ public void main() { Database database = new Database(client); database.listCollections( - new Continuation() { + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/database/list-documents.md b/docs/examples/0.9.x/server-kotlin/java/database/list-documents.md index 05e890783a..25bc741f11 100644 --- a/docs/examples/0.9.x/server-kotlin/java/database/list-documents.md +++ b/docs/examples/0.9.x/server-kotlin/java/database/list-documents.md @@ -9,8 +9,8 @@ public void main() { Database database = new Database(client); database.listDocuments( - collectionId = "[COLLECTION_ID]", - new Continuation() { + "[COLLECTION_ID]", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/database/update-collection.md b/docs/examples/0.9.x/server-kotlin/java/database/update-collection.md index e05700427a..db9fd9e325 100644 --- a/docs/examples/0.9.x/server-kotlin/java/database/update-collection.md +++ b/docs/examples/0.9.x/server-kotlin/java/database/update-collection.md @@ -9,9 +9,9 @@ public void main() { Database database = new Database(client); database.updateCollection( - collectionId = "[COLLECTION_ID]", - name = "[NAME]", - new Continuation() { + "[COLLECTION_ID]", + "[NAME]", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/database/update-document.md b/docs/examples/0.9.x/server-kotlin/java/database/update-document.md index 9c06624d4b..ca8399609f 100644 --- a/docs/examples/0.9.x/server-kotlin/java/database/update-document.md +++ b/docs/examples/0.9.x/server-kotlin/java/database/update-document.md @@ -9,10 +9,10 @@ public void main() { Database database = new Database(client); database.updateDocument( - collectionId = "[COLLECTION_ID]", - documentId = "[DOCUMENT_ID]", - data = mapOf( "a" to "b" ), - new Continuation() { + "[COLLECTION_ID]", + "[DOCUMENT_ID]", + mapOf( "a" to "b" ), + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/create-execution.md b/docs/examples/0.9.x/server-kotlin/java/functions/create-execution.md index eb13aed5c3..f71c52554a 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/create-execution.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/create-execution.md @@ -9,8 +9,8 @@ public void main() { Functions functions = new Functions(client); functions.createExecution( - functionId = "[FUNCTION_ID]", - new Continuation() { + "[FUNCTION_ID]", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/create-tag.md b/docs/examples/0.9.x/server-kotlin/java/functions/create-tag.md index 2ab53ae359..d6252f3425 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/create-tag.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/create-tag.md @@ -9,10 +9,10 @@ public void main() { Functions functions = new Functions(client); functions.createTag( - functionId = "[FUNCTION_ID]", - command = "[COMMAND]", - code = File("./path-to-files/image.jpg") - new Continuation() { + "[FUNCTION_ID]", + "[COMMAND]", + File("./path-to-files/image.jpg") + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/create.md b/docs/examples/0.9.x/server-kotlin/java/functions/create.md index 2cd762a3b5..2d02c2a066 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/create.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/create.md @@ -9,10 +9,10 @@ public void main() { Functions functions = new Functions(client); functions.create( - name = "[NAME]", - execute = listOf(), - runtime = "java-11.0", - new Continuation() { + "[NAME]", + listOf(), + "java-11.0", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/delete-tag.md b/docs/examples/0.9.x/server-kotlin/java/functions/delete-tag.md index 35cd36fbdc..b1b32f43cf 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/delete-tag.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/delete-tag.md @@ -9,9 +9,9 @@ public void main() { Functions functions = new Functions(client); functions.deleteTag( - functionId = "[FUNCTION_ID]", - tagId = "[TAG_ID]" - new Continuation() { + "[FUNCTION_ID]", + "[TAG_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/delete.md b/docs/examples/0.9.x/server-kotlin/java/functions/delete.md index a51709b874..d6ac9c3a66 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/delete.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/delete.md @@ -9,8 +9,8 @@ public void main() { Functions functions = new Functions(client); functions.delete( - functionId = "[FUNCTION_ID]" - new Continuation() { + "[FUNCTION_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/get-execution.md b/docs/examples/0.9.x/server-kotlin/java/functions/get-execution.md index 4161b28eaf..9cf872a793 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/get-execution.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/get-execution.md @@ -9,9 +9,9 @@ public void main() { Functions functions = new Functions(client); functions.getExecution( - functionId = "[FUNCTION_ID]", - executionId = "[EXECUTION_ID]" - new Continuation() { + "[FUNCTION_ID]", + "[EXECUTION_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/get-tag.md b/docs/examples/0.9.x/server-kotlin/java/functions/get-tag.md index 4e805f8386..290730d383 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/get-tag.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/get-tag.md @@ -9,9 +9,9 @@ public void main() { Functions functions = new Functions(client); functions.getTag( - functionId = "[FUNCTION_ID]", - tagId = "[TAG_ID]" - new Continuation() { + "[FUNCTION_ID]", + "[TAG_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/get.md b/docs/examples/0.9.x/server-kotlin/java/functions/get.md index 8e1cd5ef29..96d0eba931 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/get.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/get.md @@ -9,8 +9,8 @@ public void main() { Functions functions = new Functions(client); functions.get( - functionId = "[FUNCTION_ID]" - new Continuation() { + "[FUNCTION_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/list-executions.md b/docs/examples/0.9.x/server-kotlin/java/functions/list-executions.md index 915bf64d4b..412d78bf88 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/list-executions.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/list-executions.md @@ -9,8 +9,8 @@ public void main() { Functions functions = new Functions(client); functions.listExecutions( - functionId = "[FUNCTION_ID]", - new Continuation() { + "[FUNCTION_ID]", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/list-tags.md b/docs/examples/0.9.x/server-kotlin/java/functions/list-tags.md index 4d67eb99dd..3982c7dfc2 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/list-tags.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/list-tags.md @@ -9,8 +9,8 @@ public void main() { Functions functions = new Functions(client); functions.listTags( - functionId = "[FUNCTION_ID]", - new Continuation() { + "[FUNCTION_ID]", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/list.md b/docs/examples/0.9.x/server-kotlin/java/functions/list.md index e365f30f1f..a23792d898 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/list.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/list.md @@ -9,7 +9,7 @@ public void main() { Functions functions = new Functions(client); functions.list( - new Continuation() { + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/update-tag.md b/docs/examples/0.9.x/server-kotlin/java/functions/update-tag.md index 572e514ec0..5266d0e963 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/update-tag.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/update-tag.md @@ -9,9 +9,9 @@ public void main() { Functions functions = new Functions(client); functions.updateTag( - functionId = "[FUNCTION_ID]", - tag = "[TAG]" - new Continuation() { + "[FUNCTION_ID]", + "[TAG]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/functions/update.md b/docs/examples/0.9.x/server-kotlin/java/functions/update.md index 80d95c2f4b..ac5c3c8e3d 100644 --- a/docs/examples/0.9.x/server-kotlin/java/functions/update.md +++ b/docs/examples/0.9.x/server-kotlin/java/functions/update.md @@ -9,10 +9,10 @@ public void main() { Functions functions = new Functions(client); functions.update( - functionId = "[FUNCTION_ID]", - name = "[NAME]", - execute = listOf(), - new Continuation() { + "[FUNCTION_ID]", + "[NAME]", + listOf(), + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-anti-virus.md b/docs/examples/0.9.x/server-kotlin/java/health/get-anti-virus.md index a27b1c58b9..8cca86bc26 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-anti-virus.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-anti-virus.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getAntiVirus(new Continuation() { + health.getAntiVirus(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-cache.md b/docs/examples/0.9.x/server-kotlin/java/health/get-cache.md index e7300a34f4..b5fb7e72de 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-cache.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-cache.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getCache(new Continuation() { + health.getCache(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-d-b.md b/docs/examples/0.9.x/server-kotlin/java/health/get-d-b.md index 9644806bd2..6d835fa52b 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-d-b.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-d-b.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getDB(new Continuation() { + health.getDB(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-certificates.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-certificates.md index 084576b65a..3498cb1e67 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-certificates.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-certificates.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getQueueCertificates(new Continuation() { + health.getQueueCertificates(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-functions.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-functions.md index 9809a03d2f..b89d2dd6cb 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-functions.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-functions.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getQueueFunctions(new Continuation() { + health.getQueueFunctions(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-logs.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-logs.md index 4a08fa9321..36e10755a6 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-logs.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-logs.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getQueueLogs(new Continuation() { + health.getQueueLogs(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-tasks.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-tasks.md index 8e28955770..cbcc13253f 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-tasks.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-tasks.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getQueueTasks(new Continuation() { + health.getQueueTasks(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-usage.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-usage.md index e7fd65f170..4bad82cf4c 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-usage.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-usage.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getQueueUsage(new Continuation() { + health.getQueueUsage(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-webhooks.md b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-webhooks.md index d8bc27a2bf..e969d7a04f 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-queue-webhooks.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-queue-webhooks.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getQueueWebhooks(new Continuation() { + health.getQueueWebhooks(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-storage-local.md b/docs/examples/0.9.x/server-kotlin/java/health/get-storage-local.md index 079eca49e1..fb652fdd96 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-storage-local.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-storage-local.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getStorageLocal(new Continuation() { + health.getStorageLocal(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get-time.md b/docs/examples/0.9.x/server-kotlin/java/health/get-time.md index a8ca3b91de..2f4e90f144 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get-time.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get-time.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.getTime(new Continuation() { + health.getTime(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/health/get.md b/docs/examples/0.9.x/server-kotlin/java/health/get.md index 30adbbbf60..c66131fe6b 100644 --- a/docs/examples/0.9.x/server-kotlin/java/health/get.md +++ b/docs/examples/0.9.x/server-kotlin/java/health/get.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Health health = new Health(client); - health.get(new Continuation() { + health.get(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-continents.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-continents.md index 836eadac9a..b57a999351 100644 --- a/docs/examples/0.9.x/server-kotlin/java/locale/get-continents.md +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-continents.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Locale locale = new Locale(client); - locale.getContinents(new Continuation() { + locale.getContinents(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-e-u.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-e-u.md index 3bb79f9482..da3f5be058 100644 --- a/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-e-u.md +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-e-u.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Locale locale = new Locale(client); - locale.getCountriesEU(new Continuation() { + locale.getCountriesEU(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-phones.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-phones.md index b1596d2ccb..1e0b166dcc 100644 --- a/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-phones.md +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries-phones.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Locale locale = new Locale(client); - locale.getCountriesPhones(new Continuation() { + locale.getCountriesPhones(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-countries.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries.md index 95d1fef52f..1899d5f3d3 100644 --- a/docs/examples/0.9.x/server-kotlin/java/locale/get-countries.md +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-countries.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Locale locale = new Locale(client); - locale.getCountries(new Continuation() { + locale.getCountries(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-currencies.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-currencies.md index c7495f485a..3fdd0df45f 100644 --- a/docs/examples/0.9.x/server-kotlin/java/locale/get-currencies.md +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-currencies.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Locale locale = new Locale(client); - locale.getCurrencies(new Continuation() { + locale.getCurrencies(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get-languages.md b/docs/examples/0.9.x/server-kotlin/java/locale/get-languages.md index f59054e699..77febddbe9 100644 --- a/docs/examples/0.9.x/server-kotlin/java/locale/get-languages.md +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get-languages.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Locale locale = new Locale(client); - locale.getLanguages(new Continuation() { + locale.getLanguages(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/locale/get.md b/docs/examples/0.9.x/server-kotlin/java/locale/get.md index bf2f34fb02..714f214f50 100644 --- a/docs/examples/0.9.x/server-kotlin/java/locale/get.md +++ b/docs/examples/0.9.x/server-kotlin/java/locale/get.md @@ -8,7 +8,7 @@ public void main() { .setKey("919c2d18fb5d4...a2ae413da83346ad2"); // Your secret API key Locale locale = new Locale(client); - locale.get(new Continuation() { + locale.get(new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/create-file.md b/docs/examples/0.9.x/server-kotlin/java/storage/create-file.md index 2de730aa7b..1b61e4e303 100644 --- a/docs/examples/0.9.x/server-kotlin/java/storage/create-file.md +++ b/docs/examples/0.9.x/server-kotlin/java/storage/create-file.md @@ -9,8 +9,8 @@ public void main() { Storage storage = new Storage(client); storage.createFile( - file = File("./path-to-files/image.jpg"), - new Continuation() { + File("./path-to-files/image.jpg"), + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/delete-file.md b/docs/examples/0.9.x/server-kotlin/java/storage/delete-file.md index 8b9e6438c7..24c346021a 100644 --- a/docs/examples/0.9.x/server-kotlin/java/storage/delete-file.md +++ b/docs/examples/0.9.x/server-kotlin/java/storage/delete-file.md @@ -9,8 +9,8 @@ public void main() { Storage storage = new Storage(client); storage.deleteFile( - fileId = "[FILE_ID]" - new Continuation() { + "[FILE_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/get-file-download.md b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-download.md index da9fe1c042..90bb8262b1 100644 --- a/docs/examples/0.9.x/server-kotlin/java/storage/get-file-download.md +++ b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-download.md @@ -9,8 +9,8 @@ public void main() { Storage storage = new Storage(client); storage.getFileDownload( - fileId = "[FILE_ID]" - new Continuation() { + "[FILE_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/get-file-preview.md b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-preview.md index 928771a5aa..2692e0b8f9 100644 --- a/docs/examples/0.9.x/server-kotlin/java/storage/get-file-preview.md +++ b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-preview.md @@ -9,8 +9,8 @@ public void main() { Storage storage = new Storage(client); storage.getFilePreview( - fileId = "[FILE_ID]", - new Continuation() { + "[FILE_ID]", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/get-file-view.md b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-view.md index b74d121c89..0fb4398441 100644 --- a/docs/examples/0.9.x/server-kotlin/java/storage/get-file-view.md +++ b/docs/examples/0.9.x/server-kotlin/java/storage/get-file-view.md @@ -9,8 +9,8 @@ public void main() { Storage storage = new Storage(client); storage.getFileView( - fileId = "[FILE_ID]" - new Continuation() { + "[FILE_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/get-file.md b/docs/examples/0.9.x/server-kotlin/java/storage/get-file.md index 9bf9860976..ce7c58e575 100644 --- a/docs/examples/0.9.x/server-kotlin/java/storage/get-file.md +++ b/docs/examples/0.9.x/server-kotlin/java/storage/get-file.md @@ -9,8 +9,8 @@ public void main() { Storage storage = new Storage(client); storage.getFile( - fileId = "[FILE_ID]" - new Continuation() { + "[FILE_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/list-files.md b/docs/examples/0.9.x/server-kotlin/java/storage/list-files.md index 5a85543eae..3385e34962 100644 --- a/docs/examples/0.9.x/server-kotlin/java/storage/list-files.md +++ b/docs/examples/0.9.x/server-kotlin/java/storage/list-files.md @@ -9,7 +9,7 @@ public void main() { Storage storage = new Storage(client); storage.listFiles( - new Continuation() { + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/storage/update-file.md b/docs/examples/0.9.x/server-kotlin/java/storage/update-file.md index 91fe0168a4..37201414b7 100644 --- a/docs/examples/0.9.x/server-kotlin/java/storage/update-file.md +++ b/docs/examples/0.9.x/server-kotlin/java/storage/update-file.md @@ -9,10 +9,10 @@ public void main() { Storage storage = new Storage(client); storage.updateFile( - fileId = "[FILE_ID]", - read = listOf(), - write = listOf() - new Continuation() { + "[FILE_ID]", + listOf(), + listOf() + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/create-membership.md b/docs/examples/0.9.x/server-kotlin/java/teams/create-membership.md index 077ce3f058..de0c70f0cf 100644 --- a/docs/examples/0.9.x/server-kotlin/java/teams/create-membership.md +++ b/docs/examples/0.9.x/server-kotlin/java/teams/create-membership.md @@ -9,11 +9,11 @@ public void main() { Teams teams = new Teams(client); teams.createMembership( - teamId = "[TEAM_ID]", - email = "email@example.com", - roles = listOf(), - url = "https://example.com", - new Continuation() { + "[TEAM_ID]", + "email@example.com", + listOf(), + "https://example.com", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/create.md b/docs/examples/0.9.x/server-kotlin/java/teams/create.md index cdc269fa1a..dfd38f0ddf 100644 --- a/docs/examples/0.9.x/server-kotlin/java/teams/create.md +++ b/docs/examples/0.9.x/server-kotlin/java/teams/create.md @@ -9,8 +9,8 @@ public void main() { Teams teams = new Teams(client); teams.create( - name = "[NAME]", - new Continuation() { + "[NAME]", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/delete-membership.md b/docs/examples/0.9.x/server-kotlin/java/teams/delete-membership.md index 7a57a32d9a..cc7d19fcba 100644 --- a/docs/examples/0.9.x/server-kotlin/java/teams/delete-membership.md +++ b/docs/examples/0.9.x/server-kotlin/java/teams/delete-membership.md @@ -9,9 +9,9 @@ public void main() { Teams teams = new Teams(client); teams.deleteMembership( - teamId = "[TEAM_ID]", - membershipId = "[MEMBERSHIP_ID]" - new Continuation() { + "[TEAM_ID]", + "[MEMBERSHIP_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/delete.md b/docs/examples/0.9.x/server-kotlin/java/teams/delete.md index 7ace480161..559602c337 100644 --- a/docs/examples/0.9.x/server-kotlin/java/teams/delete.md +++ b/docs/examples/0.9.x/server-kotlin/java/teams/delete.md @@ -9,8 +9,8 @@ public void main() { Teams teams = new Teams(client); teams.delete( - teamId = "[TEAM_ID]" - new Continuation() { + "[TEAM_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/get-memberships.md b/docs/examples/0.9.x/server-kotlin/java/teams/get-memberships.md index af76419c43..a37cab43d3 100644 --- a/docs/examples/0.9.x/server-kotlin/java/teams/get-memberships.md +++ b/docs/examples/0.9.x/server-kotlin/java/teams/get-memberships.md @@ -9,8 +9,8 @@ public void main() { Teams teams = new Teams(client); teams.getMemberships( - teamId = "[TEAM_ID]", - new Continuation() { + "[TEAM_ID]", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/get.md b/docs/examples/0.9.x/server-kotlin/java/teams/get.md index 23f52dc5c5..22072f9dd2 100644 --- a/docs/examples/0.9.x/server-kotlin/java/teams/get.md +++ b/docs/examples/0.9.x/server-kotlin/java/teams/get.md @@ -9,8 +9,8 @@ public void main() { Teams teams = new Teams(client); teams.get( - teamId = "[TEAM_ID]" - new Continuation() { + "[TEAM_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/list.md b/docs/examples/0.9.x/server-kotlin/java/teams/list.md index 2a7bf89f6e..f17b0011e0 100644 --- a/docs/examples/0.9.x/server-kotlin/java/teams/list.md +++ b/docs/examples/0.9.x/server-kotlin/java/teams/list.md @@ -9,7 +9,7 @@ public void main() { Teams teams = new Teams(client); teams.list( - new Continuation() { + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-roles.md b/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-roles.md index 7e8d68283d..4026515cfc 100644 --- a/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-roles.md +++ b/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-roles.md @@ -9,10 +9,10 @@ public void main() { Teams teams = new Teams(client); teams.updateMembershipRoles( - teamId = "[TEAM_ID]", - membershipId = "[MEMBERSHIP_ID]", - roles = listOf() - new Continuation() { + "[TEAM_ID]", + "[MEMBERSHIP_ID]", + listOf() + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-status.md b/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-status.md index 0a528d4d81..c969cabad8 100644 --- a/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-status.md +++ b/docs/examples/0.9.x/server-kotlin/java/teams/update-membership-status.md @@ -9,11 +9,11 @@ public void main() { Teams teams = new Teams(client); teams.updateMembershipStatus( - teamId = "[TEAM_ID]", - membershipId = "[MEMBERSHIP_ID]", - userId = "[USER_ID]", - secret = "[SECRET]" - new Continuation() { + "[TEAM_ID]", + "[MEMBERSHIP_ID]", + "[USER_ID]", + "[SECRET]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/teams/update.md b/docs/examples/0.9.x/server-kotlin/java/teams/update.md index 5c05d6a65f..b3c1476dee 100644 --- a/docs/examples/0.9.x/server-kotlin/java/teams/update.md +++ b/docs/examples/0.9.x/server-kotlin/java/teams/update.md @@ -9,9 +9,9 @@ public void main() { Teams teams = new Teams(client); teams.update( - teamId = "[TEAM_ID]", - name = "[NAME]" - new Continuation() { + "[TEAM_ID]", + "[NAME]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/create.md b/docs/examples/0.9.x/server-kotlin/java/users/create.md index 78f815c42f..57193cc85a 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/create.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/create.md @@ -9,9 +9,9 @@ public void main() { Users users = new Users(client); users.create( - email = "email@example.com", - password = "password", - new Continuation() { + "email@example.com", + "password", + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/delete-session.md b/docs/examples/0.9.x/server-kotlin/java/users/delete-session.md index 7295506bc2..6f50727290 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/delete-session.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/delete-session.md @@ -9,9 +9,9 @@ public void main() { Users users = new Users(client); users.deleteSession( - userId = "[USER_ID]", - sessionId = "[SESSION_ID]" - new Continuation() { + "[USER_ID]", + "[SESSION_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/delete-sessions.md b/docs/examples/0.9.x/server-kotlin/java/users/delete-sessions.md index 6fb4028c37..759ddca58d 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/delete-sessions.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/delete-sessions.md @@ -9,8 +9,8 @@ public void main() { Users users = new Users(client); users.deleteSessions( - userId = "[USER_ID]" - new Continuation() { + "[USER_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/delete.md b/docs/examples/0.9.x/server-kotlin/java/users/delete.md index f004170a1e..2e8bba2007 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/delete.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/delete.md @@ -9,8 +9,8 @@ public void main() { Users users = new Users(client); users.delete( - userId = "[USER_ID]" - new Continuation() { + "[USER_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/get-logs.md b/docs/examples/0.9.x/server-kotlin/java/users/get-logs.md index 44e0ea272a..97ee90b0ad 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/get-logs.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/get-logs.md @@ -9,8 +9,8 @@ public void main() { Users users = new Users(client); users.getLogs( - userId = "[USER_ID]" - new Continuation() { + "[USER_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/get-prefs.md b/docs/examples/0.9.x/server-kotlin/java/users/get-prefs.md index d45fbf4682..79a9d09ef0 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/get-prefs.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/get-prefs.md @@ -9,8 +9,8 @@ public void main() { Users users = new Users(client); users.getPrefs( - userId = "[USER_ID]" - new Continuation() { + "[USER_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/get-sessions.md b/docs/examples/0.9.x/server-kotlin/java/users/get-sessions.md index cf2e06a858..eeed04069f 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/get-sessions.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/get-sessions.md @@ -9,8 +9,8 @@ public void main() { Users users = new Users(client); users.getSessions( - userId = "[USER_ID]" - new Continuation() { + "[USER_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/get.md b/docs/examples/0.9.x/server-kotlin/java/users/get.md index 98b3df0680..b64e8e8cfe 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/get.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/get.md @@ -9,8 +9,8 @@ public void main() { Users users = new Users(client); users.get( - userId = "[USER_ID]" - new Continuation() { + "[USER_ID]" + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/list.md b/docs/examples/0.9.x/server-kotlin/java/users/list.md index f0c4710b65..07e38fc32b 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/list.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/list.md @@ -9,7 +9,7 @@ public void main() { Users users = new Users(client); users.list( - new Continuation() { + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/update-prefs.md b/docs/examples/0.9.x/server-kotlin/java/users/update-prefs.md index 393366cf10..5e232fc65a 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/update-prefs.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/update-prefs.md @@ -9,9 +9,9 @@ public void main() { Users users = new Users(client); users.updatePrefs( - userId = "[USER_ID]", - prefs = mapOf( "a" to "b" ) - new Continuation() { + "[USER_ID]", + mapOf( "a" to "b" ) + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/update-status.md b/docs/examples/0.9.x/server-kotlin/java/users/update-status.md index 4c802b3bd7..9fbc8ce65b 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/update-status.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/update-status.md @@ -9,9 +9,9 @@ public void main() { Users users = new Users(client); users.updateStatus( - userId = "[USER_ID]", - status = 1 - new Continuation() { + "[USER_ID]", + 1 + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/examples/0.9.x/server-kotlin/java/users/update-verification.md b/docs/examples/0.9.x/server-kotlin/java/users/update-verification.md index cf62364845..ef4a23f9cf 100644 --- a/docs/examples/0.9.x/server-kotlin/java/users/update-verification.md +++ b/docs/examples/0.9.x/server-kotlin/java/users/update-verification.md @@ -9,9 +9,9 @@ public void main() { Users users = new Users(client); users.updateVerification( - userId = "[USER_ID]", - emailVerification = false - new Continuation() { + "[USER_ID]", + false + new Continuation() { @NotNull @Override public CoroutineContext getContext() { diff --git a/docs/references/teams/create-team-membership.md b/docs/references/teams/create-team-membership.md index a920c260be..c6d81de484 100644 --- a/docs/references/teams/create-team-membership.md +++ b/docs/references/teams/create-team-membership.md @@ -1,5 +1,5 @@ -Use this endpoint to invite a new member to join your team. An email with a link to join the team will be sent to the new member email address if the member doesn't exist in the project it will be created automatically. +Use this endpoint to invite a new member to join your team. If initiated from Client SDK, an email with a link to join the team will be sent to the new member's email address if the member doesn't exist in the project it will be created automatically. If initiated from server side SDKs, new member will automatically be added to the team. -Use the 'URL' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. +Use the 'URL' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. While calling from side SDKs the redirect url can be empty string. Please note that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface. \ No newline at end of file diff --git a/docs/sdks/android/GETTING_STARTED.md b/docs/sdks/android/GETTING_STARTED.md index c0bba25051..72ea5d1071 100644 --- a/docs/sdks/android/GETTING_STARTED.md +++ b/docs/sdks/android/GETTING_STARTED.md @@ -87,7 +87,7 @@ try { ``` ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-android) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) diff --git a/docs/sdks/dart/GETTING_STARTED.md b/docs/sdks/dart/GETTING_STARTED.md index d838324813..0fc1430ea2 100644 --- a/docs/sdks/dart/GETTING_STARTED.md +++ b/docs/sdks/dart/GETTING_STARTED.md @@ -40,7 +40,7 @@ try { ``` ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) diff --git a/docs/sdks/deno/GETTING_STARTED.md b/docs/sdks/deno/GETTING_STARTED.md index b06b26e94c..5fae9f634b 100644 --- a/docs/sdks/deno/GETTING_STARTED.md +++ b/docs/sdks/deno/GETTING_STARTED.md @@ -68,7 +68,7 @@ try { ``` ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) diff --git a/docs/sdks/dotnet/GETTING_STARTED.md b/docs/sdks/dotnet/GETTING_STARTED.md index cb982bf381..12084b23eb 100644 --- a/docs/sdks/dotnet/GETTING_STARTED.md +++ b/docs/sdks/dotnet/GETTING_STARTED.md @@ -45,7 +45,7 @@ try { ``` ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index 6369bbae28..28899ff18d 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -128,7 +128,7 @@ try { ``` ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-flutter) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) diff --git a/docs/sdks/kotlin/GETTING_STARTED.md b/docs/sdks/kotlin/GETTING_STARTED.md index 60d78861e8..18f2b94c41 100644 --- a/docs/sdks/kotlin/GETTING_STARTED.md +++ b/docs/sdks/kotlin/GETTING_STARTED.md @@ -77,7 +77,7 @@ suspend fun main() { ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) diff --git a/docs/sdks/nodejs/GETTING_STARTED.md b/docs/sdks/nodejs/GETTING_STARTED.md index beb139c14b..e934faf3d9 100644 --- a/docs/sdks/nodejs/GETTING_STARTED.md +++ b/docs/sdks/nodejs/GETTING_STARTED.md @@ -68,7 +68,7 @@ try { ``` ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) diff --git a/docs/sdks/php/GETTING_STARTED.md b/docs/sdks/php/GETTING_STARTED.md index af9f8d011f..49f916a139 100644 --- a/docs/sdks/php/GETTING_STARTED.md +++ b/docs/sdks/php/GETTING_STARTED.md @@ -56,7 +56,7 @@ try { ``` ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) diff --git a/docs/sdks/python/GETTING_STARTED.md b/docs/sdks/python/GETTING_STARTED.md index 2af9b088de..06645904ed 100644 --- a/docs/sdks/python/GETTING_STARTED.md +++ b/docs/sdks/python/GETTING_STARTED.md @@ -57,7 +57,7 @@ except AppwriteException as e: ``` ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) diff --git a/docs/sdks/ruby/GETTING_STARTED.md b/docs/sdks/ruby/GETTING_STARTED.md index c31a04a9e3..b2aa767a3f 100644 --- a/docs/sdks/ruby/GETTING_STARTED.md +++ b/docs/sdks/ruby/GETTING_STARTED.md @@ -57,7 +57,7 @@ end ``` ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) diff --git a/docs/sdks/web/GETTING_STARTED.md b/docs/sdks/web/GETTING_STARTED.md index cf065cdd3d..f67ed5fe83 100644 --- a/docs/sdks/web/GETTING_STARTED.md +++ b/docs/sdks/web/GETTING_STARTED.md @@ -52,7 +52,7 @@ sdk.account.create('me@example.com', 'password', 'Jane Doe') ``` ### Learn more -You can use following resources to learn more and get help +You can use the following resources to learn more and get help - 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-flutter) - 📜 [Appwrite Docs](https://appwrite.io/docs) - 💬 [Discord Community](https://appwrite.io/discord) diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index 0d6995b064..203af0c67d 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -39,6 +39,10 @@ abstract class Migration '0.7.0' => 'V06', '0.8.0' => 'V07', '0.9.0' => 'V08', + '0.9.1' => 'V08', + '0.9.2' => 'V08', + '0.9.3' => 'V08', + '0.9.4' => 'V08', ]; /** diff --git a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php index 8ba16f8145..454a149c3c 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomClientTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomClientTest.php @@ -185,7 +185,32 @@ class FunctionsCustomClientTest extends Scope $this->assertEquals(201, $execution['headers']['status-code']); + $executionId = $execution['body']['$id'] ?? ''; + sleep(10); + + $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions/'.$executionId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $projectId, + 'x-appwrite-key' => $apikey, + ]); + + $output = json_decode($executions['body']['stdout'], true); + + $this->assertEquals(200, $executions['headers']['status-code']); + $this->assertEquals('completed', $executions['body']['status']); + $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); + $this->assertEquals('Test', $output['APPWRITE_FUNCTION_NAME']); + $this->assertEquals($tagId, $output['APPWRITE_FUNCTION_TAG']); + $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); + $this->assertEquals('PHP', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); + $this->assertEquals('8.0', $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); + $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']); + $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']); + $this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']); + $this->assertEquals($this->getUser()['$id'], $output['APPWRITE_FUNCTION_USER_ID']); + $this->assertNotEmpty($output['APPWRITE_FUNCTION_JWT']); + $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', [ 'content-type' => 'application/json', 'x-appwrite-project' => $projectId, diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php index cf0a1cafc4..775eca06e2 100644 --- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php +++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php @@ -582,8 +582,31 @@ class FunctionsCustomServerTest extends Scope $this->assertEquals(201, $execution['headers']['status-code']); + $executionId = $execution['body']['$id'] ?? ''; + sleep(10); + $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions/'.$executionId, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $output = json_decode($executions['body']['stdout'], true); + + $this->assertEquals(200, $executions['headers']['status-code']); + $this->assertEquals('completed', $executions['body']['status']); + $this->assertEquals($functionId, $output['APPWRITE_FUNCTION_ID']); + $this->assertEquals('Test '.$name, $output['APPWRITE_FUNCTION_NAME']); + $this->assertEquals($tagId, $output['APPWRITE_FUNCTION_TAG']); + $this->assertEquals('http', $output['APPWRITE_FUNCTION_TRIGGER']); + $this->assertEquals('PHP', $output['APPWRITE_FUNCTION_RUNTIME_NAME']); + $this->assertEquals('8.0', $output['APPWRITE_FUNCTION_RUNTIME_VERSION']); + $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT']); + $this->assertEquals('', $output['APPWRITE_FUNCTION_EVENT_DATA']); + $this->assertEquals('foobar', $output['APPWRITE_FUNCTION_DATA']); + $this->assertEquals('', $output['APPWRITE_FUNCTION_USER_ID']); + $this->assertEmpty($output['APPWRITE_FUNCTION_JWT']); + $executions = $this->client->call(Client::METHOD_GET, '/functions/'.$functionId.'/executions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], diff --git a/tests/resources/functions/php-fn.tar.gz b/tests/resources/functions/php-fn.tar.gz index a97a2e2352..5e359122fa 100644 Binary files a/tests/resources/functions/php-fn.tar.gz and b/tests/resources/functions/php-fn.tar.gz differ diff --git a/tests/resources/functions/php-fn/index.php b/tests/resources/functions/php-fn/index.php index 32af3ccb16..449658e1e7 100644 --- a/tests/resources/functions/php-fn/index.php +++ b/tests/resources/functions/php-fn/index.php @@ -17,15 +17,18 @@ use Appwrite\Services\Storage; // $result = $storage->getFile($_ENV['APPWRITE_FILEID']); -echo $_ENV['APPWRITE_FUNCTION_ID']."\n"; -echo $_ENV['APPWRITE_FUNCTION_NAME']."\n"; -echo $_ENV['APPWRITE_FUNCTION_TAG']."\n"; -echo $_ENV['APPWRITE_FUNCTION_TRIGGER']."\n"; -echo $_ENV['APPWRITE_FUNCTION_RUNTIME_NAME']."\n"; -echo $_ENV['APPWRITE_FUNCTION_RUNTIME_VERSION']."\n"; -// echo $result['$id']; -echo $_ENV['APPWRITE_FUNCTION_EVENT']."\n"; -echo $_ENV['APPWRITE_FUNCTION_EVENT_DATA']."\n"; -echo 'data:'.$_ENV['APPWRITE_FUNCTION_DATA']."\n"; -echo 'userId:'.$_ENV['APPWRITE_FUNCTION_USER_ID']."\n"; -echo 'jwt:'.$_ENV['APPWRITE_FUNCTION_JWT']."\n"; +$output = [ + 'APPWRITE_FUNCTION_ID' => $_ENV['APPWRITE_FUNCTION_ID'], + 'APPWRITE_FUNCTION_NAME' => $_ENV['APPWRITE_FUNCTION_NAME'], + 'APPWRITE_FUNCTION_TAG' => $_ENV['APPWRITE_FUNCTION_TAG'], + 'APPWRITE_FUNCTION_TRIGGER' => $_ENV['APPWRITE_FUNCTION_TRIGGER'], + 'APPWRITE_FUNCTION_RUNTIME_NAME' => $_ENV['APPWRITE_FUNCTION_RUNTIME_NAME'], + 'APPWRITE_FUNCTION_RUNTIME_VERSION' => $_ENV['APPWRITE_FUNCTION_RUNTIME_VERSION'], + 'APPWRITE_FUNCTION_EVENT' => $_ENV['APPWRITE_FUNCTION_EVENT'], + 'APPWRITE_FUNCTION_EVENT_DATA' => $_ENV['APPWRITE_FUNCTION_EVENT_DATA'], + 'APPWRITE_FUNCTION_DATA' => $_ENV['APPWRITE_FUNCTION_DATA'], + 'APPWRITE_FUNCTION_USER_ID' => $_ENV['APPWRITE_FUNCTION_USER_ID'], + 'APPWRITE_FUNCTION_JWT' => $_ENV['APPWRITE_FUNCTION_JWT'], +]; + +echo json_encode($output);